From d241ee7943383a8ad8aacd70d5e301a6acf22c38 Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Tue, 28 Jul 2020 09:41:37 -0400 Subject: Initial commit --- dev-java/freemarker-bin/Manifest | 1 + .../freemarker-bin/freemarker-bin-2.3.30.ebuild | 22 ++ dev-java/freemarker-bin/metadata.xml | 8 + dev-java/java-sdk-docs/Manifest | 1 + dev-java/java-sdk-docs/java-sdk-docs-14.0.2.ebuild | 37 +++ dev-java/java-sdk-docs/metadata.xml | 5 + dev-java/openj9-openjdk-bin/Manifest | 8 + .../openj9-openjdk-bin/files/openjdk-bin-14.env.sh | 16 ++ dev-java/openj9-openjdk-bin/metadata.xml | 16 ++ .../openj9-openjdk-bin-11.0.8.10.0.21.0.ebuild | 119 ++++++++ .../openj9-openjdk-bin-14.0.2.12.0.21.0.ebuild | 119 ++++++++ dev-java/openj9-openjdk-jre-bin/Manifest | 8 + .../files/openjdk-jre-bin-11.env.sh | 16 ++ .../files/openjdk-jre-bin-8.env.sh | 16 ++ dev-java/openj9-openjdk-jre-bin/metadata.xml | 15 + .../openj9-openjdk-jre-bin-11.0.8.10.0.21.0.ebuild | 107 +++++++ .../openj9-openjdk-jre-bin-14.0.2.12.0.21.0.ebuild | 107 +++++++ dev-java/openj9-openjdk/Manifest | 4 + dev-java/openj9-openjdk/files/omr-fam.patch | 70 +++++ .../files/omr-omrstr-iconv-failure-overflow.patch | 13 + .../openj9-openjdk/files/openj9-j9utf8-fam.patch | 26 ++ .../openj9-make-jvmti-test-variables-static.patch | 68 +++++ .../files/openj9-subscriptionID.patch | 36 +++ dev-java/openj9-openjdk/files/openjdk-14.env.sh | 16 ++ .../files/openjdk-8238380-childproc-fcommon.patch | 48 ++++ dev-java/openj9-openjdk/metadata.xml | 21 ++ .../openj9-openjdk/openj9-openjdk-11.0.21.0.ebuild | 318 +++++++++++++++++++++ .../openj9-openjdk/openj9-openjdk-14.0.21.0.ebuild | 318 +++++++++++++++++++++ dev-java/openjdk-bin/Manifest | 4 + dev-java/openjdk-bin/files/openjdk-bin-14.env.sh | 16 ++ dev-java/openjdk-bin/metadata.xml | 15 + dev-java/openjdk-bin/openjdk-bin-14.0.2_p12.ebuild | 115 ++++++++ dev-java/openjdk-jre-bin/Manifest | 1 + .../files/openjdk-jre-bin-14.env.sh | 16 ++ dev-java/openjdk-jre-bin/metadata.xml | 22 ++ .../openjdk-jre-bin-14.0.2_p12.ebuild | 100 +++++++ dev-java/openjdk/Manifest | 1 + dev-java/openjdk/files/openjdk-14.env.sh | 16 ++ dev-java/openjdk/metadata.xml | 16 ++ dev-java/openjdk/openjdk-14.0.2_p12.ebuild | 276 ++++++++++++++++++ 40 files changed, 2157 insertions(+) create mode 100644 dev-java/freemarker-bin/Manifest create mode 100644 dev-java/freemarker-bin/freemarker-bin-2.3.30.ebuild create mode 100644 dev-java/freemarker-bin/metadata.xml create mode 100644 dev-java/java-sdk-docs/Manifest create mode 100644 dev-java/java-sdk-docs/java-sdk-docs-14.0.2.ebuild create mode 100644 dev-java/java-sdk-docs/metadata.xml create mode 100644 dev-java/openj9-openjdk-bin/Manifest create mode 100644 dev-java/openj9-openjdk-bin/files/openjdk-bin-14.env.sh create mode 100644 dev-java/openj9-openjdk-bin/metadata.xml create mode 100644 dev-java/openj9-openjdk-bin/openj9-openjdk-bin-11.0.8.10.0.21.0.ebuild create mode 100644 dev-java/openj9-openjdk-bin/openj9-openjdk-bin-14.0.2.12.0.21.0.ebuild create mode 100644 dev-java/openj9-openjdk-jre-bin/Manifest create mode 100644 dev-java/openj9-openjdk-jre-bin/files/openjdk-jre-bin-11.env.sh create mode 100644 dev-java/openj9-openjdk-jre-bin/files/openjdk-jre-bin-8.env.sh create mode 100644 dev-java/openj9-openjdk-jre-bin/metadata.xml create mode 100644 dev-java/openj9-openjdk-jre-bin/openj9-openjdk-jre-bin-11.0.8.10.0.21.0.ebuild create mode 100644 dev-java/openj9-openjdk-jre-bin/openj9-openjdk-jre-bin-14.0.2.12.0.21.0.ebuild create mode 100644 dev-java/openj9-openjdk/Manifest create mode 100644 dev-java/openj9-openjdk/files/omr-fam.patch create mode 100644 dev-java/openj9-openjdk/files/omr-omrstr-iconv-failure-overflow.patch create mode 100644 dev-java/openj9-openjdk/files/openj9-j9utf8-fam.patch create mode 100644 dev-java/openj9-openjdk/files/openj9-make-jvmti-test-variables-static.patch create mode 100644 dev-java/openj9-openjdk/files/openj9-subscriptionID.patch create mode 100644 dev-java/openj9-openjdk/files/openjdk-14.env.sh create mode 100644 dev-java/openj9-openjdk/files/openjdk-8238380-childproc-fcommon.patch create mode 100644 dev-java/openj9-openjdk/metadata.xml create mode 100644 dev-java/openj9-openjdk/openj9-openjdk-11.0.21.0.ebuild create mode 100644 dev-java/openj9-openjdk/openj9-openjdk-14.0.21.0.ebuild create mode 100644 dev-java/openjdk-bin/Manifest create mode 100644 dev-java/openjdk-bin/files/openjdk-bin-14.env.sh create mode 100644 dev-java/openjdk-bin/metadata.xml create mode 100644 dev-java/openjdk-bin/openjdk-bin-14.0.2_p12.ebuild create mode 100644 dev-java/openjdk-jre-bin/Manifest create mode 100644 dev-java/openjdk-jre-bin/files/openjdk-jre-bin-14.env.sh create mode 100644 dev-java/openjdk-jre-bin/metadata.xml create mode 100644 dev-java/openjdk-jre-bin/openjdk-jre-bin-14.0.2_p12.ebuild create mode 100644 dev-java/openjdk/Manifest create mode 100644 dev-java/openjdk/files/openjdk-14.env.sh create mode 100644 dev-java/openjdk/metadata.xml create mode 100644 dev-java/openjdk/openjdk-14.0.2_p12.ebuild (limited to 'dev-java') diff --git a/dev-java/freemarker-bin/Manifest b/dev-java/freemarker-bin/Manifest new file mode 100644 index 0000000..0677175 --- /dev/null +++ b/dev-java/freemarker-bin/Manifest @@ -0,0 +1 @@ +DIST apache-freemarker-2.3.30-bin.tar.gz 3168455 BLAKE2B 7502792cbbdf9bb65334265a6424927440f448b35d53611cb0d2d47435343cdd330a881ac8101c4f0f8b8b60b01eef5c71b1110002ed342a2ea581c41b886015 SHA512 81d3aae24f61e6022e756d7c6d94b04e362469e1a119a6cbaaff95de25f81c089450856d90aa6db646717c1236b8dbf7725b652803fa00c86b9aab93ba298fea diff --git a/dev-java/freemarker-bin/freemarker-bin-2.3.30.ebuild b/dev-java/freemarker-bin/freemarker-bin-2.3.30.ebuild new file mode 100644 index 0000000..f751563 --- /dev/null +++ b/dev-java/freemarker-bin/freemarker-bin-2.3.30.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit java-pkg-2 + +DESCRIPTION="A Java tool to generate text output based on templates (binary package)" +HOMEPAGE="https://freemarker.apache.org/" +SRC_URI="https://downloads.apache.org/freemarker/engine/${PV}/binaries/apache-freemarker-${PV}-bin.tar.gz" +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND="${CP_DEPEND} + >=virtual/jre-1.7" + +S="${WORKDIR}/apache-freemarker-${PV}-bin" + +src_install() { + java-pkg_dojar freemarker.jar +} diff --git a/dev-java/freemarker-bin/metadata.xml b/dev-java/freemarker-bin/metadata.xml new file mode 100644 index 0000000..004555a --- /dev/null +++ b/dev-java/freemarker-bin/metadata.xml @@ -0,0 +1,8 @@ + + + + + alex_y_xu@yahoo.ca + Alex Xu (Hello71) + + diff --git a/dev-java/java-sdk-docs/Manifest b/dev-java/java-sdk-docs/Manifest new file mode 100644 index 0000000..5674068 --- /dev/null +++ b/dev-java/java-sdk-docs/Manifest @@ -0,0 +1 @@ +DIST jdk-14.0.2_doc-all.zip 52312117 BLAKE2B 50efe51e41f4d4d1526c0de5ca5daea8e0588c08983ccb8194cfbf1b57333b40b491dccd22af372a0957cab4c9aae818242228a07a8973bd9a4e6f5aa15027b8 SHA512 8452faa7d6722de3708da8b1bbad984e65b2ead3fb71926cdbfec86f98f412d0fd11662c5061745c997f9f9a5b5d57a9f682be0be43500e8507cc172fdcf34c3 diff --git a/dev-java/java-sdk-docs/java-sdk-docs-14.0.2.ebuild b/dev-java/java-sdk-docs/java-sdk-docs-14.0.2.ebuild new file mode 100644 index 0000000..42dae5e --- /dev/null +++ b/dev-java/java-sdk-docs/java-sdk-docs-14.0.2.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DOWNLOAD_URL="https://www.oracle.com/java/technologies/javase-jdk${SLOT}-doc-downloads.html" + +SLOT="${PV%%.*}" +DESCRIPTION="Oracle's documentation bundle (including API) for Java SE" +HOMEPAGE="https://docs.oracle.com/javase/14" +SRC_URI="jdk-${PV}_doc-all.zip" +LICENSE="oracle-java-documentation-${SLOT}" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" +RESTRICT="fetch" + +DEPEND="app-arch/unzip" + +S="${WORKDIR}/docs" + +pkg_nofetch() { + einfo "Please download ${SRC_URI} from" + einfo "${DOWNLOAD_URL}" + einfo "by agreeing to the license and place it in your distfiles directory." + einfo "" + einfo "If you find the file on the download page replaced with a higher" + einfo "version, please report it in bug #67266 (link below)." + einfo "" + einfo "If emerge fails because of a checksum error, it is possible that" + einfo "the upstream release changed without renaming. Try downloading the file" + einfo "again (or a newer revision if available). Otherwise report this to" + einfo "https://bugs.gentoo.org/67266 and we will make a new revision." +} + +src_install() { + insinto /usr/share/doc/${PN}-${SLOT}/html + doins -r index.html */ +} diff --git a/dev-java/java-sdk-docs/metadata.xml b/dev-java/java-sdk-docs/metadata.xml new file mode 100644 index 0000000..7a38bb9 --- /dev/null +++ b/dev-java/java-sdk-docs/metadata.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/dev-java/openj9-openjdk-bin/Manifest b/dev-java/openj9-openjdk-bin/Manifest new file mode 100644 index 0000000..826a961 --- /dev/null +++ b/dev-java/openj9-openjdk-bin/Manifest @@ -0,0 +1,8 @@ +DIST OpenJDK11U-jdk_ppc64le_linux_openj9_11.0.8_10_openj9-0.21.0.tar.gz 196415558 BLAKE2B 4a296081c74ba95c4242d51e5cafb15752acb4616204533c9ca9d958187527d8d7914e4a9839323d0ad2b778def736e5d370ce50fcd6d876a18e0fb5549c28e2 SHA512 882eb3928d8aab29c32a4e39cfc1e20669d11611b2158ac38dc149ef3da4e18c551444db0d8b903897903623869e90da72e78aeb6d2c1fa6d060a4a1694f78f7 +DIST OpenJDK11U-jdk_ppc64le_linux_openj9_linuxXL_11.0.8_10_openj9-0.21.0.tar.gz 196402945 BLAKE2B 18757be55519a8be40c2a2278761cdf5343049dda6c02f3b493a55042978d048061e109dccb40ebb1eea51fe65a6aa0c32c6b786a4a18c92c938d1cc36a21cd9 SHA512 ac1c65e011e1528dac2d94839fe2a7cc58b341800950e1d7767c585f21106d82e5a7ad6389a167ba0b95ff2e00d6d4470186d8d8339eb01b61952ad52dec8bc0 +DIST OpenJDK11U-jdk_x64_linux_openj9_11.0.8_10_openj9-0.21.0.tar.gz 195566437 BLAKE2B 2d65e5cdf1b8526d4d065c2240814813234d9571dfdb1ca8f438c8f5cf120fda2027ca6cf5470117931aedd5b4758d1663be937dc148cc4b70bb41ecff2692f9 SHA512 74b698cb398e6dbc050b9faa878b496e559ae92bc2a54e8889c37f70bfa05ebd2e9407285fa1c21448a8f3a8a26f01210856ff0bf77c2f33fca29e9115caf52d +DIST OpenJDK11U-jdk_x64_linux_openj9_linuxXL_11.0.8_10_openj9-0.21.0.tar.gz 195553141 BLAKE2B 2dcf822d2c9c8d95dce76e3933a538535662051cdeb3c71fdc2a0dc2c59bc14c8ca0cda0f23bd65a14ae1dcf32e93804a4ae07533f4b5f0a21b3903a32e21dbf SHA512 4e4a093bcffeb66c455cec3490eb6e6766a7b174505428fd9c23313d16f22f37d6cf22c186708c3e6c1fcb5aea8772079e392c1556ead4b496774cad995be3c3 +DIST OpenJDK14U-jdk_ppc64le_linux_openj9_14.0.2_12_openj9-0.21.0.tar.gz 203990535 BLAKE2B 0bc831e499bab0f10e55cb05e184a7a30c308146e58b20be5678418b45298ea361ffc3299cc2d03f68af9625e9e004dcb6a0e044e325df361a103eea65324ba5 SHA512 20f28ab961bab0b30f2c7041c7454ee257351e8ebd983d46615a38f8f5ea1c21340f081e2264ddf6ee151b1f15d73fc63caa459e06ed42720fd58f59613c755b +DIST OpenJDK14U-jdk_ppc64le_linux_openj9_linuxXL_14.0.2_12_openj9-0.21.0.tar.gz 202921752 BLAKE2B 09da234abbca3f18ca005c8237a7f88735e99ad1f275aee20ce7c100f54c02dad5aa214f895c27d9d330dc2305775691ab91ce8e0ce4e0b5dbb9150f89747c1f SHA512 19b8587eaef417d3a12dd04c6c2b0cb500a4561912cbeb6bea30e38ea55f1b43d39a6f1f8be4bb5532659615e2d5c22107ba1090c1d2f36c69371d0fbacea210 +DIST OpenJDK14U-jdk_x64_linux_openj9_14.0.2_12_openj9-0.21.0.tar.gz 202955761 BLAKE2B 662f1cd4a6a4e1196a38825f57b29badcfc14b7598a9416c2ee755d2d39faaa243b7e74f0882de72a7dc9d542946038ece587de657694df9ea3e258a74e7a2c1 SHA512 d551304f0e1f153dde05ae6d1dd695dffa4e0c8f2b5776db14c143a2f1f1a8248552de5b7d2ca31dc9044b0dba0871dd08642c9311961d574ba233400c2eb30c +DIST OpenJDK14U-jdk_x64_linux_openj9_linuxXL_14.0.2_12_openj9-0.21.0.tar.gz 202942292 BLAKE2B 353f61065a5e8842932637ed9ecc743e18ff8b792da8802dae6d6defa23b18780c62c14f8b12786bf0b2073c81a71022a9a40c09981b0e9eaaadcb4281f53110 SHA512 875afe53de8c6413b5b0d6fb2d81be73f6212daa4c94e6b042b886a1702e4619ed1360f00e6db9090c4db41f8f152f851160b81aa187afdba26b524e70debfe2 diff --git a/dev-java/openj9-openjdk-bin/files/openjdk-bin-14.env.sh b/dev-java/openj9-openjdk-bin/files/openjdk-bin-14.env.sh new file mode 100644 index 0000000..9e9c5ec --- /dev/null +++ b/dev-java/openj9-openjdk-bin/files/openjdk-bin-14.env.sh @@ -0,0 +1,16 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +VERSION="AdoptOpenJDK ${PV}" +JAVA_HOME="${EPREFIX}/opt/${P}" +JDK_HOME="${EPREFIX}/opt/${P}" +JAVAC="\${JAVA_HOME}/bin/javac" +PATH="\${JAVA_HOME}/bin" +ROOTPATH="\${JAVA_HOME}/bin" +LDPATH="\${JAVA_HOME}/lib/:\${JAVA_HOME}/lib/server/" +MANPATH="" +PROVIDES_TYPE="JDK JRE" +PROVIDES_VERSION="${SLOT}" +BOOTCLASSPATH="" +GENERATION="2" +ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH" diff --git a/dev-java/openj9-openjdk-bin/metadata.xml b/dev-java/openj9-openjdk-bin/metadata.xml new file mode 100644 index 0000000..4b9f7e6 --- /dev/null +++ b/dev-java/openj9-openjdk-bin/metadata.xml @@ -0,0 +1,16 @@ + + + + + Java™ is the world's leading programming language and platform. + The code for Java is open source and available at OpenJDK™. + AdoptOpenJDK provides prebuilt OpenJDK binaries from a fully open source set of build scripts and infrastructure. + + + Don't install the X backend for AWT, needed by some GUIs (used to be X flag) + Allow this JDK to be recognised by Gentoo (package manager, eselect, java-config, EXPERIMENTAL!) + Support Java heap sizes greater than 57Gb + Install JVM sources + Provide javaws command through symlink to icedtea-web + + diff --git a/dev-java/openj9-openjdk-bin/openj9-openjdk-bin-11.0.8.10.0.21.0.ebuild b/dev-java/openj9-openjdk-bin/openj9-openjdk-bin-11.0.8.10.0.21.0.ebuild new file mode 100644 index 0000000..81410d2 --- /dev/null +++ b/dev-java/openj9-openjdk-bin/openj9-openjdk-bin-11.0.8.10.0.21.0.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit java-vm-2 toolchain-funcs versionator + +abi_uri() { + echo "${2-$1}? ( + large-heap? ( + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${DL_PV}/OpenJDK${SLOT}U-jdk_${1}_linux_openj9_linuxXL_${DL_PV//+/_}.tar.gz + ) + !large-heap? ( + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${DL_PV}/OpenJDK${SLOT}U-jdk_${1}_linux_openj9_${DL_PV//+/_}.tar.gz + ) + )" +} + +JDK_PV=$(get_version_component_range 1-3)+$(get_version_component_range 4) +DL_PV=${JDK_PV}_openj9-$(get_version_component_range 5-7) +SLOT=$(get_major_version) + +SRC_URI=" + $(abi_uri ppc64le ppc64) + $(abi_uri x64 amd64) +" + +DESCRIPTION="Prebuilt Java JDK binaries provided by AdoptOpenJDK" +HOMEPAGE="https://adoptopenjdk.net" +LICENSE="GPL-2-with-classpath-exception" +KEYWORDS="~amd64 ~ppc64" +IUSE="alsa cups doc +gentoo-vm headless-awt large-heap nsplugin selinux source webstart" + +RDEPEND=" + media-libs/fontconfig:1.0 + media-libs/freetype:2 + >=sys-apps/baselayout-java-0.1.0-r1 + >=sys-libs/glibc-2.2.5:* + sys-libs/zlib + alsa? ( media-libs/alsa-lib ) + cups? ( net-print/cups ) + doc? ( dev-java/java-sdk-docs:${SLOT} ) + selinux? ( sec-policy/selinux-java ) + !headless-awt? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrender + x11-libs/libXtst + )" + +PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 ) + nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )" + +RESTRICT="preserve-libs splitdebug" +QA_PREBUILT="*" + +S="${WORKDIR}/jdk-${JDK_PV}" + +pkg_pretend() { + if [[ "$(tc-is-softfloat)" != "no" ]]; then + die "These binaries require a hardfloat system." + fi +} + +src_install() { + local dest="/opt/${P}" + local ddest="${ED%/}/${dest#/}" + + # Not sure why they bundle this as it's commonly available and they + # only do so on x86_64. It's needed by libfontmanager.so. IcedTea + # also has an explicit dependency while Oracle seemingly dlopens it. + rm -vf lib/libfreetype.so || die + + # Oracle and IcedTea have libjsoundalsa.so depending on + # libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird. + if ! use alsa ; then + rm -v lib/libjsound.* || die + fi + + if use headless-awt ; then + rm -v lib/lib*{[jx]awt,splashscreen}* || die + fi + + if ! use source ; then + rm -v lib/src.zip || die + fi + + rm -v lib/security/cacerts || die + dosym ../../../../etc/ssl/certs/java/cacerts \ + "${dest}"/lib/security/cacerts + + dodir "${dest}" + cp -pPR * "${ddest}" || die + + # provide stable symlink + dosym "${P}" "/opt/${PN}-${SLOT}" + + 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 +} + +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 11. This JDK must therefore be invoked using its" + ewarn "absolute location under ${EPREFIX}/opt/${P}." + fi +} diff --git a/dev-java/openj9-openjdk-bin/openj9-openjdk-bin-14.0.2.12.0.21.0.ebuild b/dev-java/openj9-openjdk-bin/openj9-openjdk-bin-14.0.2.12.0.21.0.ebuild new file mode 100644 index 0000000..81410d2 --- /dev/null +++ b/dev-java/openj9-openjdk-bin/openj9-openjdk-bin-14.0.2.12.0.21.0.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit java-vm-2 toolchain-funcs versionator + +abi_uri() { + echo "${2-$1}? ( + large-heap? ( + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${DL_PV}/OpenJDK${SLOT}U-jdk_${1}_linux_openj9_linuxXL_${DL_PV//+/_}.tar.gz + ) + !large-heap? ( + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${DL_PV}/OpenJDK${SLOT}U-jdk_${1}_linux_openj9_${DL_PV//+/_}.tar.gz + ) + )" +} + +JDK_PV=$(get_version_component_range 1-3)+$(get_version_component_range 4) +DL_PV=${JDK_PV}_openj9-$(get_version_component_range 5-7) +SLOT=$(get_major_version) + +SRC_URI=" + $(abi_uri ppc64le ppc64) + $(abi_uri x64 amd64) +" + +DESCRIPTION="Prebuilt Java JDK binaries provided by AdoptOpenJDK" +HOMEPAGE="https://adoptopenjdk.net" +LICENSE="GPL-2-with-classpath-exception" +KEYWORDS="~amd64 ~ppc64" +IUSE="alsa cups doc +gentoo-vm headless-awt large-heap nsplugin selinux source webstart" + +RDEPEND=" + media-libs/fontconfig:1.0 + media-libs/freetype:2 + >=sys-apps/baselayout-java-0.1.0-r1 + >=sys-libs/glibc-2.2.5:* + sys-libs/zlib + alsa? ( media-libs/alsa-lib ) + cups? ( net-print/cups ) + doc? ( dev-java/java-sdk-docs:${SLOT} ) + selinux? ( sec-policy/selinux-java ) + !headless-awt? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrender + x11-libs/libXtst + )" + +PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 ) + nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )" + +RESTRICT="preserve-libs splitdebug" +QA_PREBUILT="*" + +S="${WORKDIR}/jdk-${JDK_PV}" + +pkg_pretend() { + if [[ "$(tc-is-softfloat)" != "no" ]]; then + die "These binaries require a hardfloat system." + fi +} + +src_install() { + local dest="/opt/${P}" + local ddest="${ED%/}/${dest#/}" + + # Not sure why they bundle this as it's commonly available and they + # only do so on x86_64. It's needed by libfontmanager.so. IcedTea + # also has an explicit dependency while Oracle seemingly dlopens it. + rm -vf lib/libfreetype.so || die + + # Oracle and IcedTea have libjsoundalsa.so depending on + # libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird. + if ! use alsa ; then + rm -v lib/libjsound.* || die + fi + + if use headless-awt ; then + rm -v lib/lib*{[jx]awt,splashscreen}* || die + fi + + if ! use source ; then + rm -v lib/src.zip || die + fi + + rm -v lib/security/cacerts || die + dosym ../../../../etc/ssl/certs/java/cacerts \ + "${dest}"/lib/security/cacerts + + dodir "${dest}" + cp -pPR * "${ddest}" || die + + # provide stable symlink + dosym "${P}" "/opt/${PN}-${SLOT}" + + 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 +} + +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 11. This JDK must therefore be invoked using its" + ewarn "absolute location under ${EPREFIX}/opt/${P}." + fi +} diff --git a/dev-java/openj9-openjdk-jre-bin/Manifest b/dev-java/openj9-openjdk-jre-bin/Manifest new file mode 100644 index 0000000..1717b02 --- /dev/null +++ b/dev-java/openj9-openjdk-jre-bin/Manifest @@ -0,0 +1,8 @@ +DIST OpenJDK11U-jre_ppc64le_linux_openj9_11.0.8_10_openj9-0.21.0.tar.gz 42189120 BLAKE2B de720db5ce4d40d5e9cf71a31f8979d190b72cf5510ff31fc755e24702174ccb59988b8e746b3ccb11cfdbc67039aa179f55a9864f139927e250b9edd8917267 SHA512 89e301db5d185d48614a4135349ee92e647e566bf222dd54ca3479226be645d29354d5ccbed1e9ea3b7ef73ba64b24b650fe814e20881292b6348a9aa25df1af +DIST OpenJDK11U-jre_ppc64le_linux_openj9_linuxXL_11.0.8_10_openj9-0.21.0.tar.gz 42082361 BLAKE2B e7dbc5a1deef3996a82c7207fe682e830d94bb143c16bb057f6609fe7b6b56d56569668751d3333af836dd3b45f5eef207916bf17eaecdeaa27b9fa359cbbe1e SHA512 7baa12613f3f4b4ef7a0301b5c1e262c3446e097cea763a7adfe2602785ad3ab3cb74cc542a17c6b7c717c0eb9f0304cde9a48b13f2864fff31bffdee5750dbd +DIST OpenJDK11U-jre_x64_linux_openj9_11.0.8_10_openj9-0.21.0.tar.gz 41781638 BLAKE2B 16be8630e7781c3f35072bbac254640a4d41f9b27799b56d7f78b63940e51d9f28a4168cbeaabd885562520d227e9efb4c9d80690c9ad02f8e0b7911023cb51e SHA512 51578fd2722c22cb50c678f74612409d34666ac8804c0efa705ed0d695c32ce3f5829f5fbe9be6d3336f39935b7eedad192621977c5e13f365b51e1fb03fd6df +DIST OpenJDK11U-jre_x64_linux_openj9_linuxXL_11.0.8_10_openj9-0.21.0.tar.gz 41774880 BLAKE2B 7e6d75ee457be194ae4c478cd9c4c8c64607b4ed19bf59d313d3ad643d57b1fa0c161ce74e0ae9d2d667a3016a977a6e6de3cd794429e69972010d472493d3fc SHA512 ac2111079c72e349122356275ab6d7b38b13188aec58ee97c7ced2daf3c98900c76abaf33bad5dd8f43321d6786bd71d0cc02836a5820eb0ce20b24b78262293 +DIST OpenJDK14U-jre_ppc64le_linux_openj9_14.0.2_12_openj9-0.21.0.tar.gz 50706170 BLAKE2B 3898aa34e9a5775c1b7ac343d73a105a996f1288b853e4dc80a66816c548b4ced435d77152f89cc8828cbd8b5c959a34c8c762753e52a3ff880840a7cb334885 SHA512 00400a14d35e722170e09d8a2d9357747244e3e2815fb7fd04769d4656b2847196b1c680215ba9e5ff0a849c778145cc7cea39878446c1f7404baa055b562603 +DIST OpenJDK14U-jre_ppc64le_linux_openj9_linuxXL_14.0.2_12_openj9-0.21.0.tar.gz 50281280 BLAKE2B c00c786fa760ddab538a17cb356638e25bf62930b86426956790be4a7c1c58bb94ca30f27a11587c757f628ef6a012dfbbcbbbf9878ee5899358bf590489b173 SHA512 abfb2df61390e288169e8fa75f3abb754358daa1da9ec904795a1bbcd11c5642bd24300763a84574d3567f6e697a3c347ec15c1740cc5fff4f2b5819abba631f +DIST OpenJDK14U-jre_x64_linux_openj9_14.0.2_12_openj9-0.21.0.tar.gz 50282552 BLAKE2B 099d9cea63981c13d0f545cb22aed7acb0686d77feda38af838e37a2c41d8918ea9261c6ae3195ad0c9e56cbfcbc18b8d69c8240afda5c89417d9eda5c38a863 SHA512 1071806ed9bc1aaf5f18cec271d32993e92cb9dc3fe21c42028bd9f25e7b1e2c362d00518ee2dd53000712fe74091379731669078eaaa7f33c440f4b95df061f +DIST OpenJDK14U-jre_x64_linux_openj9_linuxXL_14.0.2_12_openj9-0.21.0.tar.gz 50277370 BLAKE2B e450d4ca0cfbb556f4e19341da723605629161a17f18b192343e1413c81e61cc36517df3851231fe3845e4a29a2e7eb23dae26ae0055a02528e0516d9187aa54 SHA512 037a37ecb2e97c94ed752fb0e17278facd9e76d8ea729428491d709d6297e70d12161dd8392f32dfc0ac660ec960feb7aeea01521d770c01b6192b1bf0caa299 diff --git a/dev-java/openj9-openjdk-jre-bin/files/openjdk-jre-bin-11.env.sh b/dev-java/openj9-openjdk-jre-bin/files/openjdk-jre-bin-11.env.sh new file mode 100644 index 0000000..ec0dca4 --- /dev/null +++ b/dev-java/openj9-openjdk-jre-bin/files/openjdk-jre-bin-11.env.sh @@ -0,0 +1,16 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +VERSION="AdoptOpenJDK JRE ${PV}" +JAVA_HOME="${EPREFIX}/opt/${P}" +JDK_HOME="${EPREFIX}/opt/${P}" +JAVAC="\${JAVA_HOME}/bin/javac" +PATH="\${JAVA_HOME}/bin" +ROOTPATH="\${JAVA_HOME}/bin" +LDPATH="\${JAVA_HOME}/lib/:\${JAVA_HOME}/lib/server/" +MANPATH="\${JAVA_HOME}/man" +PROVIDES_TYPE="JRE" +PROVIDES_VERSION="${SLOT}" +BOOTCLASSPATH="" +GENERATION="2" +ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH" diff --git a/dev-java/openj9-openjdk-jre-bin/files/openjdk-jre-bin-8.env.sh b/dev-java/openj9-openjdk-jre-bin/files/openjdk-jre-bin-8.env.sh new file mode 100644 index 0000000..fabc13c --- /dev/null +++ b/dev-java/openj9-openjdk-jre-bin/files/openjdk-jre-bin-8.env.sh @@ -0,0 +1,16 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +VERSION="AdoptOpenJDK JRE ${PV}" +JAVA_HOME="${EPREFIX}/opt/${P}" +JDK_HOME="${EPREFIX}/opt/${P}" +JAVAC="\${JAVA_HOME}/bin/javac" +PATH="\${JAVA_HOME}/bin" +ROOTPATH="\${JAVA_HOME}/bin" +LDPATH="\${JAVA_HOME}/lib/:\${JAVA_HOME}/lib/server/" +MANPATH="\${JAVA_HOME}/man" +PROVIDES_TYPE="JRE" +PROVIDES_VERSION="1.${SLOT}" +BOOTCLASSPATH="\${JAVA_HOME}/jre/lib/resources.jar:\${JAVA_HOME}/jre/lib/rt.jar:\${JAVA_HOME}/jre/lib/jsse.jar:\${JAVA_HOME}/jre/lib/jce.jar:\${JAVA_HOME}/jre/lib/charsets.jar" +GENERATION="2" +ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH" diff --git a/dev-java/openj9-openjdk-jre-bin/metadata.xml b/dev-java/openj9-openjdk-jre-bin/metadata.xml new file mode 100644 index 0000000..23c1e7f --- /dev/null +++ b/dev-java/openj9-openjdk-jre-bin/metadata.xml @@ -0,0 +1,15 @@ + + + + + Java™ is the world's leading programming language and platform. + The code for Java is open source and available at OpenJDK™. + AdoptOpenJDK provides prebuilt OpenJDK JRE binaries from a fully open source set of build scripts and infrastructure. + + + Don't install the X backend for AWT, needed by some GUIs (used to be X flag) + Allow this JDK to be recognised by Gentoo (package manager, eselect, java-config, EXPERIMENTAL!) + Support Java heap sizes greater than 57Gb + Provide javaws command through symlink to icedtea-web + + diff --git a/dev-java/openj9-openjdk-jre-bin/openj9-openjdk-jre-bin-11.0.8.10.0.21.0.ebuild b/dev-java/openj9-openjdk-jre-bin/openj9-openjdk-jre-bin-11.0.8.10.0.21.0.ebuild new file mode 100644 index 0000000..6a9311e --- /dev/null +++ b/dev-java/openj9-openjdk-jre-bin/openj9-openjdk-jre-bin-11.0.8.10.0.21.0.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit java-vm-2 toolchain-funcs versionator + +abi_uri() { + echo "${2-$1}? ( + large-heap? ( + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${DL_PV}/OpenJDK${SLOT}U-jre_${1}_linux_openj9_linuxXL_${DL_PV//+/_}.tar.gz + ) + !large-heap? ( + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${DL_PV}/OpenJDK${SLOT}U-jre_${1}_linux_openj9_${DL_PV//+/_}.tar.gz + ) + )" +} + +JDK_PV=$(get_version_component_range 1-3)+$(get_version_component_range 4) +DL_PV=${JDK_PV}_openj9-$(get_version_component_range 5-7) +SLOT=$(get_major_version) + +SRC_URI=" + $(abi_uri ppc64le ppc64) + $(abi_uri x64 amd64) +" + +DESCRIPTION="Prebuilt Java JRE binaries provided by AdoptOpenJDK" +HOMEPAGE="https://adoptopenjdk.net" +LICENSE="GPL-2-with-classpath-exception" +KEYWORDS="~amd64" +IUSE="alsa cups +gentoo-vm large-heap headless-awt nsplugin selinux webstart" + +RDEPEND=" + media-libs/fontconfig:1.0 + media-libs/freetype:2 + >net-libs/libnet-1.1 + >=sys-apps/baselayout-java-0.1.0-r1 + >=sys-libs/glibc-2.2.5:* + sys-libs/zlib + alsa? ( media-libs/alsa-lib ) + cups? ( net-print/cups ) + selinux? ( sec-policy/selinux-java ) + !headless-awt? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrender + x11-libs/libXtst + )" + +PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 ) + nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )" + +RESTRICT="preserve-libs splitdebug" +QA_PREBUILT="*" + +S="${WORKDIR}/jdk-${MY_PV}-jre" + +src_install() { + local dest="/opt/${P}" + local ddest="${ED%/}/${dest#/}" + + # Not sure why they bundle this as it's commonly available and they + # only do so on x86_64. It's needed by libfontmanager.so. IcedTea + # also has an explicit dependency while Oracle seemingly dlopens it. + rm -vf lib/libfreetype.so || die + + # Oracle and IcedTea have libjsoundalsa.so depending on + # libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird. + if ! use alsa ; then + rm -v lib/libjsound.* || die + fi + + if use headless-awt ; then + rm -v lib/lib*{[jx]awt,splashscreen}* || die + fi + + rm -v lib/security/cacerts || die + dosym ../../../../etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts + + dodir "${dest}" + cp -pPR * "${ddest}" || die + + # provide stable symlink + dosym "${P}" "/opt/${PN}-${SLOT}" + + 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 +} + +pkg_postinst() { + java-vm-2_pkg_postinst + + if use gentoo-vm ; then + ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JRE" + 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 JRE" + 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 11. This JRE must therefore be invoked using its" + ewarn "absolute location under ${EPREFIX}/opt/${P}." + fi +} diff --git a/dev-java/openj9-openjdk-jre-bin/openj9-openjdk-jre-bin-14.0.2.12.0.21.0.ebuild b/dev-java/openj9-openjdk-jre-bin/openj9-openjdk-jre-bin-14.0.2.12.0.21.0.ebuild new file mode 100644 index 0000000..6a9311e --- /dev/null +++ b/dev-java/openj9-openjdk-jre-bin/openj9-openjdk-jre-bin-14.0.2.12.0.21.0.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit java-vm-2 toolchain-funcs versionator + +abi_uri() { + echo "${2-$1}? ( + large-heap? ( + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${DL_PV}/OpenJDK${SLOT}U-jre_${1}_linux_openj9_linuxXL_${DL_PV//+/_}.tar.gz + ) + !large-heap? ( + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${DL_PV}/OpenJDK${SLOT}U-jre_${1}_linux_openj9_${DL_PV//+/_}.tar.gz + ) + )" +} + +JDK_PV=$(get_version_component_range 1-3)+$(get_version_component_range 4) +DL_PV=${JDK_PV}_openj9-$(get_version_component_range 5-7) +SLOT=$(get_major_version) + +SRC_URI=" + $(abi_uri ppc64le ppc64) + $(abi_uri x64 amd64) +" + +DESCRIPTION="Prebuilt Java JRE binaries provided by AdoptOpenJDK" +HOMEPAGE="https://adoptopenjdk.net" +LICENSE="GPL-2-with-classpath-exception" +KEYWORDS="~amd64" +IUSE="alsa cups +gentoo-vm large-heap headless-awt nsplugin selinux webstart" + +RDEPEND=" + media-libs/fontconfig:1.0 + media-libs/freetype:2 + >net-libs/libnet-1.1 + >=sys-apps/baselayout-java-0.1.0-r1 + >=sys-libs/glibc-2.2.5:* + sys-libs/zlib + alsa? ( media-libs/alsa-lib ) + cups? ( net-print/cups ) + selinux? ( sec-policy/selinux-java ) + !headless-awt? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrender + x11-libs/libXtst + )" + +PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 ) + nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )" + +RESTRICT="preserve-libs splitdebug" +QA_PREBUILT="*" + +S="${WORKDIR}/jdk-${MY_PV}-jre" + +src_install() { + local dest="/opt/${P}" + local ddest="${ED%/}/${dest#/}" + + # Not sure why they bundle this as it's commonly available and they + # only do so on x86_64. It's needed by libfontmanager.so. IcedTea + # also has an explicit dependency while Oracle seemingly dlopens it. + rm -vf lib/libfreetype.so || die + + # Oracle and IcedTea have libjsoundalsa.so depending on + # libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird. + if ! use alsa ; then + rm -v lib/libjsound.* || die + fi + + if use headless-awt ; then + rm -v lib/lib*{[jx]awt,splashscreen}* || die + fi + + rm -v lib/security/cacerts || die + dosym ../../../../etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts + + dodir "${dest}" + cp -pPR * "${ddest}" || die + + # provide stable symlink + dosym "${P}" "/opt/${PN}-${SLOT}" + + 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 +} + +pkg_postinst() { + java-vm-2_pkg_postinst + + if use gentoo-vm ; then + ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JRE" + 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 JRE" + 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 11. This JRE must therefore be invoked using its" + ewarn "absolute location under ${EPREFIX}/opt/${P}." + fi +} diff --git a/dev-java/openj9-openjdk/Manifest b/dev-java/openj9-openjdk/Manifest new file mode 100644 index 0000000..a97ce7d --- /dev/null +++ b/dev-java/openj9-openjdk/Manifest @@ -0,0 +1,4 @@ +DIST openj9-0.21.0.tar.gz 16216102 BLAKE2B 7536e61b742562b7782239d600b78bfa4c00850589cc80bbe8820d97842db55cc001bfbdbb81eb1da534c250a4315ce772fdbe1bcdd1e26863df1fb548618853 SHA512 8137318d9cde6a6383539d2b1a0535951cab178d4f31ccd83260460bdf2b57569e784d205d2fd6e17e0fbc04b6e4aa5a57b81fe46112d38eb0fc5b374b55cf16 +DIST openj9-omr-0.21.0.tar.gz 7704671 BLAKE2B e97b4bd8b975814af74c569f71a4aa35df373eb8c583d21a44065e2db140eca3649b674b5347fd031831c10701ccdb2a263eeeacf19bd4831c1e63ab18398f65 SHA512 7eed6eb68d251934291be859f061801b41b95abc481d3e3d059fc4f3eee94ba2b31143aa00b9abd39dc2325540ed0a4f16e075396e34741f57e36fe69d376b0f +DIST openj9-openjdk-jdk11-openj9-0.21.0.tar.gz 104216281 BLAKE2B 21716b92b07a72be19b53f926dc1248e633ba01a82f0ad841883eed325d3caaa887c6ea87c8f2e13aff9f230d981418d2b7ff6bd6fb99cf0ff6dcda948c6a3dc SHA512 2b915c88b62b04c0549037d6be42428ba9f99b51f00d364c0ba9c9c7340d1b67da99f583a2623b04d8708703f789ef680ea70b8259e8557af34da830a136a0d8 +DIST openj9-openjdk-jdk14-openj9-0.21.0.tar.gz 95491120 BLAKE2B b4d17dadda4d209f04126520ec5a86fc38bfab6af75d9ce2047555c8cec0dca28205b1a056b7294c111947cafa2eaaadebb2851ec8958367626e9c4b0940ad57 SHA512 83b08fc63dfc06e97583720ccfb4643f07398700b93d8328a5fd730764bba9665cde57e7f149024f11e752aa04f6450114dd3cecf5e589e24991c3340292c009 diff --git a/dev-java/openj9-openjdk/files/omr-fam.patch b/dev-java/openj9-openjdk/files/omr-fam.patch new file mode 100644 index 0000000..9141ec1 --- /dev/null +++ b/dev-java/openj9-openjdk/files/omr-fam.patch @@ -0,0 +1,70 @@ +diff --git a/ddr/tools/blob_reader/blob_reader.cpp b/ddr/tools/blob_reader/blob_reader.cpp +index 028decd0c..a0212609f 100644 +--- a/ddr/tools/blob_reader/blob_reader.cpp ++++ b/ddr/tools/blob_reader/blob_reader.cpp +@@ -85,7 +85,7 @@ struct BlobHeaderV1 { + + struct BlobString { + uint16_t length; +- char data[1]; /* flexible array member */ ++ char data[]; + + void endian_swap() + { +diff --git a/include_core/ute_core.h b/include_core/ute_core.h +index 8b3b1c65d..330ea52c6 100644 +--- a/include_core/ute_core.h ++++ b/include_core/ute_core.h +@@ -125,7 +125,7 @@ typedef struct UtTraceRecord { + uint64_t threadSyn2; /* Thread synonym 2 */ + int32_t firstEntry; /* Offset to first trace entry */ + int32_t nextEntry; /* Offset to next entry */ +- char threadName[1]; /* Thread name */ ++ char threadName[]; /* Thread name */ + } UtTraceRecord; + + /* +diff --git a/include_core/ute_dataformat.h b/include_core/ute_dataformat.h +index 71d9e36ad..8a9dcb487 100644 +--- a/include_core/ute_dataformat.h ++++ b/include_core/ute_dataformat.h +@@ -180,7 +180,7 @@ typedef struct UtProcSection { + #define UT_TRACE_ACTIVE_SECTION_NAME "UTTA" + typedef struct UtActiveSection { + UtDataHeader header; /* Eyecatcher, version etc */ +- char active[1]; /* Trace activation commands */ ++ char active[]; /* Trace activation commands */ + } UtActiveSection; + + /* +@@ -191,7 +191,7 @@ typedef struct UtActiveSection { + #define UT_TRACE_SERVICE_SECTION_NAME "UTSS" + typedef struct UtServiceSection { + UtDataHeader header; /* Eyecatcher, version etc */ +- char level[1]; /* Service level info */ ++ char level[]; /* Service level info */ + } UtServiceSection; + + /* +@@ -202,7 +202,7 @@ typedef struct UtServiceSection { + #define UT_TRACE_STARTUP_SECTION_NAME "UTSO" + typedef struct UtStartupSection { + UtDataHeader header; /* Eyecatcher, version etc */ +- char options[1]; /* Startup options */ ++ char options[]; /* Startup options */ + } UtStartupSection; + + /* +diff --git a/omrtrace/omrtrace_internal.h b/omrtrace/omrtrace_internal.h +index e52347eac..a68a88abd 100644 +--- a/omrtrace/omrtrace_internal.h ++++ b/omrtrace/omrtrace_internal.h +@@ -157,7 +157,7 @@ typedef struct OMR_TraceGlobal OMR_TraceGlobal; + typedef struct UtTraceCfg { + UtDataHeader header; + struct UtTraceCfg *next; /* Next trace config command */ +- char command[1]; /* Start of variable length section */ ++ char command[]; /* Start of variable length section */ + } UtTraceCfg; + + typedef struct UtDeferredConfigInfo { diff --git a/dev-java/openj9-openjdk/files/omr-omrstr-iconv-failure-overflow.patch b/dev-java/openj9-openjdk/files/omr-omrstr-iconv-failure-overflow.patch new file mode 100644 index 0000000..f90c431 --- /dev/null +++ b/dev-java/openj9-openjdk/files/omr-omrstr-iconv-failure-overflow.patch @@ -0,0 +1,13 @@ +diff --git a/port/common/omrstr.c b/port/common/omrstr.c +index ad76cdf93..f936f0026 100644 +--- a/port/common/omrstr.c ++++ b/port/common/omrstr.c +@@ -3121,7 +3121,7 @@ convertPlatformToWide(struct OMRPortLibrary *portLibrary, charconvState_t encodi + } else if (E2BIG == errno) { + resultSize = (outBufferSize - wideBufferLimit); /* number of bytes written */ + } else { +- resultSize = OMRPORT_ERROR_STRING_ILLEGAL_STRING; ++ return OMRPORT_ERROR_STRING_ILLEGAL_STRING; + } + } else { + resultSize = (outBufferSize - wideBufferLimit); /* number of bytes written */ diff --git a/dev-java/openj9-openjdk/files/openj9-j9utf8-fam.patch b/dev-java/openj9-openjdk/files/openj9-j9utf8-fam.patch new file mode 100644 index 0000000..f45a539 --- /dev/null +++ b/dev-java/openj9-openjdk/files/openj9-j9utf8-fam.patch @@ -0,0 +1,26 @@ +diff --git a/runtime/cfdumper/romdump.c b/runtime/cfdumper/romdump.c +index 5040c2c25..1cfcd36c7 100644 +--- a/runtime/cfdumper/romdump.c ++++ b/runtime/cfdumper/romdump.c +@@ -154,7 +154,7 @@ addRegion(J9Pool *regionPool, UDATA offset, UDATA length, UDATA type, const char + static UDATA + getUTF8Length(J9UTF8 *utf8) + { +- UDATA length = sizeof(J9UTF8) + J9UTF8_LENGTH(utf8) - sizeof(J9UTF8_DATA(utf8)); ++ UDATA length = sizeof(J9UTF8) + J9UTF8_LENGTH(utf8); + if (length & 1) { + length++; + } +diff --git a/runtime/oti/j9nonbuilder.h b/runtime/oti/j9nonbuilder.h +index c5705188d..e9babe227 100644 +--- a/runtime/oti/j9nonbuilder.h ++++ b/runtime/oti/j9nonbuilder.h +@@ -3219,7 +3219,7 @@ typedef struct J9ClassLoader { + + typedef struct J9UTF8 { + U_16 length; +- U_8 data[2]; ++ U_8 data[]; + } J9UTF8; + + typedef struct J9ROMClass { diff --git a/dev-java/openj9-openjdk/files/openj9-make-jvmti-test-variables-static.patch b/dev-java/openj9-openjdk/files/openj9-make-jvmti-test-variables-static.patch new file mode 100644 index 0000000..5d5b8a7 --- /dev/null +++ b/dev-java/openj9-openjdk/files/openj9-make-jvmti-test-variables-static.patch @@ -0,0 +1,68 @@ +From b91f42fc90179585c3e2a9866e93a3168b1ada9d Mon Sep 17 00:00:00 2001 +From: Graham Chapman +Date: Sat, 25 Jul 2020 16:13:13 -0400 +Subject: [PATCH] Make JVMTI test variables static + +Two tests declare the same named global non-statically which breaks some +newer compilers. + +Fixes: #10252 + +[ci skip] + +Signed-off-by: Graham Chapman +--- + .../src/com/ibm/jvmti/tests/traceSubscription/ts001.c | 4 ++-- + .../jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c | 8 ++++---- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c +index 97843fc7c7..2c1e1ae67f 100644 +--- a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c ++++ b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c +@@ -1,5 +1,5 @@ + /******************************************************************************* +- * Copyright (c) 2001, 2018 IBM Corp. and others ++ * Copyright (c) 2001, 2020 IBM Corp. and others + * + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which accompanies this +@@ -35,7 +35,7 @@ static jvmtiExtensionFunction subscribe = NULL; + static jvmtiExtensionFunction unsubscribe = NULL; + static jvmtiExtensionFunction flush = NULL; + static jvmtiExtensionFunction metadata = NULL; +-void *subscriptionID; ++static void *subscriptionID; + volatile static jint bufferCount = 0; + volatile static jint bufferCountFinal = 0; + volatile static int completed = 0; +diff --git a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c +index 2fda9e8bd7..f1601298af 100644 +--- a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c ++++ b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c +@@ -1,5 +1,5 @@ + /******************************************************************************* +- * Copyright (c) 2001, 2018 IBM Corp. and others ++ * Copyright (c) 2001, 2020 IBM Corp. and others + * + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which accompanies this +@@ -31,15 +31,15 @@ static agentEnv * env; + static jvmtiExtensionFunction subscribe = NULL; + static jvmtiExtensionFunction unsubscribe = NULL; + +-void *subscriptionID; ++static void *subscriptionID; + volatile static jint bufferCount = 0; + volatile static int alarmed = 0; + +-void *subscriptionID2; ++static void *subscriptionID2; + volatile static jint bufferCount2 = 0; + volatile static int alarmed2 = 0; + +-void *subscriptionID3; ++static void *subscriptionID3; + volatile static jint bufferCount3 = 0; + volatile static int alarmed3 = 0; + diff --git a/dev-java/openj9-openjdk/files/openj9-subscriptionID.patch b/dev-java/openj9-openjdk/files/openj9-subscriptionID.patch new file mode 100644 index 0000000..e754e05 --- /dev/null +++ b/dev-java/openj9-openjdk/files/openj9-subscriptionID.patch @@ -0,0 +1,36 @@ +diff --git a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c +index 97843fc7c..a2cc3ffe6 100644 +--- a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c ++++ b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/traceSubscription/ts001.c +@@ -35,7 +35,7 @@ static jvmtiExtensionFunction subscribe = NULL; + static jvmtiExtensionFunction unsubscribe = NULL; + static jvmtiExtensionFunction flush = NULL; + static jvmtiExtensionFunction metadata = NULL; +-void *subscriptionID; ++static void *subscriptionID; + volatile static jint bufferCount = 0; + volatile static jint bufferCountFinal = 0; + volatile static int completed = 0; +diff --git a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c +index 2fda9e8bd..d11047e44 100644 +--- a/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c ++++ b/runtime/tests/jvmtitests/src/com/ibm/jvmti/tests/verboseGC/vgc001.c +@@ -31,15 +31,15 @@ static agentEnv * env; + static jvmtiExtensionFunction subscribe = NULL; + static jvmtiExtensionFunction unsubscribe = NULL; + +-void *subscriptionID; ++static void *subscriptionID; + volatile static jint bufferCount = 0; + volatile static int alarmed = 0; + +-void *subscriptionID2; ++static void *subscriptionID2; + volatile static jint bufferCount2 = 0; + volatile static int alarmed2 = 0; + +-void *subscriptionID3; ++static void *subscriptionID3; + volatile static jint bufferCount3 = 0; + volatile static int alarmed3 = 0; + diff --git a/dev-java/openj9-openjdk/files/openjdk-14.env.sh b/dev-java/openj9-openjdk/files/openjdk-14.env.sh new file mode 100644 index 0000000..96c4be7 --- /dev/null +++ b/dev-java/openj9-openjdk/files/openjdk-14.env.sh @@ -0,0 +1,16 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +VERSION="OpenJDK ${PV}" +JAVA_HOME="${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}" +JDK_HOME="${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}" +JAVAC="\${JAVA_HOME}/bin/javac" +PATH="\${JAVA_HOME}/bin" +ROOTPATH="\${JAVA_HOME}/bin" +LDPATH="\${JAVA_HOME}/lib/:\${JAVA_HOME}/lib/server/" +MANPATH="" +PROVIDES_TYPE="JDK JRE" +PROVIDES_VERSION="${SLOT}" +BOOTCLASSPATH="" +GENERATION="2" +ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH" diff --git a/dev-java/openj9-openjdk/files/openjdk-8238380-childproc-fcommon.patch b/dev-java/openj9-openjdk/files/openjdk-8238380-childproc-fcommon.patch new file mode 100644 index 0000000..a972bc6 --- /dev/null +++ b/dev-java/openj9-openjdk/files/openjdk-8238380-childproc-fcommon.patch @@ -0,0 +1,48 @@ + +# HG changeset patch +# User qpzhang +# Date 1580822830 -28800 +# Node ID 6925fca959590dd0f747a9cffa5f0664ec02c7b1 +# Parent 8f6ffa575f63db3f07f96e52c97883fbaff459b4 +8238380: java.base/unix/native/libjava/childproc.c "multiple definition" link errors with GCC10 +Reviewed-by: stuefe, clanger, rriggs +Contributed-by: patrick@os.amperecomputing.com + +diff -r 8f6ffa575f63 -r 6925fca95959 src/java.base/unix/native/libjava/childproc.c +--- a/src/java.base/unix/native/libjava/childproc.c Tue Feb 11 11:17:37 2020 +0800 ++++ b/src/java.base/unix/native/libjava/childproc.c Tue Feb 04 21:27:10 2020 +0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -34,6 +34,7 @@ + + #include "childproc.h" + ++const char * const *parentPathv; + + ssize_t + restartableWrite(int fd, const void *buf, size_t count) +diff -r 8f6ffa575f63 -r 6925fca95959 src/java.base/unix/native/libjava/childproc.h +--- a/src/java.base/unix/native/libjava/childproc.h Tue Feb 11 11:17:37 2020 +0800 ++++ b/src/java.base/unix/native/libjava/childproc.h Tue Feb 04 21:27:10 2020 +0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -126,7 +126,7 @@ + * The cached and split version of the JDK's effective PATH. + * (We don't support putenv("PATH=...") in native code) + */ +-const char * const *parentPathv; ++extern const char * const *parentPathv; + + ssize_t restartableWrite(int fd, const void *buf, size_t count); + int restartableDup2(int fd_from, int fd_to); + diff --git a/dev-java/openj9-openjdk/metadata.xml b/dev-java/openj9-openjdk/metadata.xml new file mode 100644 index 0000000..2c13f5e --- /dev/null +++ b/dev-java/openj9-openjdk/metadata.xml @@ -0,0 +1,21 @@ + + + + + Java™ is the world's leading programming language and platform. + The code for Java is open source and available at OpenJDK™. + + + Java™ version 11 + + + Use custom -O flags instead of upstream defaults + Enable Direct Dump Reader + Don't install the X backend for AWT, needed by some GUIs + Allow this JDK to be recognised by Gentoo (package manager, eselect, java-config, EXPERIMENTAL!) + Import OpenJFX modules at build time, via dev-java/openjfx + Build OpenJDK twice, the second time using the result of the first + Enable SystemTAP/DTrace tracing + Provide javaws command through symlink to icedtea-web + + diff --git a/dev-java/openj9-openjdk/openj9-openjdk-11.0.21.0.ebuild b/dev-java/openj9-openjdk/openj9-openjdk-11.0.21.0.ebuild new file mode 100644 index 0000000..f3a49a3 --- /dev/null +++ b/dev-java/openj9-openjdk/openj9-openjdk-11.0.21.0.ebuild @@ -0,0 +1,318 @@ +# Copyright 1999-2020 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 + +# we need -ga tag to fetch tarball and unpack it, but exact number everywhere else to +# set build version properly +SLOT="$(get_major_version)" +OPENJ9_PV="$(get_version_component_range 2-4)" +OPENJ9_P=openj9-${OPENJ9_PV} +FREEMARKER_PV=2.3.30 + +DESCRIPTION="Open source implementation of the Java programming language" +HOMEPAGE="https://openjdk.java.net" +SRC_URI=" + https://github.com/ibmruntimes/openj9-openjdk-jdk${SLOT}/archive/${OPENJ9_P}.tar.gz -> openj9-openjdk-jdk${SLOT}-${OPENJ9_P}.tar.gz + https://github.com/eclipse/openj9/archive/${OPENJ9_P}.tar.gz -> ${OPENJ9_P}.tar.gz + https://github.com/eclipse/openj9-omr/archive/${OPENJ9_P}.tar.gz -> openj9-omr-${OPENJ9_PV}.tar.gz + " + +LICENSE="GPL-2" +KEYWORDS="~amd64" + +IUSE="alsa custom-cflags custom-optimization cups ddr debug doc gentoo-vm headless-awt javafx +jbootstrap nsplugin +pch selinux 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 ) + + dev-libs/elfutils + dev-libs/libdwarf + sys-process/numactl +" + +# 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} + ) + || ( + dev-java/freemarker-bin + dev-java/freemarker + ) +" + +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}/openj9-openjdk-jdk${SLOT}-${OPENJ9_P} + +# 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) + + 192 + $M )) + + CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} +} + +pkg_pretend() { + openjdk_check_requirements + if [[ ${MERGE_TYPE} != binary ]]; then + has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}" + fi +} + +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() { + ln -s ../openj9-${OPENJ9_P} openj9 || die + ln -s ../openj9-omr-${OPENJ9_P} omr || die + default + ( + cd openj9 || die + #eapply "${FILESDIR}/openj9-j9utf8-fam.patch" + eapply "${FILESDIR}/openj9-make-jvmti-test-variables-static.patch" + ) + ( + cd omr || die + eapply "${FILESDIR}/omr-omrstr-iconv-failure-overflow.patch" + #eapply "${FILESDIR}/omr-fam.patch" + ) + sed -i -e '/^OPENJ9_SHA :=/s/:=.*/:= '${OPENJ9_P}/ \ + -e '/^OPENJ9_TAG :=/s/:=.*/:= '${OPENJ9_P}/ \ + -e '/^OPENJ9OMR_SHA :=/s/:=.*/:= '${OPENJ9_P}/ \ + closed/OpenJ9.gmk + chmod +x configure || die +} + +src_configure() { + if ! use custom-cflags; then + strip-flags + + # Work around stack alignment issue, bug #647954. in case we ever have x86 + use x86 && append-flags -mincoming-stack-boundary=2 + + # Work around -fno-common ( GCC10 default ), bug #713180 + append-flags -fcommon + fi + + if ! use custom-optimization; then + filter-flags '-O*' + fi + + local freemarker_jar + local diefunc=$(declare -f die) + die() { :; } + freemarker_jar=$(java-pkg_getjar --build-only freemarker freemarker.jar) + local r=$? + eval "$diefunc" + if [[ $r != 0 ]]; then + freemarker_jar=$(java-pkg_getjar --build-only freemarker-bin freemarker.jar) + fi + + # 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-zlib=system + --enable-dtrace=$(usex systemtap yes no) + --enable-headless-only=$(usex headless-awt yes no) + --with-vendor-version-string="${PVR}" + --with-version-pre="" + + --with-freemarker-jar=${freemarker_jar} + --disable-warnings-as-errors{,-omr,-openj9} + $(use_enable ddr) + ) + + 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 JAVA_TOOL_OPTIONS 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/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 + + rm -v lib/security/cacerts || die + + dodir "${dest}" + cp -pPR * "${ddest}" || die + + dosym ../../../../../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 + docinto html + dodoc -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/openj9-openjdk/openj9-openjdk-14.0.21.0.ebuild b/dev-java/openj9-openjdk/openj9-openjdk-14.0.21.0.ebuild new file mode 100644 index 0000000..f3a49a3 --- /dev/null +++ b/dev-java/openj9-openjdk/openj9-openjdk-14.0.21.0.ebuild @@ -0,0 +1,318 @@ +# Copyright 1999-2020 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 + +# we need -ga tag to fetch tarball and unpack it, but exact number everywhere else to +# set build version properly +SLOT="$(get_major_version)" +OPENJ9_PV="$(get_version_component_range 2-4)" +OPENJ9_P=openj9-${OPENJ9_PV} +FREEMARKER_PV=2.3.30 + +DESCRIPTION="Open source implementation of the Java programming language" +HOMEPAGE="https://openjdk.java.net" +SRC_URI=" + https://github.com/ibmruntimes/openj9-openjdk-jdk${SLOT}/archive/${OPENJ9_P}.tar.gz -> openj9-openjdk-jdk${SLOT}-${OPENJ9_P}.tar.gz + https://github.com/eclipse/openj9/archive/${OPENJ9_P}.tar.gz -> ${OPENJ9_P}.tar.gz + https://github.com/eclipse/openj9-omr/archive/${OPENJ9_P}.tar.gz -> openj9-omr-${OPENJ9_PV}.tar.gz + " + +LICENSE="GPL-2" +KEYWORDS="~amd64" + +IUSE="alsa custom-cflags custom-optimization cups ddr debug doc gentoo-vm headless-awt javafx +jbootstrap nsplugin +pch selinux 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 ) + + dev-libs/elfutils + dev-libs/libdwarf + sys-process/numactl +" + +# 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} + ) + || ( + dev-java/freemarker-bin + dev-java/freemarker + ) +" + +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}/openj9-openjdk-jdk${SLOT}-${OPENJ9_P} + +# 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) + + 192 + $M )) + + CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} +} + +pkg_pretend() { + openjdk_check_requirements + if [[ ${MERGE_TYPE} != binary ]]; then + has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}" + fi +} + +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() { + ln -s ../openj9-${OPENJ9_P} openj9 || die + ln -s ../openj9-omr-${OPENJ9_P} omr || die + default + ( + cd openj9 || die + #eapply "${FILESDIR}/openj9-j9utf8-fam.patch" + eapply "${FILESDIR}/openj9-make-jvmti-test-variables-static.patch" + ) + ( + cd omr || die + eapply "${FILESDIR}/omr-omrstr-iconv-failure-overflow.patch" + #eapply "${FILESDIR}/omr-fam.patch" + ) + sed -i -e '/^OPENJ9_SHA :=/s/:=.*/:= '${OPENJ9_P}/ \ + -e '/^OPENJ9_TAG :=/s/:=.*/:= '${OPENJ9_P}/ \ + -e '/^OPENJ9OMR_SHA :=/s/:=.*/:= '${OPENJ9_P}/ \ + closed/OpenJ9.gmk + chmod +x configure || die +} + +src_configure() { + if ! use custom-cflags; then + strip-flags + + # Work around stack alignment issue, bug #647954. in case we ever have x86 + use x86 && append-flags -mincoming-stack-boundary=2 + + # Work around -fno-common ( GCC10 default ), bug #713180 + append-flags -fcommon + fi + + if ! use custom-optimization; then + filter-flags '-O*' + fi + + local freemarker_jar + local diefunc=$(declare -f die) + die() { :; } + freemarker_jar=$(java-pkg_getjar --build-only freemarker freemarker.jar) + local r=$? + eval "$diefunc" + if [[ $r != 0 ]]; then + freemarker_jar=$(java-pkg_getjar --build-only freemarker-bin freemarker.jar) + fi + + # 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-zlib=system + --enable-dtrace=$(usex systemtap yes no) + --enable-headless-only=$(usex headless-awt yes no) + --with-vendor-version-string="${PVR}" + --with-version-pre="" + + --with-freemarker-jar=${freemarker_jar} + --disable-warnings-as-errors{,-omr,-openj9} + $(use_enable ddr) + ) + + 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 JAVA_TOOL_OPTIONS 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/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 + + rm -v lib/security/cacerts || die + + dodir "${dest}" + cp -pPR * "${ddest}" || die + + dosym ../../../../../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 + docinto html + dodoc -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-bin/Manifest b/dev-java/openjdk-bin/Manifest new file mode 100644 index 0000000..35c8b2d --- /dev/null +++ b/dev-java/openjdk-bin/Manifest @@ -0,0 +1,4 @@ +DIST OpenJDK14U-jdk_aarch64_linux_hotspot_14.0.2_12.tar.gz 208174601 BLAKE2B b721417687095109ff6eebdf366df5fb6f3f36393bd9681aa8246213363459c54ef2e7a2ff9b1555ce84572eb29c9c1bb671cd7705fe85f3b2822942138a7957 SHA512 dde5b262092abce8da1aff63cda75c9e47cd9d11597d3ccf8595f8c24a2299da9a161bf827e47480ce74daa60625a30502f894497b03217c7724f6ff19603b95 +DIST OpenJDK14U-jdk_arm_linux_hotspot_14.0.2_12.tar.gz 196776784 BLAKE2B 36d43f63ea0a1b30a62fffe72c542110cc9f3f0824a09c03a2c481b8d43d8459554e6585bf5a80f6e35f1d01e423038f40a0352812c167c9892242bd3cca7af1 SHA512 52a38a7a95e7ed7a385ecef33c6667ddec4e2b49652c1ca482c314fc528edb0c4322326f3839da22454058f950058433ad1465bc75da7e516d6b159ead45e55d +DIST OpenJDK14U-jdk_ppc64le_linux_hotspot_14.0.2_12.tar.gz 192668722 BLAKE2B e883354d400169b2252c35f1af63ce90413b0bfff686ef5e0222a5f22cb7443627035ee52b93cb63cebc66f4f4d670eacfbee896ee2431c26cfd9822435f58a3 SHA512 4115be505b0a2ebde43385bea53b119edae2ece62db87ca0c256040e4c2051163f5c307867edd145d617fc4776988777322034830328c8977bffa281620bfa8e +DIST OpenJDK14U-jdk_x64_linux_hotspot_14.0.2_12.tar.gz 210764986 BLAKE2B 6a9613aa109197dd0e9b23097238da49dbb649cb5c5eac032534be80b4bbcd972548a84b4fb31e8a0dd3011268733d23d5c6b6660da7282d94a6a19cc128f0e4 SHA512 2701f7e08bc1f03f13bbea2b3567c12d96b23a27e5a7420addd696397f1fbee7e84283df64976c647218f1b321cda8ae0ca3b2eda057f5ebe335a17aae71917a diff --git a/dev-java/openjdk-bin/files/openjdk-bin-14.env.sh b/dev-java/openjdk-bin/files/openjdk-bin-14.env.sh new file mode 100644 index 0000000..9e9c5ec --- /dev/null +++ b/dev-java/openjdk-bin/files/openjdk-bin-14.env.sh @@ -0,0 +1,16 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +VERSION="AdoptOpenJDK ${PV}" +JAVA_HOME="${EPREFIX}/opt/${P}" +JDK_HOME="${EPREFIX}/opt/${P}" +JAVAC="\${JAVA_HOME}/bin/javac" +PATH="\${JAVA_HOME}/bin" +ROOTPATH="\${JAVA_HOME}/bin" +LDPATH="\${JAVA_HOME}/lib/:\${JAVA_HOME}/lib/server/" +MANPATH="" +PROVIDES_TYPE="JDK JRE" +PROVIDES_VERSION="${SLOT}" +BOOTCLASSPATH="" +GENERATION="2" +ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH" diff --git a/dev-java/openjdk-bin/metadata.xml b/dev-java/openjdk-bin/metadata.xml new file mode 100644 index 0000000..439b4e1 --- /dev/null +++ b/dev-java/openjdk-bin/metadata.xml @@ -0,0 +1,15 @@ + + + + + Java™ is the world's leading programming language and platform. + The code for Java is open source and available at OpenJDK™. + AdoptOpenJDK provides prebuilt OpenJDK binaries from a fully open source set of build scripts and infrastructure. + + + Don't install the X backend for AWT, needed by some GUIs (used to be X flag) + Allow this JDK to be recognised by Gentoo (package manager, eselect, java-config, EXPERIMENTAL!) + Install JVM sources + Provide javaws command through symlink to icedtea-web + + diff --git a/dev-java/openjdk-bin/openjdk-bin-14.0.2_p12.ebuild b/dev-java/openjdk-bin/openjdk-bin-14.0.2_p12.ebuild new file mode 100644 index 0000000..4ccc008 --- /dev/null +++ b/dev-java/openjdk-bin/openjdk-bin-14.0.2_p12.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit java-vm-2 toolchain-funcs + +abi_uri() { + echo "${2-$1}? ( + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${MY_PV}/OpenJDK${SLOT}U-jdk_${1}_linux_hotspot_${MY_PV//+/_}.tar.gz + )" +} + +MY_PV=${PV/_p/+} +SLOT=${MY_PV%%[.+]*} + +SRC_URI=" + $(abi_uri arm) + $(abi_uri aarch64 arm64) + $(abi_uri ppc64le ppc64) + $(abi_uri x64 amd64) +" + +DESCRIPTION="Prebuilt Java JDK binaries provided by AdoptOpenJDK" +HOMEPAGE="https://adoptopenjdk.net" +LICENSE="GPL-2-with-classpath-exception" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64" +IUSE="alsa cups doc +gentoo-vm headless-awt nsplugin selinux source webstart" + +RDEPEND=" + media-libs/fontconfig:1.0 + media-libs/freetype:2 + >=sys-apps/baselayout-java-0.1.0-r1 + >=sys-libs/glibc-2.2.5:* + sys-libs/zlib + alsa? ( media-libs/alsa-lib ) + cups? ( net-print/cups ) + doc? ( dev-java/java-sdk-docs:${SLOT} ) + selinux? ( sec-policy/selinux-java ) + !headless-awt? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrender + x11-libs/libXtst + )" + +PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 ) + nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )" + +RESTRICT="preserve-libs splitdebug" +QA_PREBUILT="*" + +S="${WORKDIR}/jdk-${MY_PV}" + +pkg_pretend() { + if [[ "$(tc-is-softfloat)" != "no" ]]; then + die "These binaries require a hardfloat system." + fi +} + +src_install() { + local dest="/opt/${P}" + local ddest="${ED%/}/${dest#/}" + + # Not sure why they bundle this as it's commonly available and they + # only do so on x86_64. It's needed by libfontmanager.so. IcedTea + # also has an explicit dependency while Oracle seemingly dlopens it. + rm -vf lib/libfreetype.so || die + + # Oracle and IcedTea have libjsoundalsa.so depending on + # libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird. + if ! use alsa ; then + rm -v lib/libjsound.* || die + fi + + if use headless-awt ; then + rm -v lib/lib*{[jx]awt,splashscreen}* || die + fi + + if ! use source ; then + rm -v lib/src.zip || die + fi + + rm -v lib/security/cacerts || die + dosym ../../../../etc/ssl/certs/java/cacerts \ + "${dest}"/lib/security/cacerts + + dodir "${dest}" + cp -pPR * "${ddest}" || die + + # provide stable symlink + dosym "${P}" "/opt/${PN}-${SLOT}" + + 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 +} + +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 11. This JDK must therefore be invoked using its" + ewarn "absolute location under ${EPREFIX}/opt/${P}." + fi +} diff --git a/dev-java/openjdk-jre-bin/Manifest b/dev-java/openjdk-jre-bin/Manifest new file mode 100644 index 0000000..cfee5f6 --- /dev/null +++ b/dev-java/openjdk-jre-bin/Manifest @@ -0,0 +1 @@ +DIST OpenJDK14U-jre_x64_linux_hotspot_14.0.2_12.tar.gz 56839756 BLAKE2B 1e4c9b2f9a3daed50748cf53b74373ff9ef0c70b3a7d30c65efdcbc4e5c8b1cdfe55546d316aefe3019e66ef35d771d14bde39143ebb74bd4c7db467cdf90064 SHA512 283a79257728523b6e75e7632929c350ffd6c77bc9ff5c1a13a6c5d26ea941795ffce46bf3eec6fccd7320a6c36fef13348a5373973e13b613ded6b73219ee97 diff --git a/dev-java/openjdk-jre-bin/files/openjdk-jre-bin-14.env.sh b/dev-java/openjdk-jre-bin/files/openjdk-jre-bin-14.env.sh new file mode 100644 index 0000000..ec0dca4 --- /dev/null +++ b/dev-java/openjdk-jre-bin/files/openjdk-jre-bin-14.env.sh @@ -0,0 +1,16 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +VERSION="AdoptOpenJDK JRE ${PV}" +JAVA_HOME="${EPREFIX}/opt/${P}" +JDK_HOME="${EPREFIX}/opt/${P}" +JAVAC="\${JAVA_HOME}/bin/javac" +PATH="\${JAVA_HOME}/bin" +ROOTPATH="\${JAVA_HOME}/bin" +LDPATH="\${JAVA_HOME}/lib/:\${JAVA_HOME}/lib/server/" +MANPATH="\${JAVA_HOME}/man" +PROVIDES_TYPE="JRE" +PROVIDES_VERSION="${SLOT}" +BOOTCLASSPATH="" +GENERATION="2" +ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH" diff --git a/dev-java/openjdk-jre-bin/metadata.xml b/dev-java/openjdk-jre-bin/metadata.xml new file mode 100644 index 0000000..7a807f5 --- /dev/null +++ b/dev-java/openjdk-jre-bin/metadata.xml @@ -0,0 +1,22 @@ + + + + + gyakovlev@gentoo.org + Georgy Yakovlev + + + java@gentoo.org + Java + + + Java™ is the world's leading programming language and platform. + The code for Java is open source and available at OpenJDK™. + AdoptOpenJDK provides prebuilt OpenJDK JRE binaries from a fully open source set of build scripts and infrastructure. + + + Don't install the X backend for AWT, needed by some GUIs (used to be X flag) + Allow this JDK to be recognised by Gentoo (package manager, eselect, java-config, EXPERIMENTAL!) + Provide javaws command through symlink to icedtea-web + + diff --git a/dev-java/openjdk-jre-bin/openjdk-jre-bin-14.0.2_p12.ebuild b/dev-java/openjdk-jre-bin/openjdk-jre-bin-14.0.2_p12.ebuild new file mode 100644 index 0000000..23e7a0f --- /dev/null +++ b/dev-java/openjdk-jre-bin/openjdk-jre-bin-14.0.2_p12.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit java-vm-2 + +abi_uri() { + echo "${2-$1}? ( + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${MY_PV}/OpenJDK${SLOT}U-jre_${1}_linux_hotspot_${MY_PV//+/_}.tar.gz + )" +} + +MY_PV=${PV/_p/+} +SLOT=${MY_PV%%[.+]*} + +SRC_URI=" + $(abi_uri x64 amd64) +" + +DESCRIPTION="Prebuilt Java JRE binaries provided by AdoptOpenJDK" +HOMEPAGE="https://adoptopenjdk.net" +LICENSE="GPL-2-with-classpath-exception" +KEYWORDS="~amd64" +IUSE="alsa cups +gentoo-vm headless-awt nsplugin selinux webstart" + +RDEPEND=" + media-libs/fontconfig:1.0 + media-libs/freetype:2 + >net-libs/libnet-1.1 + >=sys-apps/baselayout-java-0.1.0-r1 + >=sys-libs/glibc-2.2.5:* + sys-libs/zlib + alsa? ( media-libs/alsa-lib ) + cups? ( net-print/cups ) + selinux? ( sec-policy/selinux-java ) + !headless-awt? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrender + x11-libs/libXtst + )" + +PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 ) + nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )" + +RESTRICT="preserve-libs splitdebug" +QA_PREBUILT="*" + +S="${WORKDIR}/jdk-${MY_PV}-jre" + +src_install() { + local dest="/opt/${P}" + local ddest="${ED%/}/${dest#/}" + + # Not sure why they bundle this as it's commonly available and they + # only do so on x86_64. It's needed by libfontmanager.so. IcedTea + # also has an explicit dependency while Oracle seemingly dlopens it. + rm -vf lib/libfreetype.so || die + + # Oracle and IcedTea have libjsoundalsa.so depending on + # libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird. + if ! use alsa ; then + rm -v lib/libjsound.* || die + fi + + if use headless-awt ; then + rm -v lib/lib*{[jx]awt,splashscreen}* || die + fi + + rm -v lib/security/cacerts || die + dosym ../../../../etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts + + dodir "${dest}" + cp -pPR * "${ddest}" || die + + # provide stable symlink + dosym "${P}" "/opt/${PN}-${SLOT}" + + 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 +} + +pkg_postinst() { + java-vm-2_pkg_postinst + + if use gentoo-vm ; then + ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JRE" + 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 JRE" + 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 11. This JRE must therefore be invoked using its" + ewarn "absolute location under ${EPREFIX}/opt/${P}." + fi +} diff --git a/dev-java/openjdk/Manifest b/dev-java/openjdk/Manifest new file mode 100644 index 0000000..6e45ba1 --- /dev/null +++ b/dev-java/openjdk/Manifest @@ -0,0 +1 @@ +DIST openjdk-14.0.2_p12.tar.bz2 83827689 BLAKE2B acd8a61156800941781a2f4c2d3acc61d7124254ec573b6e4eb45e0e031b4b4403475bec617c4130715b5764982a0d2bf990c07e8593817524093ed7fc86a2c8 SHA512 fb129d2e0f3b007d249073c6a0f20fe9c2917eafbae1c4a6c51126180a70e5debb348c3770a785b54576f2a338cb10fdfbd1fca5879e49f80a4fa5c190338fa9 diff --git a/dev-java/openjdk/files/openjdk-14.env.sh b/dev-java/openjdk/files/openjdk-14.env.sh new file mode 100644 index 0000000..96c4be7 --- /dev/null +++ b/dev-java/openjdk/files/openjdk-14.env.sh @@ -0,0 +1,16 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +VERSION="OpenJDK ${PV}" +JAVA_HOME="${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}" +JDK_HOME="${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}" +JAVAC="\${JAVA_HOME}/bin/javac" +PATH="\${JAVA_HOME}/bin" +ROOTPATH="\${JAVA_HOME}/bin" +LDPATH="\${JAVA_HOME}/lib/:\${JAVA_HOME}/lib/server/" +MANPATH="" +PROVIDES_TYPE="JDK JRE" +PROVIDES_VERSION="${SLOT}" +BOOTCLASSPATH="" +GENERATION="2" +ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH" diff --git a/dev-java/openjdk/metadata.xml b/dev-java/openjdk/metadata.xml new file mode 100644 index 0000000..d77f0ff --- /dev/null +++ b/dev-java/openjdk/metadata.xml @@ -0,0 +1,16 @@ + + + + + Java™ version 14 + + + Don't install the X backend for AWT, needed by some GUIs + Allow this JDK to be recognised by Gentoo (package manager, eselect, java-config, EXPERIMENTAL!) + Import OpenJFX modules at build time, via dev-java/openjfx + Build OpenJDK twice, the second time using the result of the first + Install JVM sources + Enable SystemTAP/DTrace tracing + Provide javaws command through symlink to icedtea-web + + diff --git a/dev-java/openjdk/openjdk-14.0.2_p12.ebuild b/dev-java/openjdk/openjdk-14.0.2_p12.ebuild new file mode 100644 index 0000000..35a2c27 --- /dev/null +++ b/dev-java/openjdk/openjdk-14.0.2_p12.ebuild @@ -0,0 +1,276 @@ +# Copyright 1999-2020 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 + +# we need -ga tag to fetch tarball and unpack it, but exact number everywhere else to +# set build version properly +MY_PV="${PV%_p*}-ga" +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 -> ${P}.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 + if [[ ${MERGE_TYPE} != binary ]]; then + has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}" + fi +} + +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 + + # Work around -fno-common ( GCC10 default ), bug #713180 + append-flags -fcommon + + # 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="${PVR}" + --with-version-pre="" + --with-version-string="${PV%_p*}" + --with-version-build="${PV#*_p}" + --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 JAVA_TOOL_OPTIONS 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 ../../../../../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 + docinto html + dodoc -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 +} -- cgit v1.2.3-54-g00ecf