# Contributor: Timo Teras # Maintainer: Timo Teras pkgname=openjdk7 _icedteaver=2.6.2 # pkgver is . # check icedtea JDK when updating pkgver=7.91.$_icedteaver pkgrel=1 pkgdesc="Sun OpenJDK 7 via IcedTea" url="http://icedtea.classpath.org/" arch="all" license="GPL2 with Classpath" depends="$pkgname-jre" options="sover-namecheck" makedepends="bash findutils tar zip file paxmark gawk util-linux libxslt autoconf automake linux-headers ca-certificates nss-dev cups-dev jpeg-dev giflib-dev libpng-dev libxt-dev lcms2-dev libxp-dev libxtst-dev libxinerama-dev zlib-dev libxrender-dev alsa-lib-dev freetype-dev fontconfig-dev gtk+2.0-dev krb5-dev attr-dev pcsc-lite-dev lksctp-tools-dev" install="" # upstream binary versions RHINO_VER=1.7.7 ANT_VER=1.9.2 case $CARCH in x86) _jarch=i386;; x86_64) _jarch=amd64;; arm*) _jarch=arm # openjdk has quite a bit of arm assembly producing textrels # and it's non trivial to fix. allow it for now. options="$options textrels";; esac INSTALL_BASE=/usr/lib/jvm/java-1.7-openjdk _jrelib="$INSTALL_BASE/jre/lib/$_jarch" # exclude xawt from ldpath to avoid duplicate provides for libmawt.so # (also in headless). in future this should be a virtual provides. ldpath="$_jrelib:$_jrelib/native_threads:$_jrelib/headless:$_jrelib/server:$_jrelib/jli" somask="libjvm.so" subpackages="$pkgname-jre-lib:jrelib $pkgname-jre $pkgname-jre-base:jrebase $pkgname-doc:doc" if [ "$BOOTSTRAP" != "no" ]; then makedepends="$makedepends java-gcj-compat" BOOTSTRAP_JAVA_HOME=/usr/lib/jvm/java-1.5-gcj/ else makedepends="$makedepends $pkgname" BOOTSTRAP_JAVA_HOME="$INSTALL_BASE" fi _dropsver=$_icedteaver _dropsurl=http://icedtea.classpath.org/download/drops/icedtea7/$_dropsver source="http://icedtea.classpath.org/download/source/icedtea-$_icedteaver.tar.gz saveas-$_dropsurl/openjdk.tar.bz2/openjdk-$_dropsver.tar.bz2 saveas-$_dropsurl/corba.tar.bz2/corba-$_dropsver.tar.bz2 saveas-$_dropsurl/jaxp.tar.bz2/jaxp-$_dropsver.tar.bz2 saveas-$_dropsurl/jaxws.tar.bz2/jaxws-$_dropsver.tar.bz2 saveas-$_dropsurl/jdk.tar.bz2/jdk-$_dropsver.tar.bz2 saveas-$_dropsurl/langtools.tar.bz2/langtools-$_dropsver.tar.bz2 saveas-$_dropsurl/hotspot.tar.bz2/hotspot-$_dropsver.tar.bz2 http://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VER-bin.tar.gz https://github.com/mozilla/rhino/releases/download/Rhino$(echo ${RHINO_VER} | sed s'/\./_/g')_RELEASE/rhino$RHINO_VER.zip icedtea-hotspot-musl.patch icedtea-hotspot-noagent-musl.patch icedtea-hotspot-uclibc-fixes.patch icedtea-jdk-fix-build.patch icedtea-jdk-execinfo.patch icedtea-jdk-fix-ipv6-init.patch icedtea-jdk-musl.patch icedtea-jdk-no-soname.patch " # icedtea6-1.9.7-generate_cacerts-1.patch _builddir="$srcdir/icedtea-$_icedteaver" unpack() { if [ -z "$force" ]; then verify || return 1 initdcheck || return 1 fi mkdir -p "$srcdir" msg "Unpacking sources..." tar -C "$srcdir" -zxf icedtea-$_icedteaver.tar.gz || return 1 tar -C "$srcdir" -zxf apache-ant-$ANT_VER-bin.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.am for patch in $source; do case $patch in icedtea-*.patch) cp ../$patch patches ;; *.patch) msg "Applying patch $patch" patch -p1 -i "$srcdir"/$patch || return 1 ;; esac done ./autogen.sh } build() { [ -z "$JOBS" ] && export JOBS=`echo $MAKEFLAGS | sed -n -e 's/.*-j\([0-9]\+\).*/\1/p'` export ALT_PARALLEL_COMPILE_JOBS="${JOBS:-2}" export HOTSPOT_BUILD_JOBS="${JOBS:-2}" export JAVA_HOME=$BOOTSTRAP_JAVA_HOME export PATH=$JAVA_HOME/bin:$srcdir/apache-ant-$ANT_VER/bin:$PATH export DISTRIBUTION_PATCHES="" local patch for patch in $source; do case $patch in icedtea-*.patch) export DISTRIBUTION_PATCHES="$DISTRIBUTION_PATCHES patches/$patch" ;; esac done echo "icedtea patches: $DISTRIBUTION_PATCHES" cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=$INSTALL_BASE \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --with-parallel-jobs=${JOBS:-2} \ --disable-dependency-tracking \ --disable-downloading \ --with-rhino=$srcdir/rhino$RHINO_VER/js.jar \ --with-openjdk-src-zip=$srcdir/openjdk-$_dropsver.tar.bz2 \ --with-hotspot-src-zip=$srcdir/hotspot-$_dropsver.tar.bz2 \ --with-corba-src-zip=$srcdir/corba-$_dropsver.tar.bz2 \ --with-jaxp-src-zip=$srcdir/jaxp-$_dropsver.tar.bz2 \ --with-jaxws-src-zip=$srcdir/jaxws-$_dropsver.tar.bz2 \ --with-jdk-src-zip=$srcdir/jdk-$_dropsver.tar.bz2 \ --with-langtools-src-zip=$srcdir/langtools-$_dropsver.tar.bz2 \ --with-pax=paxmark \ --with-jdk-home=$BOOTSTRAP_JAVA_HOME \ --with-pkgversion="Alpine ${pkgver}-r${pkgrel}" \ || 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 # pax mark again (due to fakeroot xattr handling bug) $_builddir/pax-mark-vm "$pkgdir"/$INSTALL_BASE } jrelib() { pkgdesc="OpenJDK 7 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 7 Java Runtime (no GUI support)" depends="$pkgname-jre-lib java-common" # manually provide this to avoid clash with libgcj's libjvm.so provides="so:openjdk7:libjvm.so=0" 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 # pax mark again (due to fakeroot xattr handling bug) $_builddir/pax-mark-vm "$subpkgdir"/$INSTALL_BASE } jre() { pkgdesc="OpenJDK 7 Java Runtime" # manually depend to avoid clash with libgcj's libjvm.so depends="so:openjdk7:libjvm.so=0" mkdir -p "$subpkgdir" for A in jre/bin/policytool \ bin/appletviewer \ bin/policytool \ jre/lib/$_jarch/xawt \ jre/lib/$_jarch/libsplashscreen.so ; do dirname=${A%/*} mkdir -p "$subpkgdir"/$INSTALL_BASE/$dirname mv "$pkgdir"/$INSTALL_BASE/$A "$subpkgdir"/$INSTALL_BASE/$dirname done # pax mark again (due to fakeroot xattr handling bug) $_builddir/pax-mark-vm "$subpkgdir"/$INSTALL_BASE } doc() { default_doc mkdir -p "$subpkgdir"/$INSTALL_BASE/ mv "$pkgdir"/$INSTALL_BASE/man "$subpkgdir"/$INSTALL_BASE/ } md5sums="a16b3e800030db9d9b35f80dfd11883a icedtea-2.6.2.tar.gz d63c5b401aaa9ef76d1dbd87943aa387 openjdk-2.6.2.tar.bz2 500547dc50acde20fad18d0645be89c4 corba-2.6.2.tar.bz2 793fb78b5f51323e31785bb89292182f jaxp-2.6.2.tar.bz2 131e2f619455e37cea74ca710e6ada6d jaxws-2.6.2.tar.bz2 6e8061b2b7c22163ab149fb66553eda8 jdk-2.6.2.tar.bz2 1cebffc6b56e9efdbe08eff018801cb1 langtools-2.6.2.tar.bz2 5ffb731931226fbff870b80a377f6258 hotspot-2.6.2.tar.bz2 9a2826a1819aa128629778217af36c55 apache-ant-1.9.2-bin.tar.gz 3f68c59471170f7bd574828e01b33a09 rhino1.7.7.zip f87dd2c4c3c97fc3ac33080a65ca9e14 icedtea-hotspot-musl.patch bf8b50e157d80a8b884c1aa4f8124812 icedtea-hotspot-noagent-musl.patch 43023861c5f6efc3139a834aa3ec0476 icedtea-hotspot-uclibc-fixes.patch 07c7ab583808e8c8ceb46aff9c265aa4 icedtea-jdk-fix-build.patch bd623081d5d2e63694c3649975b12412 icedtea-jdk-execinfo.patch 250b0807b59762670954b132e8f8dfba icedtea-jdk-fix-ipv6-init.patch 66f6e66eb135f0d88847910f6581d323 icedtea-jdk-musl.patch d014431e70cdabb82a75e4b9ae4c28a9 icedtea-jdk-no-soname.patch" sha256sums="c19eafacd23c81179934acab123511c424cd07c094739fa33778bf7cc80e14d0 icedtea-2.6.2.tar.gz 4911adb6d7877b014777b6db6d90f1d1626314bd0c6a2c9cf9911d1e11eb4b49 openjdk-2.6.2.tar.bz2 92fa1e73dc0eb463bccd9ce3636643f492b8935cb7a23b91c5d855f4641382af corba-2.6.2.tar.bz2 94cda3ba29ab3cd36d50f2e6c98a5e250eb6372379e171288b3022b978136fc0 jaxp-2.6.2.tar.bz2 14467736097197a199b483f24f8111e9c76252a2ad2a5f166c97585c0a3930d4 jaxws-2.6.2.tar.bz2 7ad801d5f6b61818c78f2f39931df24d8c6f6a1c821180c998975ac884eb8af1 jdk-2.6.2.tar.bz2 a53fe8912b8190d82615778cf8bfb77202a55adcdc5bacc56ce7738b6a654335 langtools-2.6.2.tar.bz2 984918bcb571fecebd490160935bb282c60eb9e17b4fc8fc77733d8da164c33a hotspot-2.6.2.tar.bz2 cab1b8754e5f1f2aa869e2ba603903ae5e81a585de4eafd00f173531a11b5a45 apache-ant-1.9.2-bin.tar.gz 6ce56b4809d1e7723fd2918dcb093b594f30941194361d4aa2b699f68e897d47 rhino1.7.7.zip a7922430cb767c8a4baae232c8b2e5f377aeb7cfde0c9901cd7774f078e7f92e icedtea-hotspot-musl.patch 1d937de95323094294c33dd490fc460f78502259eee3bf4b352ac7c7c6cf626f icedtea-hotspot-noagent-musl.patch 0ef7592b8f2c954eda0a6cf4dc4a4010942f35ea426f44e34412be6c9a949745 icedtea-hotspot-uclibc-fixes.patch 33b18e827a13cc46be11a4491deefac171c8c2c4fbdd3e0cb4a5fdafa560f958 icedtea-jdk-fix-build.patch 6cebef19d8eec5a4623a96c37ae71b79d124a10478c1db33ad5fc71bc04b30e9 icedtea-jdk-execinfo.patch 632683ec88a6fb250ef043aae9cace605d0c669b7058f8c47b62b09b03ecc6c5 icedtea-jdk-fix-ipv6-init.patch b3f82269f69483d3fe137e369f9325003ce7872d886cdf67705b434ce949b5bc icedtea-jdk-musl.patch 6c0bbe710395c4ced1359ab279be6a7c36da5bfb9fd60dc47d920f06a0456d82 icedtea-jdk-no-soname.patch" sha512sums="247ba454b3433f867727fb5cc460f021213b6b7033c5a98bf205ff135251f76e3a588ed0647658e362a433e41e148310e6515a81b19311bf073172299d836498 icedtea-2.6.2.tar.gz e3a61447569e39817e7c7ebf0a8fadaf0c708dfee2815a8f576b6d5fa91479ecf2f7fd30285b9d18c8286f3911f2ddc226d8f8da1219da8c2c80fa1fbf47607c openjdk-2.6.2.tar.bz2 819974b10fe3d0ba15e45da843b3bc908e7caafb9fe264c43026bfa1a10daecef6e4cf23bd486f89cae0d6952ef812a170cf297a934679fc6dec29ca941c4826 corba-2.6.2.tar.bz2 d0aa1a744b3f5522fe2264af26766a3945d7b5e4555b229a9f837b457bafe068111fdae6ac3d7349ce8907e0b1c747a0b31a11936e4794f646b5827cca5cde0c jaxp-2.6.2.tar.bz2 3dd649f7565a449e831f14c2242e0fe9126f62380aa166bff627557774656c1604f8512ec93ec3ae243a851000b0fc014767de8ad58df8bb8892c88b8465d0e0 jaxws-2.6.2.tar.bz2 8107583bd87227460d030f0cab87d526e8aa097f073ccedb21eb634affc9e22ae908b722d92f9c9357d2d3f50c65a48a9f5b62cd86845dbdfd37bbc0750edff2 jdk-2.6.2.tar.bz2 e049b6ec3abf28de05e96c882add05e87ea2edb75219e94739e4ea2e543166c9a663be43a2c2c82c95fe14b457eb675b8d1b96a4a289888941cd0b1b67b7539a langtools-2.6.2.tar.bz2 37c80f977b22e6cab2bda5c2f579f016feb0f910bc5c7b4426f22983e74eb53c6b495681301cfd60e0773034c93ca2a60af512275cff4851a2857c2eb338b769 hotspot-2.6.2.tar.bz2 618c0c3d80f7c44c2bb8cdfdc2b5278ccd926ab1aa0c8f7099bd0ad5cb4c090f023c0b86c8267052a0a6b1ac57076296fcc16042b9e7a72a1482af63c99e0e49 apache-ant-1.9.2-bin.tar.gz fed7cad242eac105d0cc7dc668b4403c424080e17c8684ba02f11810afaa340c25e12526a00e3de5eaf9d93256824e3bb0bbf2051934d8d18d1ee88f44f30ee7 rhino1.7.7.zip 994e8a79a0a23f26d633bf2ce9dad62198c699892f6e7729cc6e509481330399bb2ba736514b516fd2b3dd125fd6c74a127ae7f16d643c3f6a69776737cdb933 icedtea-hotspot-musl.patch e7a2c1771bb582d427041f8d22e48c0daf8f20d7c0926cbce3549d49c4e949359ee25a35682b486e82f3e390535c950c5beee3bd8d06fb5a717b50f2d9b2a6bc icedtea-hotspot-noagent-musl.patch 822eee0dc4d3ba677a289dfeb3668b536d2d626708390a9d9702fb4144a481fd443a215a0d2041c6026113837aafa4ba0b5e9ead8589d2da6717a238bbc95a5a icedtea-hotspot-uclibc-fixes.patch 213a537de5f011cb39d608515c3413513ac75fb93593f9a9ef4205f71d72bdd8b097c80db185f7b26021d5bb85045b866f34f3478482dc4189972d8614a13458 icedtea-jdk-fix-build.patch 0391970e6a32946aa3cccf38fdef9c0fe2af26cd0df824b98aa2fcfa1bf661d4a68e339bffcfd16f386c565fc68bb28a29208a67d4bad8a0e847ad02bd8becbb icedtea-jdk-execinfo.patch 48533f87fc2cf29d26b259be0df51087d2fe5b252e72d00c6ea2f4add7b0fb113141718c116279c5905e03f64a1118082e719393786811367cf4d472b5d36774 icedtea-jdk-fix-ipv6-init.patch 44a35941c80f408d0607e32763b3b6ccee21e1d39886309327d3d74d2900117e4346ef59e77c663fd022fec10ee8f365eeb46c1260014d5765d226ce175ce3c5 icedtea-jdk-musl.patch bf4b184e170f7b0ff64ab30d2162784fe2bd5460d1fa31973259f7065fd4c511c46f97724fe2bd72bb94e9006cb568d0e0c87d1a9c90819e65880f8f44830bb1 icedtea-jdk-no-soname.patch"