diff options
Diffstat (limited to 'testing/openjdk6/APKBUILD')
-rw-r--r-- | testing/openjdk6/APKBUILD | 178 |
1 files changed, 178 insertions, 0 deletions
diff --git a/testing/openjdk6/APKBUILD b/testing/openjdk6/APKBUILD new file mode 100644 index 0000000000..f5dea2a1a2 --- /dev/null +++ b/testing/openjdk6/APKBUILD @@ -0,0 +1,178 @@ +# Contributor: Timo Teras <timo.teras@iki.fi> +# Maintainer: Timo Teras <timo.teras@iki.fi> +pkgname=openjdk6 +pkgver=1.6.0_p22 +icedteaver=1.10 +pkgrel=0 +pkgdesc="Sun OpenJDK 6 via IcedTea" +url="http://icedtea.classpath.org/" +arch="all" +license="GPL-2 with Classpath" +depends="$pkgname-jre" +makedepends="java-gcj-compat findutils tar zip gawk pkgconfig + nss-dev cups-dev jpeg-dev giflib-dev libpng-dev libxt-dev + libxp-dev libxtst-dev libxinerama-dev libiconv-dev + libxrender-dev alsa-lib-dev freetype-dev xulrunner-dev + gtk+2.0-dev" +install="" +subpackages="$pkgname-jre-lib:jrelib $pkgname-jre $pkgname-jre-base:jrebase + $pkgname-doc:doc" +BOOTSTRAP_JAVA_HOME=/usr/lib/jvm/java-1.5-gcj/ +OPENJDK_VERSION=b22 +OPENJDK_DATE=28_feb_2011 +XALAN2_VER=2_7_1 +XERCES_VER=2.9.0 +RHINO_VER=1_7R2 +ANT_VER=1.8.2 +JAXWS_DROP_ZIP=jdk6-jaxws-b20.zip +JAXP_DROP_ZIP=jaxp144_01.zip +JAF_DROP_ZIP=jdk6-jaf-b20.zip +source="http://download.java.net/openjdk/jdk6/promoted/$OPENJDK_VERSION/openjdk-6-src-$OPENJDK_VERSION-$OPENJDK_DATE.tar.gz + http://icedtea.classpath.org/download/source/icedtea6-$icedteaver.tar.gz + http://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VER-bin.tar.gz + http://archive.apache.org/dist/xml/xalan-j/xalan-j_$XALAN2_VER-bin-2jars.tar.gz + http://archive.apache.org/dist/xml/xerces-j/Xerces-J-bin.$XERCES_VER.tar.gz + ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino$RHINO_VER.zip + http://icedtea.classpath.org/download/drops/$JAXWS_DROP_ZIP + http://icedtea.classpath.org/download/drops/$JAXP_DROP_ZIP + http://icedtea.classpath.org/download/drops/$JAF_DROP_ZIP + icedtea-hotspot-uclibc-fixes.patch + icedtea-jdk-iconv-uclibc.patch + icedtea-jdk-execinfo.patch + icedtea-jdk-no-lib-nsl.patch + " + +_builddir="$srcdir/icedtea6-$icedteaver" +INSTALL_BASE=/usr/lib/jvm/java-1.6-openjdk +CPU=`uname -m | sed -e 's/i.86/i386/g'` + +unpack() { + if [ -z "$force" ]; then + md5check || return 1 + initdcheck || return 1 + fi + mkdir -p "$srcdir" + msg "Unpacking sources..." + tar -C "$srcdir" -zxf icedtea6-$icedteaver.tar.gz || return 1 + tar -C "$srcdir" -zxf apache-ant-$ANT_VER-bin.tar.gz || return 1 + tar -C "$srcdir" -zxf xalan-j_$XALAN2_VER-bin-2jars.tar.gz || return 1 + tar -C "$srcdir" -zxf Xerces-J-bin.$XERCES_VER.tar.gz || return 1 + unzip -o -q "rhino$RHINO_VER.zip" -d "$srcdir" || return 1 +} + +prepare() { + cd "$_builddir" + + # Busybox sha256 does not support longopts + sed -e "s/--check/-c/g" -i Makefile.in + + cp ../icedtea-*.patch patches +} + +build() { + export JAVA_HOME=$BOOTSTRAP_JAVA_HOME + export PATH=$JAVA_HOME/bin:$srcdir/apache-ant-$ANT_VER/bin:$PATH + export DISTRIBUTION_PATCHES=`echo $source | awk -v RS=' ' '/icedtea-[^ ]*\.patch/ { printf "patches/%s ",$1 }'` + + JOBS=`echo $MAKEFLAGS | sed -n -e 's/.*-j\([0-9]\+\).*/\1/p'` + if [ "$JOBS" ]; then + confjobs="--with-parallel-jobs=$JOBS" + else + confjobs="" + fi + + cd "$_builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --disable-dependency-tracking \ + --with-gcj $confjobs \ + --with-openjdk-src-zip=$srcdir/openjdk-6-src-$OPENJDK_VERSION-$OPENJDK_DATE.tar.gz \ + --with-jaxp-drop-zip=$srcdir/$JAXP_DROP_ZIP \ + --with-jaf-drop-zip=$srcdir/$JAF_DROP_ZIP \ + --with-jaxws-drop-zip=$srcdir/$JAXWS_DROP_ZIP \ + --with-jdk-home=$BOOTSTRAP_JAVA_HOME \ + --with-ant-home=$srcdir/apache-ant-$ANT_VER \ + --with-xalan2-jar=$srcdir/xalan-j_$XALAN2_VER/xalan.jar \ + --with-xalan2-serializer-jar=$srcdir/xalan-j_$XALAN2_VER/serializer.jar \ + --with-xerces2-jar=$srcdir/xerces-${XERCES_VER/./_}/xercesImpl.jar \ + --with-rhino=$srcdir/rhino$RHINO_VER/js.jar \ + --with-pkgversion=Alpine_Linux \ + || return 1 + + make || return 1 +} + +package() { + mkdir -p "$pkgdir"/$INSTALL_BASE + cp -a "$_builddir"/openjdk.build/j2sdk-image/* "$pkgdir"/$INSTALL_BASE + rm "$pkgdir"/$INSTALL_BASE/src.zip +} + +jrelib() { + pkgdesc="OpenJDK 6 Java Runtime (class libraries)" + arch="noarch" + depends="" + + for A in jre/lib/zi jre/lib/images jre/lib/*.jar jre/lib/security \ + jre/lib/ext/*.jar jre/lib/cmm jre/ASSEMBLY_EXCEPTION \ + jre/THIRD_PARTY_README jre/LICENSE ; do + dirname=${A%/*} + mkdir -p "$subpkgdir"/$INSTALL_BASE/$dirname + mv "$pkgdir"/$INSTALL_BASE/$A "$subpkgdir"/$INSTALL_BASE/$dirname + done +} + +jrebase() { + pkgdesc="OpenJDK 6 Java Runtime (no GUI support)" + depends="$pkgname-jre-lib java-common" + + mkdir -p "$subpkgdir"/$INSTALL_BASE/bin + + for A in java orbd rmid servertool unpack200 keytool \ + pack200 rmiregistry tnameserv ; do + mv "$pkgdir"/$INSTALL_BASE/bin/$A "$subpkgdir"/$INSTALL_BASE/bin + done + + # rest of the jre subdir (which were not taken by -jre subpkg) + mv "$pkgdir"/$INSTALL_BASE/jre "$subpkgdir"/$INSTALL_BASE +} + +jre() { + pkgdesc="OpenJDK 6 Java Runtime" + depends="" + + mkdir -p "$subpkgdir" + for A in jre/bin/policytool \ + bin/appletviewer \ + bin/policytool \ + jre/lib/$CPU/xawt \ + jre/lib/$CPU/libsplashscreen.so ; do + dirname=${A%/*} + mkdir -p "$subpkgdir"/$INSTALL_BASE/$dirname + mv "$pkgdir"/$INSTALL_BASE/$A "$subpkgdir"/$INSTALL_BASE/$dirname + done +} + +doc() { + default_doc + + mkdir -p "$subpkgdir"/$INSTALL_BASE/ + mv "$pkgdir"/$INSTALL_BASE/man "$subpkgdir"/$INSTALL_BASE/ +} + +md5sums="2d2bbbb0f9b81f1fec41ec730da8a933 openjdk-6-src-b22-28_feb_2011.tar.gz +fd3f35e8a8a2ef9a64c035ed66cea06d icedtea6-1.10.tar.gz +afb0c7950a663f94e65da9f3be676d8f apache-ant-1.8.2-bin.tar.gz +3ccda39bcd08b780436dfd2f22fb23d5 xalan-j_2_7_1-bin-2jars.tar.gz +138f2d1cddd823281d5dfb700f2bd7d4 Xerces-J-bin.2.9.0.tar.gz +40d0a9abec8169e42920214b37fa8e0e rhino1_7R2.zip +91adfd41e6f001add4f92ae31216b1e3 jdk6-jaxws-b20.zip +ef7a8b3624ea904bf584bc46d79b5e75 jaxp144_01.zip +bc95c133620bd68c161cac9891592901 jdk6-jaf-b20.zip +dc6a1e28a97d897d7a1057c11696727d icedtea-hotspot-uclibc-fixes.patch +7c0814181e5adc0763c5c0a24b01d4cb icedtea-jdk-iconv-uclibc.patch +dae2ba8b87e2106b53974ace07e4ca72 icedtea-jdk-execinfo.patch +c4bb40d5b1ff690b27900c5cd06bc1e5 icedtea-jdk-no-lib-nsl.patch" |