Makefile 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(TOPDIR)/rules.mk
  4. PKG_NAME:= openjdk7
  5. PKG_VERSION:= 2.4.5
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 6dcc544657ade213d01017354a6f9858
  8. PKG_DESCR:= OpenJDK 7 Java VM
  9. PKG_SECTION:= lang
  10. PKG_BUILDDEP:= gettext-tiny-host glib-host flex-host bison-host qemu-host
  11. PKG_BUILDDEP+= fastjar-host libICE-host libSM-host libX11-host util-macros-host libXt-host
  12. PKG_BUILDDEP+= xineramaproto-host libXinerama-host recordproto-host libXi-host libXtst-host freetype-host
  13. PKG_BUILDDEP+= renderproto-host libXrender-host alsa-lib-host libffi-host gcj-host ecj-host jikes-host
  14. PKG_BUILDDEP+= classpath-host jamvm-host ant-host cups-host openjdk7-host nss
  15. PKG_BUILDDEP+= alsa-lib xproto libjpeg-turbo zlib giflib libpng freetype cups
  16. PKG_BUILDDEP+= libX11 libXt libXp libXinerama libXrender libXtst libiconv-tiny
  17. PKG_BUILDDEP+= libpng giflib gtk+ glib fontconfig
  18. PKG_DEPENDS:= zlib libstdcxx libffi libpthread libxtst libxi libgcc cups
  19. PKG_DEPENDS+= libfreetype libxrender libx11 libxext libpthread nss libjpeg-turbo
  20. PKG_DEPENDS+= libpng giflib libgtk glib fontconfig
  21. PKG_URL:= http://openjdk.org/
  22. PKG_SITES:= http://icedtea.classpath.org/download/source/
  23. DISTFILES:= icedtea-$(PKG_VERSION).tar.gz
  24. WRKDIST= ${WRKDIR}/icedtea-${PKG_VERSION}
  25. GCJ_VER:= 4.8.2
  26. PKG_HOST_DEPENDS:= linux
  27. PKG_ARCH_DEPENDS:= arm mips ppc x86 x86_64
  28. PKG_LIBC_DEPENDS:= uclibc glibc
  29. PKG_SYSTEM_DEPENDS:= !lemote-yeelong
  30. include $(TOPDIR)/mk/host.mk
  31. include $(TOPDIR)/mk/package.mk
  32. include $(TOPDIR)/mk/qemu.mk
  33. $(eval $(call HOST_template,OPENJDK7,openjdk7,$(PKG_VERSION)-${PKG_RELEASE}))
  34. $(eval $(call PKG_template,OPENJDK7,openjdk7,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  35. # for UINTPTR_MAX in stdint.h
  36. TARGET_CFLAGS+= -D__STDC_LIMIT_MACROS
  37. # segfaults with march=pentium-m/atom
  38. TARGET_CFLAGS:= $(subst march=pentium-m,march=i686,$(TARGET_CFLAGS))
  39. TARGET_CFLAGS:= $(subst march=atom,march=i686,$(TARGET_CFLAGS))
  40. TARGET_CFLAGS:= $(filter-out -fhonour-copts,$(TARGET_CFLAGS))
  41. BOOTSTRAPJDK:= ${STAGING_HOST_DIR}/bootstrap-jdk
  42. JDKARCH:= $(CPU_ARCH)
  43. ifeq ($(ARCH),x86)
  44. JDKARCH:= i386
  45. endif
  46. ifeq ($(CPU_ARCH),x86_64)
  47. JDKARCH:= amd64
  48. endif
  49. ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
  50. JDKARCH:= mipsel
  51. endif
  52. CONFIGURE_BACKEND:= --enable-zero
  53. CONFIGURE_COMMON:= --disable-docs \
  54. --with-jdk-home=$(BOOTSTRAPJDK) \
  55. --with-java=$(BOOTSTRAPJDK)/bin/java \
  56. --with-javac=$(BOOTSTRAPJDK)/bin/javac \
  57. --with-javah=$(BOOTSTRAPJDK)/bin/javah \
  58. --with-jar=$(BOOTSTRAPJDK)/bin/jar \
  59. --with-rmic=$(BOOTSTRAPJDK)/bin/rmic \
  60. --with-native2ascii=$(BOOTSTRAPJDK)/bin/native2ascii \
  61. --with-gcj=$(STAGING_HOST_DIR)/usr/bin/gcj \
  62. --without-hotspot-build \
  63. --enable-nss \
  64. --enable-system-zlib \
  65. --enable-system-jpeg \
  66. --enable-system-png \
  67. --enable-system-gif \
  68. --enable-system-gtk \
  69. --enable-system-gio \
  70. --enable-system-fontconfig \
  71. --disable-system-lcms \
  72. --disable-system-kerberos \
  73. --disable-compile-against-syscalls \
  74. --without-rhino
  75. CONFIGURE_ARGS+= $(CONFIGURE_BACKEND)
  76. CONFIGURE_ARGS+= $(CONFIGURE_COMMON)
  77. CONFIGURE_ARGS+= --disable-bootstrap
  78. CONFIGURE_ENV+= LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib
  79. MAKE_ENV+= ALT_COMPILER_PATH=$(STAGING_HOST_DIR)/$(GNU_TARGET_NAME)/bin \
  80. ALT_OPENWIN_HOME=$(STAGING_TARGET_DIR)/usr/ \
  81. ALT_CUPS_HEADERS_PATH=$(STAGING_TARGET_DIR)/usr/include/ \
  82. ALT_FREETYPE_HEADERS_PATH=$(STAGING_TARGET_DIR)/usr/include/ \
  83. OTHER_CFLAGS='$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)' \
  84. OTHER_CXXFLAGS='$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)' \
  85. OTHER_LDFLAGS='$(TARGET_LDFLAGS)' \
  86. GCC_HONOUR_COPTS=s CROSS_COMPILE_ARCH=$(JDKARCH) QEMU=$(QEMU) \
  87. LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib
  88. ALL_TARGET:= icedtea
  89. # host stuff
  90. OPENJDK_NATIVE_ENV+= JAVACFLAGS="-cp ${STAGING_HOST_DIR}/usr/share/java/libgcj-$(GCJ_VER).jar"
  91. OPENJDK_NATIVE_ENV+= LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib:$(STAGING_HOST_DIR)/usr/lib64
  92. OPENJDK_NATIVE_ENV+= ADK_ECJ=$(STAGING_HOST_DIR)/usr/bin/ecj
  93. OPENJDK_NATIVE_ENV+= BOOTCLASSPATH="$(STAGING_HOST_DIR)/usr/share/jamvm/classes.zip:$(STAGING_HOST_DIR)/usr/share/classpath/glibj.zip"
  94. OPENJDK_NATIVE_ENV+= FFI_LDFLAGS="$(LDFLAGS_FOR_BUILD)" \
  95. ALT_CUPS_HEADERS_PATH="$(STAGING_HOST_DIR)/usr/include" \
  96. ALT_FREETYPE_HEADERS_PATH="$(STAGING_HOST_DIR)/usr/include" \
  97. ALT_FREETYPE_LIB_PATH="$(STAGING_HOST_DIR)/usr/lib"
  98. HOST_STYLE:= auto
  99. HOST_CONFIGURE_ENV+= $(OPENJDK_NATIVE_ENV)
  100. HOST_MAKE_ENV+= $(OPENJDK_NATIVE_ENV)
  101. HOST_ALL_TARGET:= icedtea-boot
  102. HOST_CONFIGURE_ARGS+=\
  103. --enable-bootstrap \
  104. --enable-zero \
  105. --with-jdk-home=$(STAGING_HOST_DIR)/usr/lib/jvm \
  106. --with-java=$(STAGING_HOST_DIR)/usr/bin/java \
  107. --with-javac=$(STAGING_HOST_DIR)/usr/bin/ecj \
  108. --with-ecj-jar=${STAGING_HOST_DIR}/usr/share/java/ecj.jar \
  109. --without-hotspot-build \
  110. --disable-system-zlib \
  111. --disable-system-jpeg \
  112. --disable-system-lcms \
  113. --disable-system-png \
  114. --disable-system-gif \
  115. --disable-system-gtk \
  116. --disable-system-gio \
  117. --disable-system-kerberos \
  118. --disable-system-fontconfig \
  119. --disable-compile-against-syscalls \
  120. --without-rhino \
  121. --disable-docs
  122. hostpost-install:
  123. -rm -rf $(STAGING_HOST_DIR)/bootstrap-jdk
  124. $(CP) $(WRKBUILD)/openjdk.build-boot/j2sdk-image $(STAGING_HOST_DIR)/bootstrap-jdk
  125. openjdk7-install:
  126. $(INSTALL_DIR) $(IDIR_OPENJDK7)/usr/lib/jvm/jre
  127. $(INSTALL_DIR) $(IDIR_OPENJDK7)/usr/bin
  128. $(CP) $(WRKBUILD)/openjdk.build/j2re-image/bin $(IDIR_OPENJDK7)/usr/lib/jvm/jre
  129. $(CP) $(WRKBUILD)/openjdk.build/j2re-image/lib $(IDIR_OPENJDK7)/usr/lib/jvm/jre
  130. (cd $(IDIR_OPENJDK7)/usr/bin && ln -sf ../lib/jvm/jre/bin/java .)
  131. (cd $(IDIR_OPENJDK7)/usr/lib/jvm/jre/lib/$(JDKARCH) && ln -sf server/libjvm.so .)
  132. include ${TOPDIR}/mk/host-bottom.mk
  133. include ${TOPDIR}/mk/pkg-bottom.mk