# Contributor: Timo Teras # Contributor: Jakub Jirutka # Maintainer: Timo Teras pkgname=openjdk8 _icedteaver=3.3.0 # pkgver is .. # Check http://icedtea.classpath.org/wiki/Main_Page when updating! pkgver=8.121.13 pkgrel=2 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 nss-static 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-dbg $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 fix-paxmark.patch 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}" \ --enable-nss \ --enable-sunec \ --enable-non-nss-curves \ || 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 -f "$pkgdir"/$_jrelib/server/classes.jsa # pax mark again (due to fakeroot xattr handling bug) ./pax-mark-vm "$pkgdir"/$_java_home true || return 1 # 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 true || return 1 } 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 true || return 1 } 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="eb6fc764df734e284cb485de909d7a31 icedtea-3.3.0.tar.gz 2d1c5467d3c7818ee7ec81d37c1bbbd4 openjdk-3.3.0.tar.xz 1bc8c5b63eca3918f1c4c934bf66b233 corba-3.3.0.tar.xz 2b3559177fead9ccb56db07191102870 jaxp-3.3.0.tar.xz 92612fa7cfecf27357743c932a091b9b jaxws-3.3.0.tar.xz 2a732b3f46453fb45b1a37b7c1ab3db8 jdk-3.3.0.tar.xz b10431e5823ac859de631e183b1d0b67 langtools-3.3.0.tar.xz e600f285d00ee367b4129450c35f113a hotspot-3.3.0.tar.xz 9cc3887801b7ad6c290c4adf4a742130 nashorn-3.3.0.tar.xz 5ac9306bf404251111cee6b9eff26bd4 fix-paxmark.patch 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 ae8b8d44db2ef9a1ee112823957d0ebd icedtea-jdk-musl.patch da4b0b67d9b5c7f742bcea70722acd94 icedtea-jdk-includes.patch d13bf1213635a702611af295d3977fe1 icedtea-autoconf-config.patch" sha256sums="ce74a343759bfe6a7332301835e7c6e77d01db588a1dab672816c9ce338474b1 icedtea-3.3.0.tar.gz 887c5bc24b068efced7d5209367149ca27d8fea330cd5a5fff7767c353b00921 openjdk-3.3.0.tar.xz 19492bdd85166ce55d0f85f96e1d3d0b21e61f4604349ea0b94f6a0aa1388b61 corba-3.3.0.tar.xz ba5933a2bbf04b0786fd5f046d43314f1b1b2bf2888c586521b37410783bccef jaxp-3.3.0.tar.xz a443f3243978a87a055ab103468878e5e072706ab0c82d1949ba869fc63571b6 jaxws-3.3.0.tar.xz 688e962ab13055eb6b8668bb48b50eecc7f02f5120b541cfa58f516f875f9f9d jdk-3.3.0.tar.xz 1b0b0fb49c81955573ce509e1801530faa6477e606192fec4b0f951904fb8ac0 langtools-3.3.0.tar.xz 280f706bb0aaada0903e9e907811ea12bc1c216fdaeb2694910f3a99217f6e89 hotspot-3.3.0.tar.xz 0ec045c9c4506f63602d86e72b0c3fdccd75fa95c47ee6a1238639274dc8e92d nashorn-3.3.0.tar.xz 79bff0b02da899cdc14040443f254a742bdd599ca21357e6c28a4ec35da0e2ac fix-paxmark.patch 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 f6965fb31ec44389acec74c98b438a43ee2349c18586b66c71baf6a0b5ccdc50 icedtea-jdk-musl.patch 8f4edc784fd70b27f91a0acf05a1de19fc300a35852b74668332ed747ec52073 icedtea-jdk-includes.patch 51ced4c77b97744fd0ecfbeca3f94e2da1fc5072dac7830c141f70887c503c33 icedtea-autoconf-config.patch" sha512sums="a419e71ff68d89dafc8ab4f98f81f01f199aa835a64ff9c34777fc3dcb9c0ba72bc3ab55ca39995e06c20d1e63df885f6bfc3dc7e6dff6f6efc24c6834fb51ab icedtea-3.3.0.tar.gz d98790823408e09f3fa9946ceeeda48187dddd3302625fc546d64a4ecc89967235c550af23c05368a90d8dd2ceb38c092cd3130958132d18d30692342bd1151e openjdk-3.3.0.tar.xz b1f44e1e41b3565bd45176f726e4d1c2999c5ff25a5f2e973f0e5836b7fd2cf6540eae83d3944b303677797e052abd950bb9748fb3e218e4c71b1ea059bf1209 corba-3.3.0.tar.xz 3addabc7478c8a443de5db5606b9eb71778484ed68943d3aa2b61c02bff993d3cb446333be7a5bfc90f8757d0125eb1f53f2483c60c79bb0f19e642e1696ddcd jaxp-3.3.0.tar.xz 1b83b0a90cf0c11220cae034d2f86ad51ff8f6d153dc22e8e9f65b8ec4de8f7148fd37356aa19098e6545967da3c53e87edac747adfa76e254c1fc9d31e4ec1b jaxws-3.3.0.tar.xz 60c932a057dc1869bec52ea73af2a21af9e622a196510d074c5d17c01bf7d98babd651f5577bafe96a832e6a54ded8704c4f7d964f0874edaf2222bdbe3c0c46 jdk-3.3.0.tar.xz 13065b54ca036ad11b8879d9ebaa725a823c25cda5b28f0092902bda2b8879cfd000d132916302f2661b63b03c0bec90d1adfe4863d38c201cfbdf74f1f942c6 langtools-3.3.0.tar.xz 8a593b1c9f022e7a3efa834c5547c59f1a2143f946edae2647a3368f9d4d39b9d473f36575d395e627e5bfac1f9cdef0efe607e0a81b40c46dca44ad6d59a65b hotspot-3.3.0.tar.xz c0aec36e921288b6ad11e71daa32111a4ee45302a2bbe407229cc143f05869372993f7b0dd366c07ecb31fac47e1d3cdb0c59cc1a48375d3719656c2159fee95 nashorn-3.3.0.tar.xz 1f470432275d5beaa8b4e4352a2f24a4a00593546dc4f3bd857794c89e521e8e6d6abc540762bbd769be3e1e3da058e134dc5dc066d12b9b8a1f0656040a795c fix-paxmark.patch 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 cdebe2c59657e7fd317a4841b2fbe95d9e8d7ee9d1593edf352ed7f49a92a42cbce82cbaa404d3f02c6d273eae03222a79559c09bf6cf439396c5ec5434f5458 icedtea-jdk-musl.patch c6caaa69a75dfcf922f7a700a4c780568ead18e8774b9df2c1d86d1ab9f5a21c239952c4053f0f839b4255c0da69d2f42cdd87637db7cf5333076872f63580e0 icedtea-jdk-includes.patch 662d662d0a7a84be2978e921317589f212f3ba3b7629527ba0f1140b5ac4c1024893e0ed176211688ed1a4505968c4befc841ed57ffcdbb9d355c2cb0571b167 icedtea-autoconf-config.patch"