Makefile 6.0 KB

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