diff options
Diffstat (limited to 'jtools/openjdk')
-rw-r--r-- | jtools/openjdk/Makefile | 90 | ||||
-rw-r--r-- | jtools/openjdk/do-extract | 0 | ||||
-rw-r--r-- | jtools/openjdk/patches/openjdk.patch | 54 |
3 files changed, 144 insertions, 0 deletions
diff --git a/jtools/openjdk/Makefile b/jtools/openjdk/Makefile new file mode 100644 index 000000000..b685f9a83 --- /dev/null +++ b/jtools/openjdk/Makefile @@ -0,0 +1,90 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= openjdk +PKG_VERSION:= 6 +PKG_EXTRAVER:= b22-28_feb_2011 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 2d2bbbb0f9b81f1fec41ec730da8a933 \ + fd3f35e8a8a2ef9a64c035ed66cea06d \ + ef7a8b3624ea904bf584bc46d79b5e75 \ + bc95c133620bd68c161cac9891592901 \ + 91adfd41e6f001add4f92ae31216b1e3 \ + d526d0848c88607ce4e3a0a4edb75d50 +PKG_DESCR:= OpenJDK Java VM +PKG_SECTION:= lang +PKG_URL:= http://openjdk.org/ +PKG_SITES:= http://download.java.net/openjdk/jdk6/promoted/b22/ \ + http://mirror.netcologne.de/apache.org/xml/xalan-j/binaries/ \ + http://icedtea.classpath.org/download/drops/ \ + http://icedtea.classpath.org/download/source/ + +# autotools infrastructure for OpenJDK +ICEDTEA_NAME:= icedtea6 +ICEDTEA_VERSION:= 1.10 + +# bootstrap JARs +XALAN_NAME= xalan-j +XALAN_VERSION= 2_7_0 + +# override generic extraction +EXTRACT_OVERRIDE:= 1 +DISTFILES:= openjdk-$(PKG_VERSION)-src-$(PKG_EXTRAVER).tar.gz \ + $(ICEDTEA_NAME)-$(ICEDTEA_VERSION).tar.gz \ + jaxp144_01.zip \ + jdk6-jaf-b20.zip \ + jdk6-jaxws-b20.zip \ + ${XALAN_NAME}_${XALAN_VERSION}-bin.tar.gz + +WRKDIST= ${WRKDIR} +WRKSRC= ${WRKDIST}/${ICEDTEA_NAME}-${ICEDTEA_VERSION} + +include ../rules.mk + +OPENJDK_NATIVE_ENV+= JAVACFLAGS="-cp ${STAGING_JAVA_HOST_DIR}/usr/share/java/libgcj-4.5.2.jar" +OPENJDK_NATIVE_ENV+= DYLD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64 +OPENJDK_NATIVE_ENV+= LD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64 +OPENJDK_NATIVE_ENV+= ADK_ECJ=$(STAGING_JAVA_HOST_DIR)/usr/bin/ecj + +install: ${STAGING_JAVA_HOST_DIR}/bootstrap-jdk/bin/java + +$(WRKDIST)/.extract: + cd ${WRKDIST}; mkdir openjdk-$(PKG_VERSION); \ + tar xzf $(TOPDIR)/dl/openjdk-$(PKG_VERSION)-src-$(PKG_EXTRAVER).tar.gz -C openjdk-$(PKG_VERSION) + cd $(WRKDIST); tar xzf $(TOPDIR)/dl/$(ICEDTEA_NAME)-$(ICEDTEA_VERSION).tar.gz + cd ${WRKDIST}; tar xzf ${TOPDIR}/dl/${XALAN_NAME}_${XALAN_VERSION}-bin.tar.gz + mkdir -p ${WRKBUILD}/drops + cd ${TOPDIR}/dl; cp jaxp144_01.zip jdk6-jaf-b20.zip jdk6-jaxws-b20.zip ${WRKBUILD}/drops + cd $(WRKDIST); patch -p0 < ${TOPDIR}/jtools/openjdk/patches/*.patch + touch $@ + +$(WRKDIST)/.configured: ${WRKDIST}/.extract + cd ${WRKBUILD}; rm -rf config.{cache,status}; \ + export ${OPENJDK_NATIVE_ENV}; ./configure \ + --enable-bootstrap \ + --enable-zero \ + --disable-openjdk-cross-compilation \ + --with-openjdk-src-dir=$(WRKDIST)/$(PKG_NAME)-$(PKG_VERSION) \ + --with-jdk-home=$(STAGING_JAVA_HOST_DIR)/usr/lib/jvm \ + --with-java=$(STAGING_JAVA_HOST_DIR)/usr/bin/java \ + --with-javac=$(STAGING_JAVA_HOST_DIR)/usr/bin/ecj \ + --with-gcj=$(STAGING_JAVA_HOST_DIR)/usr/bin/gcj \ + --with-ecj-jar=${STAGING_JAVA_HOST_DIR}/usr/share/ecj.jar \ + --with-xalan2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xalan.jar \ + --with-xalan2-serializer-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/serializer.jar \ + --with-xerces2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xercesImpl.jar \ + --without-rhino \ + --disable-docs + touch $@ + +$(WRKBUILD)/.compiled: ${WRKDIST}/.configured + export ${OPENJDK_NATIVE_ENV}; $(MAKE) -C $(WRKBUILD) + touch $@ + +${STAGING_JAVA_HOST_DIR}/bootstrap-jdk/bin/java: $(WRKBUILD)/.compiled + $(CP) $(WRKSRC)/openjdk.build/j2sdk-image $(STAGING_JAVA_HOST_DIR)/bootstrap-jdk + touch $@ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/jtools/openjdk/do-extract b/jtools/openjdk/do-extract new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/jtools/openjdk/do-extract diff --git a/jtools/openjdk/patches/openjdk.patch b/jtools/openjdk/patches/openjdk.patch new file mode 100644 index 000000000..1ef7e195f --- /dev/null +++ b/jtools/openjdk/patches/openjdk.patch @@ -0,0 +1,54 @@ +diff -Nur openjdk-6.orig/Makefile openjdk-6/Makefile +--- openjdk-6.orig/Makefile 2011-02-28 17:02:07.000000000 +0100 ++++ openjdk-6/Makefile 2011-04-06 19:47:19.261818496 +0200 +@@ -25,9 +25,7 @@ + + BUILD_PARENT_DIRECTORY=. + +-ifndef TOPDIR +- TOPDIR:=. +-endif ++TOPDIR:=. + + ifndef JDK_TOPDIR + JDK_TOPDIR=$(TOPDIR)/jdk +diff -Nur icedtea6-1.10.orig/Makefile.in icedtea6-1.10/Makefile.in +--- icedtea6-1.10.orig/Makefile.in 2011-03-02 20:48:45.161291458 +0100 ++++ icedtea6-1.10/Makefile.in 2011-04-06 20:10:40.581819545 +0200 +@@ -1329,7 +1329,7 @@ + @OPENJDK_SRC_DIR_FOUND_TRUE@ cp -pPR $(OPENJDK_SRC_DIR_LINK) $(OPENJDK_SRC_DIR) openjdk ; \ + @OPENJDK_SRC_DIR_FOUND_TRUE@ fi + @OPENJDK_SRC_DIR_FOUND_FALSE@@USE_HG_TRUE@ if ! test -d openjdk ; then \ +-@OPENJDK_SRC_DIR_FOUND_FALSE@@USE_HG_TRUE@ cp -pPRl openjdk.hg openjdk ; \ ++@OPENJDK_SRC_DIR_FOUND_FALSE@@USE_HG_TRUE@ cp -pPR openjdk.hg openjdk ; \ + @OPENJDK_SRC_DIR_FOUND_FALSE@@USE_HG_TRUE@ fi + @OPENJDK_SRC_DIR_FOUND_FALSE@@USE_HG_FALSE@ set -e ; \ + @OPENJDK_SRC_DIR_FOUND_FALSE@@USE_HG_FALSE@ if ! test -d openjdk ; \ +@@ -1576,7 +1576,7 @@ + # FIXME (missing): Rename to clone-ecj. + stamps/extract-ecj.stamp: $(OPENJDK_TREE) + if ! test -d openjdk-ecj ; then \ +- cp -pPRl openjdk openjdk-ecj ; \ ++ cp -pPR openjdk openjdk-ecj ; \ + fi + mkdir -p stamps + touch stamps/extract-ecj.stamp +@@ -1643,10 +1643,14 @@ + + stamps/native-ecj.stamp: + mkdir -p stamps ; \ +- if test "x$(GCJ)" != "xno"; then \ +- $(GCJ) $(IT_CFLAGS) -Wl,-Bsymbolic -findirect-dispatch -o native-ecj \ +- --main=org.eclipse.jdt.internal.compiler.batch.Main ${ECJ_JAR} ; \ +- fi ; \ ++ if test -n "${ADK_ECJ}" && test -x "${ADK_ECJ}"; then \ ++ ln -s "${ADK_ECJ}" native-ecj; \ ++ else \ ++ if test "x$(GCJ)" != "xno"; then \ ++ $(GCJ) $(IT_CFLAGS) -Wl,-Bsymbolic -findirect-dispatch -o native-ecj \ ++ --main=org.eclipse.jdt.internal.compiler.batch.Main ${ECJ_JAR} ; \ ++ fi ; \ ++ fi; \ + touch stamps/native-ecj.stamp + + clean-native-ecj: |