Makefile 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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:= 1
  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_CFLINE_OPENJDK:= depends on ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_EGLIBC
  25. # autotools infrastructure for OpenJDK
  26. ICEDTEA_NAME:= icedtea6
  27. ICEDTEA_VERSION:= 1.10
  28. # bootstrap JARs
  29. XALAN_NAME= xalan-j
  30. XALAN_VERSION= 2_7_0
  31. # override generic extraction
  32. EXTRACT_OVERRIDE:= 1
  33. DISTFILES:= $(PKG_NAME)-$(PKG_VERSION)-src-$(PKG_EXTRAVER).tar.gz \
  34. $(ICEDTEA_NAME)-$(ICEDTEA_VERSION).tar.gz \
  35. jaxp144_01.zip \
  36. jdk6-jaf-b20.zip \
  37. jdk6-jaxws-b20.zip \
  38. ${XALAN_NAME}_${XALAN_VERSION}-bin.tar.gz
  39. WRKDIST= ${WRKDIR}
  40. WRKSRC= ${WRKDIST}/${ICEDTEA_NAME}-${ICEDTEA_VERSION}
  41. PKG_SUBPKGS:= OPENJDK
  42. PKG_CHOICES_OPENJDK:= ZERO SHARK CACAO
  43. PKGCD_ZERO:= zero-assembly backend
  44. PKGCD_SHARK:= JIT backend
  45. PKGCB_SHARK:= llvm
  46. PKGCD_CACAO:= Cacao JIT backend
  47. PKGCD_JAMVM:= JamVM backend
  48. include $(TOPDIR)/mk/package.mk
  49. $(eval $(call PKG_template,OPENJDK,openjdk,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  50. TARGET_CFLAGS:= $(filter-out -fhonour-copts,$(TARGET_CFLAGS))
  51. BOOTSTRAPJDK:= ${STAGING_JAVA_HOST_DIR}/bootstrap-jdk
  52. ifeq ($(ADK_PACKAGE_OPENJDK_ZERO),y)
  53. CONFIGURE_BACKEND:= --enable-zero
  54. endif
  55. ifeq ($(ADK_PACKAGE_OPENJDK_SHARK),y)
  56. CONFIGURE_BACKEND:= --enable-shark \
  57. --with-llvm-config=$(STAGING_TARGET_DIR)/usr/bin/llvm-config
  58. endif
  59. ifeq ($(ADK_PACKAGE_OPENJDK_CACAO),y)
  60. CONFIGURE_BACKEND:= --enable-cacao
  61. endif
  62. ifeq ($(ADK_PACKAGE_OPENJDK_JAMVM),y)
  63. CONFIGURE_BACKEND:= --enable-jamvm
  64. endif
  65. CONFIGURE_ARGS+= $(CONFIGURE_BACKEND)
  66. CONFIGURE_ARGS+= --disable-docs \
  67. --disable-bootstrap \
  68. --enable-openjdk-cross-compilation \
  69. --with-openjdk-src-dir=$(WRKDIST)/$(PKG_NAME)-$(PKG_VERSION) \
  70. --with-xalan2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xalan.jar \
  71. --with-xalan2-serializer-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/serializer.jar \
  72. --with-xerces2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xercesImpl.jar \
  73. --with-jdk-home=$(BOOTSTRAPJDK) \
  74. --with-java=$(BOOTSTRAPJDK)/bin/java \
  75. --with-javac=$(BOOTSTRAPJDK)/bin/javac \
  76. --with-javah=$(BOOTSTRAPJDK)/bin/javah \
  77. --with-jar=$(BOOTSTRAPJDK)/bin/jar \
  78. --with-rmic=$(BOOTSTRAPJDK)/bin/rmic \
  79. --with-native2ascii=$(BOOTSTRAPJDK)/bin/native2ascii \
  80. --without-rhino
  81. MAKE_ENV+= ALT_COMPILER_PATH=$(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME) \
  82. GCC_HONOUR_COPTS=s \
  83. TARGET_ALIAS=$(GNU_TARGET_NAME) BUILD_ALIAS=$(GNU_HOST_NAME) HOST_ALIAS=$(GNU_TARGET_NAME)
  84. OPENJDK_NATIVE_ENV+= ALT_COMPILER_PATH=$(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME) \
  85. PATH=$${PATH}:${STAGING_TARGET_DIR}/usr/bin \
  86. GCC_HONOUR_COPTS=s CROSS_COMPILE_ARCH=$(ARCH) \
  87. TARGET_ALIAS=$(GNU_TARGET_NAME) BUILD_ALIAS=$(GNU_HOST_NAME) HOST_ALIAS=$(GNU_TARGET_NAME)
  88. ALL_TARGET:= icedtea
  89. do-extract:
  90. cd ${WRKDIST}; mkdir $(PKG_NAME)-$(PKG_VERSION); \
  91. tar xzf $(TOPDIR)/dl/$(PKG_NAME)-$(PKG_VERSION)-src-$(PKG_EXTRAVER).tar.gz -C $(PKG_NAME)-$(PKG_VERSION)
  92. cd $(WRKDIST); tar xzf $(TOPDIR)/dl/$(ICEDTEA_NAME)-$(ICEDTEA_VERSION).tar.gz
  93. cd ${WRKDIST}; tar xzf ${TOPDIR}/dl/${XALAN_NAME}_${XALAN_VERSION}-bin.tar.gz
  94. mkdir -p ${WRKBUILD}/drops
  95. cd ${TOPDIR}/dl; cp jaxp144_01.zip jdk6-jaf-b20.zip jdk6-jaxws-b20.zip ${WRKBUILD}/drops
  96. pre-configure:
  97. cd ${WRKBUILD}; rm -rf config.{cache,status}; \
  98. export $(MAKE_ENV) ${OPENJDK_NATIVE_ENV} ; ./configure \
  99. ${CONFIGURE_TRIPLE} \
  100. $(CONFIGURE_BACKEND) \
  101. --prefix=/usr \
  102. --bindir=/usr/bin \
  103. --datadir=/usr/share \
  104. --mandir=/usr/share/man \
  105. --libexecdir=/usr/libexec \
  106. --localstatedir=/var \
  107. --sysconfdir=/etc \
  108. --enable-bootstrap \
  109. --enable-openjdk-cross-compilation \
  110. --with-openjdk-src-dir=$(WRKDIST)/$(PKG_NAME)-$(PKG_VERSION) \
  111. --with-xalan2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xalan.jar \
  112. --with-xalan2-serializer-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/serializer.jar \
  113. --with-xerces2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xercesImpl.jar \
  114. --with-jdk-home=$(BOOTSTRAPJDK) \
  115. --with-java=$(BOOTSTRAPJDK)/bin/java \
  116. --with-javac=$(BOOTSTRAPJDK)/bin/javac \
  117. --with-javah=$(BOOTSTRAPJDK)/bin/javah \
  118. --with-jar=$(BOOTSTRAPJDK)/bin/jar \
  119. --with-rmic=$(BOOTSTRAPJDK)/bin/rmic \
  120. --with-native2ascii=$(BOOTSTRAPJDK)/bin/native2ascii \
  121. --without-rhino ;\
  122. mkdir -p $(WRKBUILD)/generated/sun/awt/X11/generator/ ; \
  123. mkdir -p $(WRKBUILD)/openjdk.build/gensrc/sun/awt/X11/generator/ ; \
  124. cp $(TOPDIR)/jtools/openjdk/files/sizes.* $(WRKBUILD)/generated/sun/awt/X11/generator/; \
  125. cp $(TOPDIR)/jtools/openjdk/files/sizes.* $(WRKBUILD)/openjdk.build/gensrc/sun/awt/X11/generator/; \
  126. $(MAKE) icedtea-ecj
  127. # fixup symlinks to bootstrap jdk
  128. ln -sf $(BOOTSTRAPJDK)/bin/java $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/java
  129. ln -sf $(BOOTSTRAPJDK)/bin/javac $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/javac
  130. ln -sf $(BOOTSTRAPJDK)/bin/javah $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/javah
  131. ln -sf $(BOOTSTRAPJDK)/bin/jar $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/jar
  132. openjdk-install:
  133. $(INSTALL_DIR) $(IDIR_OPENJDK)/usr
  134. $(CP) $(WRKBUILD)/openjdk.build/j2re-image/* $(IDIR_OPENJDK)/usr
  135. include ${TOPDIR}/mk/pkg-bottom.mk