Makefile 5.6 KB

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