Makefile 5.5 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:= openjdk
  5. PKG_VERSION:= 6
  6. PKG_EXTRAVER:= b22-28_feb_2011
  7. PKG_RELEASE:= 2
  8. PKG_MD5SUM:= 2d2bbbb0f9b81f1fec41ec730da8a933 \
  9. fd3f35e8a8a2ef9a64c035ed66cea06d \
  10. ef7a8b3624ea904bf584bc46d79b5e75 \
  11. bc95c133620bd68c161cac9891592901 \
  12. 91adfd41e6f001add4f92ae31216b1e3 \
  13. d526d0848c88607ce4e3a0a4edb75d50
  14. PKG_DESCR:= OpenJDK Java VM
  15. PKG_SECTION:= lang
  16. PKG_BUILDDEP:= alsa-lib xproto jpeg zlib giflib libpng freetype cups
  17. PKG_BUILDDEP+= libX11 libXt libXp libXinerama libXrender libXtst libiconv
  18. PKG_DEPENDS:= zlib libstdcxx libffi libpthread
  19. PKG_URL:= http://openjdk.org/
  20. PKG_SITES:= http://download.java.net/openjdk/jdk6/promoted/b22/ \
  21. http://mirror.netcologne.de/apache.org/xml/xalan-j/binaries/ \
  22. http://icedtea.classpath.org/download/drops/ \
  23. http://icedtea.classpath.org/download/source/
  24. PKG_HOST_DEPENDS:= !darwin !cygwin !openbsd !netbsd !freebsd
  25. PKG_ARCH_DEPENDS:= arm mips x86 x86_64
  26. PKG_SYSTEM_DEPENDS:= !lemote-yeelong !linksys-ag241 !fon-fon2100
  27. # autotools infrastructure for OpenJDK
  28. ICEDTEA_NAME:= icedtea6
  29. ICEDTEA_VERSION:= 1.10
  30. # bootstrap JARs
  31. XALAN_NAME= xalan-j
  32. XALAN_VERSION= 2_7_0
  33. # override generic extraction
  34. EXTRACT_OVERRIDE:= 1
  35. DISTFILES:= $(PKG_NAME)-$(PKG_VERSION)-src-$(PKG_EXTRAVER).tar.gz \
  36. $(ICEDTEA_NAME)-$(ICEDTEA_VERSION).tar.gz \
  37. jaxp144_01.zip \
  38. jdk6-jaf-b20.zip \
  39. jdk6-jaxws-b20.zip \
  40. ${XALAN_NAME}_${XALAN_VERSION}-bin.tar.gz
  41. WRKDIST= ${WRKDIR}
  42. WRKSRC= ${WRKDIST}/${ICEDTEA_NAME}-${ICEDTEA_VERSION}
  43. PKG_SUBPKGS:= OPENJDK
  44. PKG_CHOICES_OPENJDK:= ZERO SHARK CACAO
  45. PKGCD_ZERO:= zero-assembly backend
  46. PKGCD_SHARK:= Shark JIT backend (needs eglibc/glibc)
  47. PKGCB_SHARK:= llvm
  48. PKGCD_CACAO:= Cacao JIT backend
  49. include $(TOPDIR)/mk/package.mk
  50. $(eval $(call PKG_template,OPENJDK,openjdk,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  51. TARGET_CFLAGS:= $(filter-out -fhonour-copts,$(TARGET_CFLAGS))
  52. BOOTSTRAPJDK:= ${STAGING_JAVA_HOST_DIR}/bootstrap-jdk
  53. ifeq ($(ADK_PACKAGE_OPENJDK_ZERO),y)
  54. CONFIGURE_BACKEND:= --enable-zero
  55. endif
  56. ifeq ($(ADK_PACKAGE_OPENJDK_SHARK),y)
  57. CONFIGURE_BACKEND:= --enable-shark \
  58. --with-llvm-config=$(STAGING_TARGET_DIR)/usr/bin/llvm-config
  59. endif
  60. ifeq ($(ADK_PACKAGE_OPENJDK_CACAO),y)
  61. CONFIGURE_BACKEND:= --enable-cacao
  62. endif
  63. CONFIGURE_COMMON:= --disable-docs \
  64. --enable-openjdk-cross-compilation \
  65. --with-openjdk-src-dir=$(WRKDIST)/$(PKG_NAME)-$(PKG_VERSION) \
  66. --with-xalan2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xalan.jar \
  67. --with-xalan2-serializer-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/serializer.jar \
  68. --with-xerces2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xercesImpl.jar \
  69. --with-jdk-home=$(BOOTSTRAPJDK) \
  70. --with-java=$(BOOTSTRAPJDK)/bin/java \
  71. --with-javac=$(BOOTSTRAPJDK)/bin/javac \
  72. --with-javah=$(BOOTSTRAPJDK)/bin/javah \
  73. --with-jar=$(BOOTSTRAPJDK)/bin/jar \
  74. --with-rmic=$(BOOTSTRAPJDK)/bin/rmic \
  75. --with-native2ascii=$(BOOTSTRAPJDK)/bin/native2ascii \
  76. --with-gcj=$(STAGING_JAVA_HOST_DIR)/usr/bin/gcj \
  77. --without-rhino
  78. CONFIGURE_ARGS+= $(CONFIGURE_BACKEND)
  79. CONFIGURE_ARGS+= $(CONFIGURE_COMMON)
  80. CONFIGURE_ARGS+= --disable-bootstrap
  81. CONFIGURE_ENV+= PATH=$(STAGING_JAVA_HOST_DIR)/usr/bin:$${PATH}:${STAGING_TARGET_DIR}/usr/bin
  82. MAKE_ENV+= ALT_COMPILER_PATH=$(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME) \
  83. ADK_ECJ=$(STAGING_JAVA_HOST_DIR)/usr/bin/ecj \
  84. PATH=$(STAGING_JAVA_HOST_DIR)/usr/bin:$${PATH}:${STAGING_TARGET_DIR}/usr/bin \
  85. OTHER_CFLAGS='$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)' \
  86. OTHER_CXXFLAGS='$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)' \
  87. GCC_HONOUR_COPTS=s CROSS_COMPILE_ARCH=$(ARCH)
  88. ALL_TARGET:= icedtea
  89. # add include path for Xrender.h from staging directory
  90. post-patch:
  91. ifeq ($(QEMU),)
  92. $(error Fatal error: $$QEMU not set!)
  93. endif
  94. $(SED) "s#@ADK_TARGETDIR@#$(STAGING_TARGET_DIR)#" ${WRKDIST}/$(PKG_NAME)-$(PKG_VERSION)/jdk/make/sun/xawt/Makefile
  95. $(SED) "s#OTHER_CXXFLAGS#CXXFLAGS_COMMON#" ${WRKDIST}/$(PKG_NAME)-$(PKG_VERSION)/jdk/make/com/sun/java/pack/Makefile
  96. do-extract:
  97. cd ${WRKDIST}; mkdir $(PKG_NAME)-$(PKG_VERSION); \
  98. tar xzf $(TOPDIR)/dl/$(PKG_NAME)-$(PKG_VERSION)-src-$(PKG_EXTRAVER).tar.gz -C $(PKG_NAME)-$(PKG_VERSION)
  99. cd $(WRKDIST); tar xzf $(TOPDIR)/dl/$(ICEDTEA_NAME)-$(ICEDTEA_VERSION).tar.gz
  100. cd ${WRKDIST}; tar xzf ${TOPDIR}/dl/${XALAN_NAME}_${XALAN_VERSION}-bin.tar.gz
  101. mkdir -p ${WRKBUILD}/drops
  102. cd ${TOPDIR}/dl; cp jaxp144_01.zip jdk6-jaf-b20.zip jdk6-jaxws-b20.zip ${WRKBUILD}/drops
  103. pre-configure:
  104. cd ${WRKBUILD}; rm -rf config.{cache,status}; \
  105. export $(MAKE_ENV); ./configure \
  106. ${CONFIGURE_TRIPLE} \
  107. $(CONFIGURE_BACKEND) \
  108. --prefix=/usr \
  109. --bindir=/usr/bin \
  110. --datadir=/usr/share \
  111. --mandir=/usr/share/man \
  112. --libexecdir=/usr/libexec \
  113. --localstatedir=/var \
  114. --sysconfdir=/etc \
  115. --enable-bootstrap \
  116. $(CONFIGURE_COMMON) ;\
  117. env ${MAKE_ENV} $(MAKE) icedtea-ecj
  118. # fixup symlinks to bootstrap jdk
  119. ln -sf $(BOOTSTRAPJDK)/bin/java $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/java
  120. ln -sf $(BOOTSTRAPJDK)/bin/javac $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/javac
  121. ln -sf $(BOOTSTRAPJDK)/bin/javah $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/javah
  122. ln -sf $(BOOTSTRAPJDK)/bin/jar $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/jar
  123. openjdk-install:
  124. $(INSTALL_DIR) $(IDIR_OPENJDK)/usr
  125. $(CP) $(WRKBUILD)/openjdk.build/j2re-image/* $(IDIR_OPENJDK)/usr
  126. include ${TOPDIR}/mk/pkg-bottom.mk