Makefile 5.5 KB

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