Makefile 5.7 KB

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