Makefile 6.0 KB

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