# Contributor: Timo Teras # Maintainer: Timo Teras pkgname=openjdk8 _java_ver=8 _jdk_update=72 _jdk_build=15 pkgver=$_java_ver.$_jdk_update.$_jdk_build pkgrel=1 pkgdesc="Sun OpenJDK 8" url="http://openjdk.java.net" arch="x86_64 x86" 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 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" install="" case $CARCH in x86) _jarch=i386;; x86_64) _jarch=amd64;; arm*) _jarch=arm;; esac INSTALL_BASE=/usr/lib/jvm/java-1.8-openjdk BOOTSTRAP_JAVA_HOME=/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" sonameprefix="$pkgname:" subpackages="$pkgname-jre-lib:jrelib $pkgname-jre $pkgname-jre-base:jrebase $pkgname-doc:doc $pkgname-demos:demos" _dropsurl=http://hg.openjdk.java.net/jdk8u/jdk8u _dropsver=jdk${_java_ver}u${_jdk_update}-b${_jdk_build} source="saveas-$_dropsurl/archive/${_dropsver}.tar.bz2/jdk8u-$_dropsver.tar.bz2 saveas-$_dropsurl/corba/archive/${_dropsver}.tar.bz2/corba-$_dropsver.tar.bz2 saveas-$_dropsurl/jaxp/archive/${_dropsver}.tar.bz2/jaxp-$_dropsver.tar.bz2 saveas-$_dropsurl/jaxws/archive/${_dropsver}.tar.bz2/jaxws-$_dropsver.tar.bz2 saveas-$_dropsurl/jdk/archive/${_dropsver}.tar.bz2/jdk-$_dropsver.tar.bz2 saveas-$_dropsurl/langtools/archive/${_dropsver}.tar.bz2/langtools-$_dropsver.tar.bz2 saveas-$_dropsurl/nashorn/archive/${_dropsver}.tar.bz2/nashorn-$_dropsver.tar.bz2 saveas-$_dropsurl/hotspot/archive/${_dropsver}.tar.bz2/hotspot-$_dropsver.tar.bz2 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-musl.patch icedtea-jdk-includes.patch fix-libjvm-load.patch build-demo-ldflags.patch " _builddir="$srcdir/jdk8u-$_dropsver" prepare() { cd "$_builddir" update_config_sub || return 1 local module for module in corba hotspot jdk jaxws jaxp langtools nashorn; do ln -s ../${module}-${_dropsver} ${module} done for patch in $source; do case $patch in *.patch) msg "Applying patch $patch" busybox patch -p1 < "$srcdir"/$patch || return 1 ;; esac done } build() { cd "$_builddir" unset JAVA_HOME export MAKEFLAGS=${MAKEFLAGS/-j*} sh ./configure \ --build=$CBUILD \ --host=$CHOST \ --target=$CTARGET \ --prefix=$INSTALL_BASE \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --with-update-version="${_jdk_update}" \ --with-build-number="b${_jdk_build}" \ --with-user-release-suffix="alpine-r${pkgrel}" \ --enable-unlimited-crypto \ --with-zlib=system \ --with-giflib=system \ --with-extra-cflags="$CFLAGS" \ --with-extra-cxxflags="$CXXFLAGS" \ --with-extra-ldflags="$LDFLAGS" \ --disable-freetype-bundling \ --with-boot-jdk="$BOOTSTRAP_JAVA_HOME" \ || return 1 make DEBUG_BINARIES=true || return 1 make docs || return 1 # agent was patched off; make empty sa-jdi.jar to make image builder happy local build for build in build/* ; do touch $build/jdk/lib/sa-jdi.jar done make images || return 1 } list_paxables() { file "$@" 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//' } pax_mark_vm() { local paxflags="-mp" [ "$CARCH" = "x86" ] && paxflags="-msp" for paxable in $(list_paxables "${1}"/bin/* "${1}"/jre/bin/*); do echo "PaX mark $paxflags ${paxable}" paxmark $paxflags "${paxable}" done } package() { mkdir -p "$pkgdir"/$INSTALL_BASE cp -a "$_builddir"/build/*/images/j2sdk-image/* "$pkgdir"/$INSTALL_BASE rm "$pkgdir"/$INSTALL_BASE/src.zip find "$pkgdir"/$INSTALL_BASE -iname "*.diz" -delete || return 1 find "$pkgdir"/$INSTALL_BASE -iname "*.debuginfo" -delete || return 1 find "$pkgdir"/$INSTALL_BASE \( -name "*.jar" -o -name "*.sym" \) \ \! -perm /006 | xargs chmod go+r || return 1 pax_mark_vm "$pkgdir"/$INSTALL_BASE # symlink to shared java cacerts store rm -f "$pkgdir"/$INSTALL_BASE/jre/lib/security/cacerts ln -sf /etc/ssl/certs/java/cacerts \ "$pkgdir"/$INSTALL_BASE/jre/lib/security/cacerts } jrelib() { pkgdesc="OpenJDK 8 Java Runtime (class libraries)" arch="noarch" depends="" for A 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 dirname=${A%/*} mkdir -p "$subpkgdir"/$INSTALL_BASE/$dirname mv "$pkgdir"/$INSTALL_BASE/$A "$subpkgdir"/$INSTALL_BASE/$dirname done } jrebase() { pkgdesc="OpenJDK 8 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 pax_mark_vm "$subpkgdir"/$INSTALL_BASE } jre() { pkgdesc="OpenJDK 8 Java Runtime" mkdir -p "$subpkgdir" for A in jre/bin/policytool \ bin/appletviewer \ bin/policytool \ jre/lib/$_jarch/libawt_xawt.so \ 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_vm "$subpkgdir"/$INSTALL_BASE } doc() { default_doc mkdir -p "$subpkgdir"/$INSTALL_BASE/ mv "$pkgdir"/$INSTALL_BASE/man "$subpkgdir"/$INSTALL_BASE/ } demos() { pkgdesc="OpenJDK 8 Java Demos and Samples" depends="$pkgname" mkdir -p "$subpkgdir"/$INSTALL_BASE/ mv "$pkgdir"/$INSTALL_BASE/demo "$pkgdir"/$INSTALL_BASE/sample \ "$subpkgdir"/$INSTALL_BASE/ } md5sums="161dfcff6fbf49649b35c86fa5bbc2b4 jdk8u-jdk8u72-b15.tar.bz2 c822b9ac498d5bfbaa82ce6fa1c126a4 corba-jdk8u72-b15.tar.bz2 fc20a017e3d3598de65240bc9a2ffbbc jaxp-jdk8u72-b15.tar.bz2 669f95ee39534dcbbe538cb59bc78742 jaxws-jdk8u72-b15.tar.bz2 58fa5f03c7da51a07c000881ca8e1b1b jdk-jdk8u72-b15.tar.bz2 b85df8468b42a7c14c5d55e84339a2dd langtools-jdk8u72-b15.tar.bz2 1f9358090dc4ba710a14f31115de7c5f nashorn-jdk8u72-b15.tar.bz2 67a98eef6eed6fde18ec5e422bbdd074 hotspot-jdk8u72-b15.tar.bz2 f87dd2c4c3c97fc3ac33080a65ca9e14 icedtea-hotspot-musl.patch a5841507a216890bd8419d496bb118c3 icedtea-hotspot-noagent-musl.patch 43023861c5f6efc3139a834aa3ec0476 icedtea-hotspot-uclibc-fixes.patch bdea7060a067faf1c2de5f4eb6e8525d icedtea-jdk-execinfo.patch 250b0807b59762670954b132e8f8dfba icedtea-jdk-fix-ipv6-init.patch fc1dc983dc562eda399c9d7eabd3b299 icedtea-jdk-musl.patch fc7d3cc1f5a5615574fd1e416144a042 icedtea-jdk-includes.patch 9b95183ae088ac2520ac66ae587619e4 fix-libjvm-load.patch ea23c28032d50816a243d15afb2d8fb6 build-demo-ldflags.patch" sha256sums="58dfbc4be4d82ee4caa9d3ce77e9ef8f16b6bb519950d3200106b6684b9bd132 jdk8u-jdk8u72-b15.tar.bz2 24bd1c5b415ea7f1164cf83c93a337daee877e168400c08aaab53cd8d5cb3cb6 corba-jdk8u72-b15.tar.bz2 57fda6a6e9cfd876697e03b7cc6236c426bfa9bacdd3cd1d3b0f81e8539cc3e3 jaxp-jdk8u72-b15.tar.bz2 17c6efae78c11380bb0fcda115f1dbc5fc007de43e110e3a8205abdb6937d4e6 jaxws-jdk8u72-b15.tar.bz2 57bba30f9bfe19738472b04d2506c09faafa7fce5630f5628ae552b0d6b3ea7f jdk-jdk8u72-b15.tar.bz2 1861cfb14d5fdc96f3302399d390ce20efb2749cfae2622104a74d0739f05947 langtools-jdk8u72-b15.tar.bz2 bcb05ebaeae135dfe0b6fa0f9a235a38873b9607e8c10a45691213eae0d0c450 nashorn-jdk8u72-b15.tar.bz2 014ebea3e7c800f64f06ab921c83fb8bac0d2dcecdedf0069f842a02f52ce015 hotspot-jdk8u72-b15.tar.bz2 a7922430cb767c8a4baae232c8b2e5f377aeb7cfde0c9901cd7774f078e7f92e icedtea-hotspot-musl.patch 9223d4a1ae20b51bcb901ace115a2cd5f15b05655ea076c05f4c7f2c66f341e5 icedtea-hotspot-noagent-musl.patch 0ef7592b8f2c954eda0a6cf4dc4a4010942f35ea426f44e34412be6c9a949745 icedtea-hotspot-uclibc-fixes.patch a35d40f24098747cdb73d9c3742cfb4aecafa0f72c9dfdfe2cb460f9706ff665 icedtea-jdk-execinfo.patch 632683ec88a6fb250ef043aae9cace605d0c669b7058f8c47b62b09b03ecc6c5 icedtea-jdk-fix-ipv6-init.patch d3fcf4779a23181178e722a93290921f5c61ed7220d3a431953a53c24f89e562 icedtea-jdk-musl.patch 38590e411b7bf9b99f5168709b975e1c432ef600915800c709a6617504e2c13a icedtea-jdk-includes.patch 47028d87c9a65df8d0103b39bf54b2b22de7db7c52a5de1058f88f4c5ea24f0d fix-libjvm-load.patch eebfb2613ae342587e8477a1022703ac986ed59e941ec1e96b2a3264c67c587b build-demo-ldflags.patch" sha512sums="63635f4fb2872a3a635134a1a72cb6c865f370cc9f3c4a868c8c4fbc80d6f6a591214e647f12a03b9a937b090326e2b8332c82aee0e036d7963103c377a63fb5 jdk8u-jdk8u72-b15.tar.bz2 308501b7a940f077f2a07b6550020a47d1fa92f733d240d3bf214585a249c452a3ff4b5e7c3889bf7e8552fa45d5404d3256d33ce7551448829620c4f8543fb5 corba-jdk8u72-b15.tar.bz2 f6e7c26592cc0f589444ff5e57d73eb83b0fec6a6dec28ce1182f7558986269290dbd95c991246fd62a9ac7a786790a37659a032328f2f0707eaaaab846ef063 jaxp-jdk8u72-b15.tar.bz2 ad434ec7c4fd7e84ab579a5ab82d2541fe7ae3b517b0bce7d7737ac72b8880995d927e38b834a7f43abdf3e74289cebd694a8c1ed203f965e8a552b87baea098 jaxws-jdk8u72-b15.tar.bz2 7ee3eb0f052f562406b8062ca1dde9ad97f1b0e83771fe34aaf7b65d47a106d0345fac91a4dc639a43dbece84b3d432478c3cacf6372ff56083a3b0e3063baec jdk-jdk8u72-b15.tar.bz2 969eeef7d35eb4d43f16d2442c0bf76ea0e877ee5f9b5cd0881adcbb32f4f2e7780b9c8a53b6ab873cd30229a9f4f2d4416388d079cd96a469bb14d21bbf1150 langtools-jdk8u72-b15.tar.bz2 6947883a7fdc42c5d0126661bd45b6c81af3e9506dbb367a217c061905362f866ab8aac37a2fc0f15b99020e98d5bb8c8f215db00dedfdd223899707d1212f1a nashorn-jdk8u72-b15.tar.bz2 d2d7623eca9ec41a3252712e7c8bbcb61dd3235dbc18da774a33c25b6fb98c66d7e3d6f4309549c74e3b4ffbfb4e4c4fbe191955722b535fc3606f0e58814c67 hotspot-jdk8u72-b15.tar.bz2 994e8a79a0a23f26d633bf2ce9dad62198c699892f6e7729cc6e509481330399bb2ba736514b516fd2b3dd125fd6c74a127ae7f16d643c3f6a69776737cdb933 icedtea-hotspot-musl.patch d930edbb830957729031228196720fa2d50747655a9289097103d36f852ab11b7198e18805bd89c6a438c3ccf224be48cda5f994b193ab1f81a72aada0df2b16 icedtea-hotspot-noagent-musl.patch 822eee0dc4d3ba677a289dfeb3668b536d2d626708390a9d9702fb4144a481fd443a215a0d2041c6026113837aafa4ba0b5e9ead8589d2da6717a238bbc95a5a icedtea-hotspot-uclibc-fixes.patch f6365cfafafa008bd6c1bf0ccec01a63f8a39bd1a8bc87baa492a27234d47793ba02d455e5667a873ef50148df3baaf6a8421e2da0b15faac675867da714dd5f icedtea-jdk-execinfo.patch 48533f87fc2cf29d26b259be0df51087d2fe5b252e72d00c6ea2f4add7b0fb113141718c116279c5905e03f64a1118082e719393786811367cf4d472b5d36774 icedtea-jdk-fix-ipv6-init.patch 2fd75bb52e7c9e3b56a383b72ee519d395413b000aef94ad00b106a692a199de34967bac1120164cebce5f71d302413742922a55cc6479b2d33258aaf7d03c1b icedtea-jdk-musl.patch 7df0db85039da8cbde49093ec3299f6804370f4134554a9c26c130a4e9e0b35409a3be833f3e90764ed16718683daffb6447261db8e5988f2e0519f649aedbc6 icedtea-jdk-includes.patch 978539ba0b1f1694cda6a3a1542a4373861cbfb4dc414a3b796cd8841ecf6e12248c746b5efe2c031c85a3b0684101b29e8a5f4ff70e77c1a3f3cd7f5cb148ce fix-libjvm-load.patch bcf9af85907b4f49f1aa470d21917280fcf9fc8892f089fe8c284ec3f2eccd57f799c7f06ce2ce641421d50396fa192cb71ccbb7a077958aacf57b8dadc80bc1 build-demo-ldflags.patch"