Makefile 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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 $(ADK_TOPDIR)/rules.mk
  4. PKG_NAME:= openjdk7
  5. PKG_VERSION:= 2.4.7
  6. PKG_RELEASE:= 8
  7. PKG_MD5SUM:= f6b28633b9978fadc724247cfc264ff0
  8. PKG_DESCR:= java virtual machine
  9. PKG_SECTION:= dev/lang
  10. PKG_BUILDDEP:= openjdk7-host alsa-lib xproto libjpeg-turbo zlib giflib libpng freetype cups
  11. PKG_BUILDDEP+= libX11 libXt libXp libXinerama libXrender libXtst
  12. PKG_BUILDDEP+= libpng giflib gtk+ glib fontconfig nss
  13. HOST_BUILDDEP:= fastjar-host gcj-host ecj-host classpath-host jamvm-host
  14. HOST_BUILDDEP+= jikes-host ant-host libXtst-host libXt-host libXinerama-host
  15. HOST_BUILDDEP+= cups-host qemu-host alsa-lib-host freetype-host
  16. PKG_DEPENDS:= zlib libstdcxx libffi libpthread libxtst libxi cups
  17. PKG_DEPENDS+= libfreetype libxrender libx11 libxext libpthread nss libjpeg-turbo
  18. PKG_DEPENDS+= libpng giflib libgtk glib fontconfig
  19. PKG_URL:= http://openjdk.org/
  20. PKG_SITES:= http://icedtea.classpath.org/download/source/
  21. PKG_BUILDDEP_UCLIBC:= libiconv-tiny
  22. DISTFILES:= icedtea-$(PKG_VERSION).tar.xz
  23. WRKDIST= ${WRKDIR}/icedtea-${PKG_VERSION}
  24. GCJ_VER:= 4.8.3
  25. PKG_HOST_DEPENDS:= linux
  26. PKG_ARCH_DEPENDS:= arm mips ppc x86 x86_64
  27. PKG_CHOICES_OPENJDK7:= ZERO JAMVM
  28. PKGCD_ZERO:= zero-assembly backend
  29. PKGCD_JAMVM:= jamvm backend
  30. include $(ADK_TOPDIR)/mk/host.mk
  31. include $(ADK_TOPDIR)/mk/package.mk
  32. include $(ADK_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. CONFIG_STYLE:= basic
  36. # uclibc needs -liconv
  37. ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
  38. TARGET_LIBS:= -liconv
  39. endif
  40. # for UINTPTR_MAX in stdint.h
  41. TARGET_CFLAGS+= -D__STDC_LIMIT_MACROS
  42. # segfaults with march=pentium-m/atom
  43. TARGET_CFLAGS:= $(subst march=pentium-m,march=i686,$(TARGET_CFLAGS))
  44. TARGET_CFLAGS:= $(subst march=atom,march=i686,$(TARGET_CFLAGS))
  45. BOOTSTRAPJDK:= ${STAGING_HOST_DIR}/bootstrap-jdk
  46. JDKARCH:= $(ADK_TARGET_CPU_ARCH)
  47. ifeq ($(ADK_TARGET_ARCH),x86)
  48. JDKARCH:= i386
  49. endif
  50. ifeq ($(ADK_TARGET_CPU_ARCH),x86_64)
  51. JDKARCH:= amd64
  52. endif
  53. ifeq ($(ADK_PACKAGE_OPENJDK7_ZERO),y)
  54. CONFIGURE_BACKEND:= --enable-zero
  55. endif
  56. ifeq ($(ADK_PACKAGE_OPENJDK7_JAMVM),y)
  57. CONFIGURE_BACKEND:= --enable-jamvm
  58. endif
  59. CONFIGURE_COMMON:= --disable-docs \
  60. --with-jdk-home=$(BOOTSTRAPJDK) \
  61. --with-java=$(BOOTSTRAPJDK)/bin/java \
  62. --with-javac=$(BOOTSTRAPJDK)/bin/javac \
  63. --with-javah=$(BOOTSTRAPJDK)/bin/javah \
  64. --with-jar=$(BOOTSTRAPJDK)/bin/jar \
  65. --with-rmic=$(BOOTSTRAPJDK)/bin/rmic \
  66. --with-native2ascii=$(BOOTSTRAPJDK)/bin/native2ascii \
  67. --without-gcj \
  68. --without-hotspot-build \
  69. --enable-nss \
  70. --enable-system-zlib \
  71. --enable-system-jpeg \
  72. --enable-system-png \
  73. --enable-system-gif \
  74. --enable-system-gtk \
  75. --enable-system-gio \
  76. --enable-system-fontconfig \
  77. --disable-system-lcms \
  78. --disable-system-kerberos \
  79. --disable-compile-against-syscalls \
  80. --without-rhino
  81. CONFIGURE_ARGS+= $(CONFIGURE_BACKEND)
  82. CONFIGURE_ARGS+= $(CONFIGURE_COMMON)
  83. CONFIGURE_ARGS+= --disable-bootstrap
  84. CONFIGURE_ENV+= LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib
  85. MAKE_ENV+= ALT_COMPILER_PATH=$(TOOLCHAIN_DIR)/usr/$(GNU_TARGET_NAME)/bin \
  86. ALT_OPENWIN_HOME=$(STAGING_TARGET_DIR)/usr/ \
  87. ALT_CUPS_HEADERS_PATH=$(STAGING_TARGET_DIR)/usr/include/ \
  88. ALT_FREETYPE_HEADERS_PATH=$(STAGING_TARGET_DIR)/usr/include/ \
  89. OTHER_CFLAGS='$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)' \
  90. OTHER_CXXFLAGS='$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)' \
  91. OTHER_LDFLAGS='$(TARGET_LDFLAGS)' \
  92. OTHER_LDLIBS='$(TARGET_LIBS)' \
  93. GCC_HONOUR_COPTS=s CROSS_COMPILE_ARCH=$(JDKARCH) QEMU=$(QEMU) \
  94. LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib
  95. ALL_TARGET:= icedtea
  96. # host stuff
  97. OPENJDK_NATIVE_ENV:= JAVACFLAGS="-cp ${STAGING_HOST_DIR}/usr/share/java/libgcj-$(GCJ_VER).jar" \
  98. LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib:$(STAGING_HOST_DIR)/usr/lib64 \
  99. BOOTCLASSPATH="$(STAGING_HOST_DIR)/usr/share/jamvm/classes.zip:$(STAGING_HOST_DIR)/usr/share/classpath/glibj.zip" \
  100. FFI_LDFLAGS='$(HOST_LDFLAGS)' \
  101. OTHER_LDFLAGS='$(HOST_LDFLAGS)' \
  102. ALSA_CPPFLAGS='$(HOST_CPPFLAGS)' \
  103. ALT_OPENWIN_HOME='$(STAGING_HOST_DIR)/usr' \
  104. ALT_CUPS_HEADERS_PATH="$(STAGING_HOST_DIR)/usr/include" \
  105. ALT_FREETYPE_HEADERS_PATH="$(STAGING_HOST_DIR)/usr/include" \
  106. ALT_FREETYPE_LIB_PATH="$(STAGING_HOST_DIR)/usr/lib"
  107. HOST_CONFIGURE_ENV+= $(OPENJDK_NATIVE_ENV)
  108. HOST_MAKE_ENV+= $(OPENJDK_NATIVE_ENV)
  109. HOST_ALL_TARGET:= icedtea-boot
  110. HOST_CONFIGURE_ARGS+= --enable-bootstrap \
  111. --enable-zero \
  112. --with-jdk-home=$(STAGING_HOST_DIR)/usr/lib/jvm \
  113. --with-java=$(STAGING_HOST_DIR)/usr/bin/hostjava \
  114. --with-javac=$(STAGING_HOST_DIR)/usr/bin/ecj \
  115. --with-ecj-jar=${DL_DIR}/ecj-4.9.jar \
  116. --without-hotspot-build \
  117. --disable-system-zlib \
  118. --disable-system-jpeg \
  119. --disable-system-lcms \
  120. --disable-system-png \
  121. --disable-system-gif \
  122. --disable-system-gtk \
  123. --disable-system-gio \
  124. --disable-system-kerberos \
  125. --disable-system-fontconfig \
  126. --disable-compile-against-syscalls \
  127. --without-rhino \
  128. --disable-docs
  129. hostpost-install:
  130. -rm -rf $(STAGING_HOST_DIR)/bootstrap-jdk
  131. $(CP) $(WRKBUILD)/openjdk.build-boot/j2sdk-image $(STAGING_HOST_DIR)/bootstrap-jdk
  132. openjdk7-install:
  133. $(INSTALL_DIR) $(IDIR_OPENJDK7)/usr/lib/jvm/jre
  134. $(INSTALL_DIR) $(IDIR_OPENJDK7)/usr/bin
  135. $(CP) $(WRKBUILD)/openjdk.build/j2re-image/bin $(IDIR_OPENJDK7)/usr/lib/jvm/jre
  136. $(CP) $(WRKBUILD)/openjdk.build/j2re-image/lib $(IDIR_OPENJDK7)/usr/lib/jvm/jre
  137. (cd $(IDIR_OPENJDK7)/usr/bin && ln -sf ../lib/jvm/jre/bin/java .)
  138. (cd $(IDIR_OPENJDK7)/usr/lib/jvm/jre/lib/$(JDKARCH) && ln -sf server/libjvm.so .)
  139. include ${ADK_TOPDIR}/mk/host-bottom.mk
  140. include ${ADK_TOPDIR}/mk/pkg-bottom.mk