diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-08-02 19:14:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-08-02 19:14:55 +0100 |
commit | b24bd25253fe093f722ab576d29fdc41d04cb1ee (patch) | |
tree | 0fcf2afd9f852c4d4c291cf8afaa2c244d598105 /dev-java/openjdk | |
parent | 121ed4eec41fbf03e1998d09eede1bf449da63b9 (diff) |
gentoo resync : 02.08.2019
Diffstat (limited to 'dev-java/openjdk')
-rw-r--r-- | dev-java/openjdk/Manifest | 11 | ||||
-rw-r--r-- | dev-java/openjdk/openjdk-11.0.4_p11.ebuild | 269 | ||||
-rw-r--r-- | dev-java/openjdk/openjdk-8.222_p10.ebuild | 255 |
3 files changed, 535 insertions, 0 deletions
diff --git a/dev-java/openjdk/Manifest b/dev-java/openjdk/Manifest index e7d600f7d673..a939bc475eea 100644 --- a/dev-java/openjdk/Manifest +++ b/dev-java/openjdk/Manifest @@ -2,14 +2,25 @@ AUX generate-cacerts.pl 11051 BLAKE2B e6d54319153735bd4b445581dfbd2b78e2e27a19f3 AUX openjdk-11.env.sh 537 BLAKE2B 404aeaf3d4df54b66193b8e09521ad2e55a23dc0603beea9911e4c91ab96e30c0f4aa4a0e96b1982874e055af3b9923689657b58dc02b37f91163659343ed2f9 SHA512 f4a41891b0187048a21b1af43053375e62de249e3ba210c3cfd59178c9f4c667ff83f10ee85f9ae37db097e862ff7233f5136569d0cb1399dbf48cea075cfc6e AUX openjdk-8.env.sh 746 BLAKE2B b8a18bb5e2dd3c4722b78531428d4291236a6295973fdcd65c64469b3a49a520686ff8d884c0b3d5dd9017ff4027d2fc1d78d57f062a4cf8910e0bab3ed444cc SHA512 2c65d1875406deabbfadb798501de15850775a4a049f073cdfda684ca1bff4b531b93596ee91a7caf77ff6c377457093f72c7bde4b995bce9ffbc4a8fcceb6dd DIST jdk-11.0.3+7.tar.bz2 90300528 BLAKE2B db566140028ddbf9f6e10eaaac018ddf3ad13a954500c73abde8aec5c673c375f2cf0e56bc75c410a4ff90e6cb8e9c4580bb5719786e34865f00a92bd3ea8431 SHA512 46c1c13165e7d5ef480052810ccdc1b5d55f6b2b542e10303d3940536df7f17bf3d8a0cf774e73dc25af7cd69432790656a03c66d2df9efaf71cb9e44c2da684 +DIST jdk-11.0.4+11.tar.bz2 90420043 BLAKE2B 28e7ea146a14ed4629a42c69721a9d53a1c7d6a0346d96bedf15c7f3472d39b0b1d303ceb0c80dd226ba21236588a3c1222446bf98492235f9c18ca870eae26a SHA512 5211aa3d8b1215574b75137a6645ec1a3dd833a9815065f04cefa00c26d2aa6028074076645a22af2a6ffc1bd39cfa1e5e92d9ee3f24af32f9de914cf36b8056 DIST openjdk-8.212_p03.tar.bz2 451800 BLAKE2B f8466a0d99650a07e3ff21e8dc06252ef9d31ce15e22c6ede15fc4c7b1633820e84e67aa501e816101c6bd473293fb897645b2df1530d8f7b81c6e8e6d38ce3a SHA512 ccc642da05aa00cfcc46c1eb759391dd2242218b7392bced77481600aa15b3b1d0a0c03380f59b6a6d038311721f249de1a6b116c6f651193cfb57b89fba4866 +DIST openjdk-8.222_p10.tar.bz2 452194 BLAKE2B aa5a19245e9b5f79da217ef4e8ff87acaf6b4c7b930a6cd1c7a00d2c6d50bb3168c41da1b18e8beb072a84bca7f3956e939edd9f5fd88899d2cc3fe754ff19f8 SHA512 08f92327732fb54df847fe0b3e49460bcdd25fe2aef7bc9545d75ab6504ab92452f8f5daede6040d28fd9b8347f49d658dc7bf88abc90235d6cf4a72cb44fbba DIST openjdk-corba-8.212_p03.tar.bz2 1033709 BLAKE2B f59b294e62425b63e881ed5534ae9beb3cc51351ff197995503671ec52ad82e34e145f8c9790dc88e4f452b4e09af80143fd0f7e0fda588b00eed08d4b2bc861 SHA512 3a786a372ab6b849a6ccd944cdfdc0aa9994a6a9f4d52afccad7d6b187e46a1fd0be30bde3da1eb03988034c36b4590b55379819245fb6f5ed4d75a958e9caa3 +DIST openjdk-corba-8.222_p10.tar.bz2 1033549 BLAKE2B c75f100dc22535068588afe0460618005c46542cbe078e4e35ad80741d61012422eb21826a6ddcfc3b59fdde3bc7e6107a57cfc654114255b1d880273f54a762 SHA512 377847ae044d1e4515c6c7afaf965e037e6688ab010a24d436a5b31c251f2c09a8e622863d533b8b71625284bb5db93f114ba12ec05c731f0dc75d9dce70ec17 DIST openjdk-hotspot-8.212_p03.tar.bz2 7925246 BLAKE2B b405362450186d50228ddaf78907a98365c34d5e09a95064dc39bbc88328d1bf37e23791322fb68a44d90753cd68139627d235852dd1e03ad2b0535982badeaf SHA512 e8c8f9151c94bd821fa6810a0c70ed2749e0c39f66108deccc68718f106eb1731c91b13fb502c4a4be425ee04ecd909937247efb5891aac1ca27ee16d7bbf290 +DIST openjdk-hotspot-8.222_p10.tar.bz2 7937298 BLAKE2B 42a74946b0ff88f1d910751af7efbe86aefc92b9039a4629445ba08255e4a9159a592e778acb8dce557b58324ce023360d9ed892568486a11336e8a09f8e6664 SHA512 20395d55201f072fcb5a7674ee1a2e3fb7a922e03ed4630645d4f22a5ec94c945978f7dfa6d06c28d0f8e9e4025f50986e8eba573fd44bc675ff7978e25723b3 DIST openjdk-jaxp-8.212_p03.tar.bz2 2734510 BLAKE2B fa920514fd499019a8f3d03edf895c11b3d67617b645444025cc5406216fed0ecb9340a08b8e314c43d0ced0ffbc1e3940f7c719930d5e4cdf9b24653d6249f8 SHA512 200516ef92b9fd50b4e7814b2f5f62c344b4654c8c836e0166c9e3669992d2fe231d3e262bc9be54d8793d6c4a3d6bdee5c93a6b6a3b6481d6a234f26dfb2a32 +DIST openjdk-jaxp-8.222_p10.tar.bz2 2735189 BLAKE2B c4ab593edfc914e30bebcfbf0d5c68b64711005a2a027f165eba8b1583e673d74d0cbec582e6d1d65de06ffcf189dbdb66f2b1eb224f127a1908cd6c154c418c SHA512 e45facbaabb803191d86b477f88eb8d8960ee224bc5d6bd4fc19688e097c9d5aafc00597ff38bdaae5403ff330c3188867bc94cd3fb7bf6394b770f1fb0711b7 DIST openjdk-jaxws-8.212_p03.tar.bz2 2540937 BLAKE2B 53c2793d9071f408a3704dacc4d61ac8f1b8ead33e75d309f217a05514661f14656711d017bcdde5821e114c5010d4417ac283571c2a52c28885d6736468402e SHA512 3e336e8cab78636b82488b7da183ba4ba2b84c0a2cb72a369c4352aaeb0fa5da05660c830db12a486e1cdfbc7a88a748d88284ca86c45b890a40dc1d23f3915a +DIST openjdk-jaxws-8.222_p10.tar.bz2 2542293 BLAKE2B 832cf1b98c2cfcc55591d004c7c9f3055412a71632c671cb7343af74ff25645f68d27b298d6ae74a346c0be97470e79c0aca152e3ef702b9e88385ddbfa324f7 SHA512 560bfea42b6e7981e19d974e71382f8ad74729a2fb76974adeb592accaf58c2715ec096f3347ce56a7403c38db4dbca8892eced67eb851f16eb4cc43a1152f1c DIST openjdk-jdk-8.212_p03.tar.bz2 46720739 BLAKE2B af515701052ede8b6cf828cc74f1f5938dad0874a12ed3c5c3f7b03be1f43108fce5e1820452a87e098c3469922227950f6f4fea33306f7b426487b48cc4b993 SHA512 9b3342419c82a8f243d2a7523d83b395c89629820fd99ba387991656e5754ed067877bf12b7e780368dd4bdb6eba10be09e63b1301bcbc0aa29e86e84ec394a3 +DIST openjdk-jdk-8.222_p10.tar.bz2 47175873 BLAKE2B 47b330aa1d78607b42df650629bd88dbde7a8caff2bf6938d75a9d8ec9726b5d32cc5852bb0d877eedeecccee8e2673328697bf104b7380c275e85b9a57a1274 SHA512 d6229f4e86ee0e5798b60143454f39e8de79edc596bf89f6dc7aaf2ec73fe22631f974c2d43e832a255ed2e51e32877926874d1911c3561f9077ea28093bf057 DIST openjdk-langtools-8.212_p03.tar.bz2 2393112 BLAKE2B 96656795114bad1d2e5eabace5d1c6568646084421fbaa43045ce0ec8d222f1a7e8629e4b86bdd5ff8eb51e90ea1eaafab3e94f34c41932754249f17b2e447f8 SHA512 15b931432cb14cf60c73627bd70e66f6d18ff25763a7b8758109cf8746d278d6c2b5d945a9f0b948a76c0813b5f42c988a3d10ac13165ec12e0f4d9eab98f369 +DIST openjdk-langtools-8.222_p10.tar.bz2 2394871 BLAKE2B 376dd5d5cd86704b7cf6d02e8a117ce0d36f43316cc9000bee3f3f1fc7568e080c039e9adc40b6fb78720e2aa8ac921c638e20be1766e2252b29329bd17d28b8 SHA512 79a1db1c8afd5d6834ae5e565929eeb7567bc4ff3fa823789f6f170fb21e0df71d965595f4fb53efb6c5af1c1b4c7c8e2edc91e60178b57a8957935968f480c9 DIST openjdk-nashorn-8.212_p03.tar.bz2 2854888 BLAKE2B 3e5a1867d8a5db301fb3512ebdc4dea8f8226fe3308142d6f3f616795c9cee0d598a257ccd7e790ec440c966339399776d1118764dbf882a46a2daa32d81ddd5 SHA512 5c7fba1d567aa1d0602ef045b24a8624fed9ced72b3bae030ee15ea133ed2223e402cc08c996ff253c4792570da87b7713f351c84704b12556466349f6452f74 +DIST openjdk-nashorn-8.222_p10.tar.bz2 2859130 BLAKE2B d43b2e05dea1f97eff9e6d81ac0a6c8bfbe8cd444ff23df4b7d2fec29b678386893c169742a80fca6f0a785189796d2a6f29c10011a835cf5ac9e74001ae2b72 SHA512 453cefcd3f34cf6fca9bb14176145c9e4620e4188461b49049e5363cd62d87cc4f7703356369677dcd1e4862de0b5c16d1c505d66317944226a590af56026ac4 EBUILD openjdk-11.0.3_p7-r4.ebuild 7394 BLAKE2B d82ea0a57aa97fb40887b7f4da9bc7a6c61b17c6bb0026eef979e9cb44937a7c253e0364c0487348d6274cd7e6f1f84d0a7a3e9ce710729992b1484b42b41531 SHA512 cfb17b2bcfff4a0d63dc4e1a180ad1b088c7d49cd1949ee0605e68342424e4d1e91468cb0c053937d535423d569d7f4164f99c05ffc1618ae996337d73c603d7 +EBUILD openjdk-11.0.4_p11.ebuild 7515 BLAKE2B a7fc8c6fe736d87f0d92ef6b1b7ccafbcce6da8d1397fa3562e6119215e123228906ee44e7a824b143f040e7a154862960f34075393898b9e2d7645310afb3ee SHA512 111db2827aa3eeb96e62efd4db9b551f22877b8740b5d7990b72cc3b3e52e3f9520d58decfe05f8d248dbc67c1690c5a48082c3aa5b2928528a27aa4ba21b70f EBUILD openjdk-8.212_p03-r3.ebuild 7320 BLAKE2B dc4a418d885c1db666dee134dd5fa73a041772dac925fe7249a24531ed7e38e29c8f1f8ea4d7aa41dcea7173cebb1ef110b6ffe8cffc8bb7b0166751e13e8c2b SHA512 c6b402eadf629322aaa9207cf8ebfcacbd3bb702ee565372200b2f74be8d26b4eb41ffdfc85feb945e8dc044c7f4c5c650172fe27cb59deb32daaa95be3e1063 +EBUILD openjdk-8.222_p10.ebuild 7405 BLAKE2B 4f2f21ebac598a3c8615eeecefecb54f440ee62eb1c6a2a167dd8d4431297c9949e8587bac40e2948151176150c8451e2cb4de610567af394633edcaa085e7c9 SHA512 ad09d11861fdbffe39b51c447ba5b8a0a4f2adf61c231dfdf95b1709eb35becc81a3db7724c6c47456328d02b070a855ac6f45feafc1c62cd0e1f63ce1aa5cf1 MISC metadata.xml 1398 BLAKE2B 7b99e080f6dc261c94314c7f7a0314ee25b48752ca494dd23d1534c5e8e3f930601262a0316ed674786c5fd960dfbc25dd6c6768cd06325ef45c0b41f920eafc SHA512 1747f484c6f784cb551f0969aab9ca1e6c42509c06b6187b72f3e16861ce3e2e71e131deb1ae6ebe2eda1c768276794cd5a0db7918eb419b9502a3c45bf78959 diff --git a/dev-java/openjdk/openjdk-11.0.4_p11.ebuild b/dev-java/openjdk/openjdk-11.0.4_p11.ebuild new file mode 100644 index 000000000000..d9e47c67e52e --- /dev/null +++ b/dev-java/openjdk/openjdk-11.0.4_p11.ebuild @@ -0,0 +1,269 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils toolchain-funcs + +MY_PV=${PV/_p/+} +SLOT=${MY_PV%%[.+]*} + +DESCRIPTION="Open source implementation of the Java programming language" +HOMEPAGE="https://openjdk.java.net" +SRC_URI="https://hg.${PN}.java.net/jdk-updates/jdk${SLOT}u/archive/jdk-${MY_PV}.tar.bz2" + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64" + +IUSE="alsa cups debug doc examples gentoo-vm headless-awt javafx +jbootstrap nsplugin +pch selinux source systemtap +webstart" + +COMMON_DEPEND=" + media-libs/freetype:2= + media-libs/giflib:0/7 + media-libs/libpng:0= + media-libs/lcms:2= + sys-libs/zlib + virtual/jpeg:0= + systemtap? ( dev-util/systemtap ) +" + +# Many libs are required to build, but not to run, make is possible to remove +# by listing conditionally in RDEPEND unconditionally in DEPEND +RDEPEND=" + ${COMMON_DEPEND} + >=sys-apps/baselayout-java-0.1.0-r1 + !headless-awt? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXt + x11-libs/libXtst + ) + alsa? ( media-libs/alsa-lib ) + cups? ( net-print/cups ) + selinux? ( sec-policy/selinux-java ) +" + +DEPEND=" + ${COMMON_DEPEND} + app-arch/zip + media-libs/alsa-lib + net-print/cups + x11-base/xorg-proto + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXt + x11-libs/libXtst + javafx? ( dev-java/openjfx:${SLOT} ) + || ( + dev-java/openjdk-bin:${SLOT} + dev-java/openjdk:${SLOT} + ) +" + +PDEPEND=" + webstart? ( >=dev-java/icedtea-web-1.6.1:0 ) + nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] ) +" + +REQUIRED_USE="javafx? ( alsa !headless-awt )" + +S="${WORKDIR}/jdk${SLOT}u-jdk-${MY_PV}" + +# The space required to build varies wildly depending on USE flags, +# ranging from 2GB to 16GB. This function is certainly not exact but +# should be close enough to be useful. +openjdk_check_requirements() { + local M + M=2048 + M=$(( $(usex jbootstrap 2 1) * $M )) + M=$(( $(usex debug 3 1) * $M )) + M=$(( $(usex doc 320 0) + $(usex source 128 0) + 192 + $M )) + + CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} +} + +pkg_pretend() { + openjdk_check_requirements + has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}" +} + +pkg_setup() { + openjdk_check_requirements + java-vm-2_pkg_setup + + JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT}" + JAVA_PKG_WANT_SOURCE="${SLOT}" + JAVA_PKG_WANT_TARGET="${SLOT}" + + # The nastiness below is necessary while the gentoo-vm USE flag is + # masked. First we call java-pkg-2_pkg_setup if it looks like the + # flag was unmasked against one of the possible build VMs. If not, + # we try finding one of them in their expected locations. This would + # have been slightly less messy if openjdk-bin had been installed to + # /opt/${PN}-${SLOT} or if there was a mechanism to install a VM env + # file but disable it so that it would not normally be selectable. + + local vm + for vm in ${JAVA_PKG_WANT_BUILD_VM}; do + if [[ -d ${EPREFIX}/usr/lib/jvm/${vm} ]]; then + java-pkg-2_pkg_setup + return + fi + done + + if has_version --host-root dev-java/openjdk:${SLOT}; then + export JDK_HOME=${EPREFIX}/usr/$(get_libdir)/openjdk-${SLOT} + else + if [[ ${MERGE_TYPE} != "binary" ]]; then + JDK_HOME=$(best_version --host-root dev-java/openjdk-bin:${SLOT}) + [[ -n ${JDK_HOME} ]] || die "Build VM not found!" + JDK_HOME=${JDK_HOME#*/} + JDK_HOME=${EPREFIX}/opt/${JDK_HOME%-r*} + export JDK_HOME + fi + fi +} + +src_prepare() { + default + chmod +x configure || die +} + +src_configure() { + # Work around stack alignment issue, bug #647954. in case we ever have x86 + use x86 && append-flags -mincoming-stack-boundary=2 + + # Enabling full docs appears to break doc building. If not + # explicitly disabled, the flag will get auto-enabled if pandoc and + # graphviz are detected. pandoc has loads of dependencies anyway. + + local myconf=( + --disable-ccache + --enable-full-docs=no + --with-boot-jdk="${JDK_HOME}" + --with-extra-cflags="${CFLAGS}" + --with-extra-cxxflags="${CXXFLAGS}" + --with-extra-ldflags="${LDFLAGS}" + --with-giflib=system + --with-lcms=system + --with-libjpeg=system + --with-libpng=system + --with-native-debug-symbols=$(usex debug internal none) + --with-vendor-name="Gentoo" + --with-vendor-url="https://gentoo.org" + --with-vendor-bug-url="https://bugs.gentoo.org" + --with-vendor-vm-bug-url="https://bugs.openjdk.java.net" + --with-vendor-version-string="${PV}" + --with-version-pre="" + --with-version-string=${MY_PV%+*} + --with-version-build=${MY_PV#*+} + --with-zlib=system + --enable-dtrace=$(usex systemtap yes no) + --enable-headless-only=$(usex headless-awt yes no) + ) + + if use javafx; then + local zip="${EROOT%/}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip" + if [[ -r ${zip} ]]; then + myconf+=( --with-import-modules="${zip}" ) + else + die "${zip} not found or not readable" + fi + fi + + # PaX breaks pch, bug #601016 + if use pch && ! host-is-pax; then + myconf+=( --enable-precompiled-headers ) + else + myconf+=( --disable-precompiled-headers ) + fi + + ( + unset _JAVA_OPTIONS JAVA JAVAC XARGS + CFLAGS= CXXFLAGS= LDFLAGS= \ + CONFIG_SITE=/dev/null \ + econf "${myconf[@]}" + ) +} + +src_compile() { + local myemakeargs=( + JOBS=$(makeopts_jobs) + LOG=debug + CFLAGS_WARNINGS_ARE_ERRORS= # No -Werror + $(usex doc docs '') + $(usex jbootstrap bootcycle-images product-images) + ) + emake "${myemakeargs[@]}" -j1 #nowarn +} + +src_install() { + local dest="/usr/$(get_libdir)/${PN}-${SLOT}" + local ddest="${ED}${dest#/}" + + cd "${S}"/build/*-release/images/jdk || die + + # Create files used as storage for system preferences. + mkdir .systemPrefs || die + touch .systemPrefs/.system.lock || die + touch .systemPrefs/.systemRootModFile || die + + # Oracle and IcedTea have libjsoundalsa.so depending on + # libasound.so.2 but OpenJDK only has libjsound.so. Weird. + if ! use alsa ; then + rm -v lib/libjsound.* || die + fi + + if ! use examples ; then + rm -vr demo/ || die + fi + + if ! use source ; then + rm -v lib/src.zip || die + fi + + rm -v lib/security/cacerts || die + + dodir "${dest}" + cp -pPR * "${ddest}" || die + + dosym "${EPREFIX}"/etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts + + # must be done before running itself + java-vm_set-pax-markings "${ddest}" + + einfo "Creating the Class Data Sharing archives and disabling usage tracking" + "${ddest}/bin/java" -server -Xshare:dump -Djdk.disableLastUsageTracking || die + + use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh + java-vm_revdep-mask + java-vm_sandbox-predict /dev/random /proc/self/coredump_filter + + if use doc ; then + insinto /usr/share/doc/"${PF}"/html + doins -r "${S}"/build/*-release/images/docs/* + dosym /usr/share/doc/"${PF}" /usr/share/doc/"${PN}-${SLOT}" + fi +} + +pkg_postinst() { + java-vm-2_pkg_postinst + + if use gentoo-vm ; then + ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JDK" + ewarn "recognised by the system. This will almost certainly break" + ewarn "many java ebuilds as they are not ready for openjdk-11" + else + ewarn "The experimental gentoo-vm USE flag has not been enabled so this JDK" + ewarn "will not be recognised by the system. For example, simply calling" + ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo" + ewarn "fully supports Java ${SLOT}. This JDK must therefore be invoked using its" + ewarn "absolute location under ${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}." + fi +} diff --git a/dev-java/openjdk/openjdk-8.222_p10.ebuild b/dev-java/openjdk/openjdk-8.222_p10.ebuild new file mode 100644 index 000000000000..e0c0bb541293 --- /dev/null +++ b/dev-java/openjdk/openjdk-8.222_p10.ebuild @@ -0,0 +1,255 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit check-reqs eapi7-ver flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils toolchain-funcs + +MY_PV=$(ver_rs 1 'u' 2 '-' ${PV//p/b}) + +BASE_URI="https://hg.${PN}.java.net/jdk8u/jdk8u" + +DESCRIPTION="Open source implementation of the Java programming language" +HOMEPAGE="https://openjdk.java.net" +SRC_URI=" + ${BASE_URI}/archive/jdk${MY_PV}.tar.bz2 -> ${P}.tar.bz2 + ${BASE_URI}/corba/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-corba-${PV}.tar.bz2 + ${BASE_URI}/hotspot/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-hotspot-${PV}.tar.bz2 + ${BASE_URI}/jaxp/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jaxp-${PV}.tar.bz2 + ${BASE_URI}/jaxws/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jaxws-${PV}.tar.bz2 + ${BASE_URI}/jdk/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jdk-${PV}.tar.bz2 + ${BASE_URI}/langtools/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-langtools-${PV}.tar.bz2 + ${BASE_URI}/nashorn/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-nashorn-${PV}.tar.bz2 +" + +LICENSE="GPL-2" +SLOT="$(ver_cut 1)" +KEYWORDS="~amd64 ~ppc64 ~x86" +IUSE="alsa debug cups doc examples gentoo-vm headless-awt +jbootstrap nsplugin +pch selinux source +webstart" + +COMMON_DEPEND=" + media-libs/freetype:2= + media-libs/giflib:0/7 + sys-libs/zlib +" +# Many libs are required to build, but not to run, make is possible to remove +# by listing conditionally in RDEPEND unconditionally in DEPEND +RDEPEND=" + ${COMMON_DEPEND} + >=sys-apps/baselayout-java-0.1.0-r1 + !headless-awt? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrender + x11-libs/libXt + x11-libs/libXtst + ) + alsa? ( media-libs/alsa-lib ) + cups? ( net-print/cups ) + selinux? ( sec-policy/selinux-java ) +" + +DEPEND=" + ${COMMON_DEPEND} + app-arch/zip + media-libs/alsa-lib + net-print/cups + x11-base/xorg-proto + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrender + x11-libs/libXt + x11-libs/libXtst + || ( + dev-java/openjdk-bin:${SLOT} + dev-java/icedtea-bin:${SLOT} + dev-java/openjdk:${SLOT} + dev-java/icedtea:${SLOT} + ) +" + +PDEPEND=" + webstart? ( >=dev-java/icedtea-web-1.6.1:0 ) + nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] ) +" + +S="${WORKDIR}/jdk${SLOT}u-jdk${MY_PV}" + +# The space required to build varies wildly depending on USE flags, +# ranging from 2GB to 16GB. This function is certainly not exact but +# should be close enough to be useful. +openjdk_check_requirements() { + local M + M=2048 + M=$(( $(usex debug 3 1) * $M )) + M=$(( $(usex jbootstrap 2 1) * $M )) + M=$(( $(usex doc 320 0) + $(usex source 128 0) + 192 + $M )) + + CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} +} + +pkg_pretend() { + openjdk_check_requirements + has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}" +} + +pkg_setup() { + openjdk_check_requirements + java-vm-2_pkg_setup + + JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT} icedtea-${SLOT} icedtea-bin-${SLOT}" + JAVA_PKG_WANT_SOURCE="${SLOT}" + JAVA_PKG_WANT_TARGET="${SLOT}" + + # The nastiness below is necessary while the gentoo-vm USE flag is + # masked. First we call java-pkg-2_pkg_setup if it looks like the + # flag was unmasked against one of the possible build VMs. If not, + # we try finding one of them in their expected locations. This would + # have been slightly less messy if openjdk-bin had been installed to + # /opt/${PN}-${SLOT} or if there was a mechanism to install a VM env + # file but disable it so that it would not normally be selectable. + + local vm + for vm in ${JAVA_PKG_WANT_BUILD_VM}; do + if [[ -d ${EPREFIX}/usr/lib/jvm/${vm} ]]; then + java-pkg-2_pkg_setup + return + fi + done + + if has_version --host-root dev-java/openjdk:${SLOT}; then + export JDK_HOME=${EPREFIX}/usr/$(get_libdir)/openjdk-${SLOT} + else + if [[ ${MERGE_TYPE} != "binary" ]]; then + JDK_HOME=$(best_version --host-root dev-java/openjdk-bin:${SLOT}) + [[ -n ${JDK_HOME} ]] || die "Build VM not found!" + JDK_HOME=${JDK_HOME#*/} + JDK_HOME=${EPREFIX}/opt/${JDK_HOME%-r*} + export JDK_HOME + fi + fi +} + +src_prepare() { + default + chmod +x configure || die + local repo + for repo in corba hotspot jdk jaxp jaxws langtools nashorn; do + ln -s ../"${repo}-jdk${MY_PV}" "${repo}" || die + done + # new warnings in new gcc https://bugs.gentoo.org/685426 + sed -i '/^WARNINGS_ARE_ERRORS/ s/-Werror/-Wno-error/' \ + hotspot/make/linux/makefiles/gcc.make || die +} + +src_configure() { + # general build info found here: + #https://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html + + # Work around stack alignment issue, bug #647954. + use x86 && append-flags -mincoming-stack-boundary=2 + + local myconf=( + --disable-ccache + --enable-unlimited-crypto + --with-boot-jdk="${JDK_HOME}" + --with-extra-cflags="${CFLAGS}" + --with-extra-cxxflags="${CXXFLAGS}" + --with-extra-ldflags="${LDFLAGS}" + --with-giflib=system + --with-jtreg=no + --with-jobs=1 + --with-num-cores=1 + --with-update-version="$(ver_cut 2)" + --with-build-number="b$(ver_cut 4)" + --with-milestone="fcs" # magic variable that means "release version" + --with-vendor-name="Gentoo" + --with-vendor-url="https://gentoo.org" + --with-vendor-bug-url="https://bugs.gentoo.org" + --with-vendor-vm-bug-url="https://bugs.openjdk.java.net" + --with-zlib=system + --with-native-debug-symbols=$(usex debug internal none) + $(usex headless-awt --disable-headful '') + ) + + # PaX breaks pch, bug #601016 + if use pch && ! host-is-pax; then + myconf+=( --enable-precompiled-headers ) + else + myconf+=( --disable-precompiled-headers ) + fi + + ( + unset _JAVA_OPTIONS JAVA JAVAC XARGS + CFLAGS= CXXFLAGS= LDFLAGS= \ + CONFIG_SITE=/dev/null \ + econf "${myconf[@]}" + ) +} + +src_compile() { + local myemakeargs=( + JOBS=$(makeopts_jobs) + LOG=debug + $(usex doc docs '') + $(usex jbootstrap bootcycle-images images) + ) + emake "${myemakeargs[@]}" -j1 #nowarn +} + +src_install() { + local dest="/usr/$(get_libdir)/${PN}-${SLOT}" + local ddest="${ED%/}/${dest#/}" + + cd "${S}"/build/*-release/images/j2sdk-image || die + + if ! use alsa; then + rm -v jre/lib/$(get_system_arch)/libjsoundalsa.* || die + fi + + # stupid build system does not remove that + if use headless-awt ; then + rm -fvr jre/lib/$(get_system_arch)/lib*{[jx]awt,splashscreen}* \ + {,jre/}bin/policytool bin/appletviewer || die + fi + + if ! use examples ; then + rm -vr demo/ || die + fi + + if ! use source ; then + rm -v src.zip || die + fi + + dodir "${dest}" + cp -pPR * "${ddest}" || die + + dosym "${EPREFIX}"/etc/ssl/certs/java/cacerts "${dest}"/jre/lib/security/cacerts + + use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh + java-vm_set-pax-markings "${ddest}" + java-vm_revdep-mask + java-vm_sandbox-predict /dev/random /proc/self/coredump_filter + + if use doc ; then + insinto /usr/share/doc/${PF}/html + doins -r "${S}"/build/*-release/docs/* + fi +} + +pkg_postinst() { + java-vm-2_pkg_postinst + + if use gentoo-vm ; then + ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JDK" + ewarn "recognised by the system. This will almost certainly break things." + else + ewarn "The experimental gentoo-vm USE flag has not been enabled so this JDK" + ewarn "will not be recognised by the system. For example, simply calling" + ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo" + ewarn "fully supports Java ${SLOT}. This JDK must therefore be invoked using its" + ewarn "absolute location under ${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}." + fi +} |