# Contributor: Timo Teras # Contributor: Jakub Jirutka # Maintainer: Timo Teras pkgname=openjdk8 _icedteaver=3.1.0 # pkgver is .. # Check http://icedtea.classpath.org/wiki/Main_Page when updating! pkgver=8.101.13 pkgrel=1 pkgdesc="OpenJDK 8 provided by IcedTea" url="http://icedtea.classpath.org/" arch="all" license="custom" depends="$pkgname-jre java-cacerts" options="sover-namecheck" makedepends="bash findutils tar zip file paxmark gawk util-linux libxslt autoconf automake linux-headers sed xz coreutils openjdk7 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 libxcomposite-dev" case $CARCH in x86) _jarch=i386;; x86_64) _jarch=amd64;; arm*) _jarch=arm;; *) _jarch="$CARCH";; esac _bootstrap_java_home="/usr/lib/jvm/java-1.7-openjdk" _java_home="/usr/lib/jvm/java-1.8-openjdk" _jrelib="$_java_home/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" sonameprefix="$pkgname:" subpackages="$pkgname-jre-lib:jrelib:noarch $pkgname-jre $pkgname-jre-base:jrebase $pkgname-doc $pkgname-demos" _dropsver=$_icedteaver _dropsurl="http://icedtea.classpath.org/download/drops/icedtea8/$_dropsver" source="http://icedtea.classpath.org/download/source/icedtea-$_icedteaver.tar.gz openjdk-$_dropsver.tar.xz::$_dropsurl/openjdk.tar.xz corba-$_dropsver.tar.xz::$_dropsurl/corba.tar.xz jaxp-$_dropsver.tar.xz::$_dropsurl/jaxp.tar.xz jaxws-$_dropsver.tar.xz::$_dropsurl/jaxws.tar.xz jdk-$_dropsver.tar.xz::$_dropsurl/jdk.tar.xz langtools-$_dropsver.tar.xz::$_dropsurl/langtools.tar.xz hotspot-$_dropsver.tar.xz::$_dropsurl/hotspot.tar.xz nashorn-$_dropsver.tar.xz::$_dropsurl/nashorn.tar.xz icedtea-hotspot-musl.patch icedtea-hotspot-noagent-musl.patch icedtea-hotspot-uclibc-fixes.patch icedtea-jdk-execinfo.patch icedtea-jdk-fix-ipv6-init.patch icedtea-jdk-fix-libjvm-load.patch icedtea-jdk-musl.patch icedtea-jdk-includes.patch icedtea-autoconf-config.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 } prepare() { cd "$builddir" # Busybox sha256 does not support longopts. sed -e "s/--check/-c/g" -i Makefile.am local patch; 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() { export JAVA_HOME="$_bootstrap_java_home" export PATH="$JAVA_HOME/bin:$PATH" if [ -z "$JOBS" ]; then export JOBS=$(printf '%s\n' "$MAKEFLAGS" | sed -n -e 's/.*-j\([0-9]\+\).*/\1/p') fi DISTRIBUTION_PATCHES="" local patch; for patch in $source; do case $patch in icedtea-*.patch) DISTRIBUTION_PATCHES="$DISTRIBUTION_PATCHES patches/$patch" ;; esac done export DISTRIBUTION_PATCHES echo "icedtea patches: $DISTRIBUTION_PATCHES" cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix="$_java_home" \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --disable-dependency-tracking \ --disable-downloading \ --with-parallel-jobs=${JOBS:-2} \ --with-openjdk-src-zip="$srcdir/openjdk-$_dropsver.tar.xz" \ --with-hotspot-src-zip="$srcdir/hotspot-$_dropsver.tar.xz" \ --with-corba-src-zip="$srcdir/corba-$_dropsver.tar.xz" \ --with-jaxp-src-zip="$srcdir/jaxp-$_dropsver.tar.xz" \ --with-jaxws-src-zip="$srcdir/jaxws-$_dropsver.tar.xz" \ --with-jdk-src-zip="$srcdir/jdk-$_dropsver.tar.xz" \ --with-langtools-src-zip="$srcdir/langtools-$_dropsver.tar.xz" \ --with-nashorn-src-zip="$srcdir/nashorn-$_dropsver.tar.xz" \ --with-pax=paxmark \ --with-jdk-home="$_bootstrap_java_home" \ --with-pkgversion="Alpine ${pkgver}-r${pkgrel}" \ || return 1 make || return 1 } package() { cd "$builddir" mkdir -p "$pkgdir"/$_java_home cp -a openjdk.build/images/j2sdk-image/* "$pkgdir"/$_java_home/ || return 1 rm "$pkgdir"/$_java_home/src.zip # This archive contains absolute paths from the build environment, # so it does not work on the target system. User can generate it # running `java -Xshare:dump`. rm "$pkgdir"/$_jrelib/server/classes.jsa # pax mark again (due to fakeroot xattr handling bug) ./pax-mark-vm "$pkgdir"/$_java_home # symlink to shared java cacerts store rm -f "$pkgdir"/$_java_home/jre/lib/security/cacerts ln -sf /etc/ssl/certs/java/cacerts \ "$pkgdir"/$_java_home/jre/lib/security/cacerts } jrelib() { pkgdesc="OpenJDK 8 Java Runtime (class libraries)" depends="" local file dir for file in 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 dir=${file%/*} mkdir -p "$subpkgdir"/$_java_home/$dir mv "$pkgdir"/$_java_home/$file "$subpkgdir"/$_java_home/$dir || return 1 done } jre() { pkgdesc="OpenJDK 8 Java Runtime" local file dir mkdir -p "$subpkgdir" for file in jre/bin/policytool \ bin/appletviewer \ bin/policytool \ jre/lib/$_jarch/libawt_xawt.so \ jre/lib/$_jarch/libfontmanager.so \ jre/lib/$_jarch/libjawt.so \ jre/lib/$_jarch/libjsoundalsa.so \ jre/lib/$_jarch/libsplashscreen.so; do dir=${file%/*} mkdir -p "$subpkgdir"/$_java_home/$dir mv "$pkgdir"/$_java_home/$file "$subpkgdir"/$_java_home/$dir || return 1 done # Pax mark again (due to fakeroot xattr handling bug). "$builddir"/pax-mark-vm "$subpkgdir"/$_java_home } jrebase() { pkgdesc="OpenJDK 8 Java Runtime (no GUI support)" depends="$pkgname-jre-lib java-common java-cacerts" mkdir -p "$subpkgdir"/$_java_home/bin \ "$subpkgdir"/$_java_home/lib/$_jarch mv "$pkgdir"/$_java_home/lib/$_jarch/jli \ "$subpkgdir"/$_java_home/lib/$_jarch/ || return 1 local file; for file in java orbd rmid servertool unpack200 keytool \ pack200 rmiregistry tnameserv; do mv "$pkgdir"/$_java_home/bin/$file "$subpkgdir"/$_java_home/bin/ || return 1 done # Rest of the jre subdir (which were not taken by -jre subpkg). mv "$pkgdir"/$_java_home/jre "$subpkgdir"/$_java_home/ || return 1 # Pax mark again (due to fakeroot xattr handling bug). "$builddir"/pax-mark-vm "$subpkgdir"/$_java_home } doc() { default_doc || return 1 mkdir -p "$subpkgdir"/$_java_home/ mv "$pkgdir"/$_java_home/man "$subpkgdir"/$_java_home/ } demos() { pkgdesc="OpenJDK 8 Java Demos and Samples" depends="$pkgname" mkdir -p "$subpkgdir"/$_java_home/ mv "$pkgdir"/$_java_home/demo "$pkgdir"/$_java_home/sample \ "$subpkgdir"/$_java_home/ } md5sums="7b54dacd18f3adc0d77008d15db2b5c6 icedtea-3.1.0.tar.gz 1b9b9e9102abfc387acb4d244580fb9a openjdk-3.1.0.tar.xz d697eb0b8df5ee5242768be1678f1684 corba-3.1.0.tar.xz a3cbe28e27ebff38c8475ecae56ad446 jaxp-3.1.0.tar.xz 92da27a8622b92ee60ca67452f695927 jaxws-3.1.0.tar.xz e2143b152be03f3ec66313294606c100 jdk-3.1.0.tar.xz 39c75541d8bbe9be9cfd7f58c0950641 langtools-3.1.0.tar.xz d4d70521fee922201c309a64be22b239 hotspot-3.1.0.tar.xz 3c266698f3b192fd5616ce9548d1ead2 nashorn-3.1.0.tar.xz 2f4a5b0ec7a2bf7ab609da10b86dca4c icedtea-hotspot-musl.patch bd148291e75d536972cb2b1b68e5cb05 icedtea-hotspot-noagent-musl.patch 43023861c5f6efc3139a834aa3ec0476 icedtea-hotspot-uclibc-fixes.patch bdea7060a067faf1c2de5f4eb6e8525d icedtea-jdk-execinfo.patch 250b0807b59762670954b132e8f8dfba icedtea-jdk-fix-ipv6-init.patch 4dcba8ae18346298c0d0b817f6922415 icedtea-jdk-fix-libjvm-load.patch b708c7630efb0b0fe7bb3eca58cb1629 icedtea-jdk-musl.patch da4b0b67d9b5c7f742bcea70722acd94 icedtea-jdk-includes.patch d13bf1213635a702611af295d3977fe1 icedtea-autoconf-config.patch" sha256sums="694477835af753d59b5f03f4939a6015d7d4a00e5e5bb3d5c9e3e5186d3163e1 icedtea-3.1.0.tar.gz c19f7ffaec510db20b3c66b6447040012c28df319ab1dcfaf0a41c0e807bdddc openjdk-3.1.0.tar.xz 5e334d4250de441517c0e761a3202dfdf4beacb75c0f7a03617b62d89cb71c21 corba-3.1.0.tar.xz 6d58edfd2b7f07b4d543910f7525fe08d94d56899b96493efce217b4a226aca3 jaxp-3.1.0.tar.xz 811ad76dfcffe1e6f2ef39a088f27a8858ed3371ef93816c8dc453f90516c7d7 jaxws-3.1.0.tar.xz 83880a4b865e33e7913bec603da1e5439ea3602b3540d8071408de7bef8162a9 jdk-3.1.0.tar.xz 2a7f8dd0b0c1b256c58b8e841033b7915beb08d983350f9a9357115a05677f1d langtools-3.1.0.tar.xz 33581ea3ef4deffa786be82e110ae3d6b0431cc56140eb51453af1f11962b174 hotspot-3.1.0.tar.xz 56b36f5f7c073b140f8316084a23080553d8790d9f1f7e6d6288c6b0fd45cd7f nashorn-3.1.0.tar.xz ed114e8d00d6ed1295f5995df02ad13d3d0cd242f7a904600d93b6564856f8df icedtea-hotspot-musl.patch c14529a29bfdfb51bf5b4a41c977039073f470758e31235d043d373b48d46a11 icedtea-hotspot-noagent-musl.patch 0ef7592b8f2c954eda0a6cf4dc4a4010942f35ea426f44e34412be6c9a949745 icedtea-hotspot-uclibc-fixes.patch a35d40f24098747cdb73d9c3742cfb4aecafa0f72c9dfdfe2cb460f9706ff665 icedtea-jdk-execinfo.patch 632683ec88a6fb250ef043aae9cace605d0c669b7058f8c47b62b09b03ecc6c5 icedtea-jdk-fix-ipv6-init.patch c0f7e07293883142d7d7776c9e43a3bba7d45e4abbce6dc0fb531d25ed836ed4 icedtea-jdk-fix-libjvm-load.patch 749f9a5644253caaa0dc5b1d3ee31ed61e1392fdd127d6c68eef367902fe834c icedtea-jdk-musl.patch 8f4edc784fd70b27f91a0acf05a1de19fc300a35852b74668332ed747ec52073 icedtea-jdk-includes.patch 51ced4c77b97744fd0ecfbeca3f94e2da1fc5072dac7830c141f70887c503c33 icedtea-autoconf-config.patch" sha512sums="5543f3ffcbf06afbdc94555361af9823707586769d95f6294865a0bfc5b1526aaf84d7b2bf826a481ef26d70b8b9a398f08e0d72654b5ca41c2ec0d2e6c68cd3 icedtea-3.1.0.tar.gz f2b40a39418e9df667a871293629cec85a8b43edd9051caf80961e1b92916e7a7509dfebaaf6c461ff0d51e6e8d653d7584de8ff35fb7229e8def6ee0f8ddadc openjdk-3.1.0.tar.xz 9b0ebefec9cdc6b653b7b88b2db4c7dd7aebe0e120c23e967cf3433837bc52c65b31da36034161d1c7ae18ddc18a2a5294b2a1469eeec23c7817ef1530909d67 corba-3.1.0.tar.xz e7e605937292f37aa8a5510f3bfda20ccdeee17d6cbe5a69260eddbb7f39733ef9dd7d91ffd3e968aee926d1c21b4ace2522cb28687915168baf070b0fe38354 jaxp-3.1.0.tar.xz 0fd71e75e38a90e4d74477c9c7a2843d3b7fb9430332fa18a1a2f36376918832f6091bc3f2de86900e332bb4fc11a480ce7aedafeaddc3fc93493944183dc42a jaxws-3.1.0.tar.xz 9fb70cd63412c4de7112fa1645b485ef5840dc21ff8fc35c12a10d843b879d6400a6109634351974257a1e12d2843ad4b22811d4d9662cbe2e2114838bd6cba8 jdk-3.1.0.tar.xz c6eb7b5287cb7dbf518ac9d7167b9e63df086b9abe893adfc72b7ba5d9e0a16861fa72b5fbb46ce58bd02cf837b81d03cd1b860dea947a9e58ff39a8d62411ee langtools-3.1.0.tar.xz 8fcd3934afb446cd683f991f99c2b22fbeee607a1221665d7300d1e8d53740d7d2fee7894ccc53cddb02b902acaff68fd3ca1454dc244feeb641f5d5fd6308b4 hotspot-3.1.0.tar.xz 61f060f02a8852681212ac26018de0ad3403156f9c1fb984c658fa31bc4e58a0da588188c57d629da022b32c763c2f5915a8938997c6f94b127ceacde8d050f9 nashorn-3.1.0.tar.xz ada3bc4024682bfb86ebf3850d3a36cf4c0f0677a6d56eac2e0959b92bfe759010d5b9c801b043cae3ca8418d7819546ae245ac163df83e48c5d4b34478daeb0 icedtea-hotspot-musl.patch 3c592a14f1806a431290a96a8c1413ca1cc621e73a87ed778fa98878c82809bd924072210d4e4127a6c0c32ff557d749f6c9b3ce31cbca083b013240b618b224 icedtea-hotspot-noagent-musl.patch 822eee0dc4d3ba677a289dfeb3668b536d2d626708390a9d9702fb4144a481fd443a215a0d2041c6026113837aafa4ba0b5e9ead8589d2da6717a238bbc95a5a icedtea-hotspot-uclibc-fixes.patch f6365cfafafa008bd6c1bf0ccec01a63f8a39bd1a8bc87baa492a27234d47793ba02d455e5667a873ef50148df3baaf6a8421e2da0b15faac675867da714dd5f icedtea-jdk-execinfo.patch 48533f87fc2cf29d26b259be0df51087d2fe5b252e72d00c6ea2f4add7b0fb113141718c116279c5905e03f64a1118082e719393786811367cf4d472b5d36774 icedtea-jdk-fix-ipv6-init.patch b135991c76b0db8fa7c363e0903624668e11eda7b54a943035c214aa4d7fc8c3e8110ed200edcec82792f3c9393150a9bd628625ddf7f3e55720ff163fbbb471 icedtea-jdk-fix-libjvm-load.patch dc41a132e310101dfdd0d3e17eba8a53acb67392ab0d16cf09d24084ab467921a9ebfa33cde0e4e63e65c55ce7edcaf12edee10eea66e37b12ac9dba0419ac61 icedtea-jdk-musl.patch c6caaa69a75dfcf922f7a700a4c780568ead18e8774b9df2c1d86d1ab9f5a21c239952c4053f0f839b4255c0da69d2f42cdd87637db7cf5333076872f63580e0 icedtea-jdk-includes.patch 662d662d0a7a84be2978e921317589f212f3ba3b7629527ba0f1140b5ac4c1024893e0ed176211688ed1a4505968c4befc841ed57ffcdbb9d355c2cb0571b167 icedtea-autoconf-config.patch"