commit: 2d5b2ea6a48ed2ccce3b8002053ebe2e8b88265f Author: Denis Reva <denis7774 <AT> gmail <DOT> com> AuthorDate: Mon Apr 13 15:51:33 2020 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> CommitDate: Mon Apr 13 15:51:33 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2d5b2ea6
dev-java/openjdk-bin: Added experimental Non-LTS openjdk-bin packages for running modern java applications. Should I do dev-java/openjdk-jre-bin? Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Denis Reva <denis7774 <AT> gmail.com> dev-java/openjdk-bin/Manifest | 8 ++ dev-java/openjdk-bin/files/openjdk-bin-13.env.sh | 16 +++ dev-java/openjdk-bin/files/openjdk-bin-14.env.sh | 16 +++ dev-java/openjdk-bin/metadata.xml | 18 ++++ dev-java/openjdk-bin/openjdk-bin-13.0.2_p8.ebuild | 114 ++++++++++++++++++++++ dev-java/openjdk-bin/openjdk-bin-14_p36.ebuild | 114 ++++++++++++++++++++++ 6 files changed, 286 insertions(+) diff --git a/dev-java/openjdk-bin/Manifest b/dev-java/openjdk-bin/Manifest new file mode 100644 index 0000000..014fd31 --- /dev/null +++ b/dev-java/openjdk-bin/Manifest @@ -0,0 +1,8 @@ +DIST OpenJDK13U-jdk_aarch64_linux_hotspot_13.0.2_8.tar.gz 206018212 BLAKE2B 90d550d74e53362cbae4a623250d22bff65dcf74898c3a6076d4fbe77cc98ffe35bc4ecd5f44fc785e4247e5989236bb54444c5269cdcc4fa16f09fab6de3adb SHA512 ca4386dd7366617e15b501841fbf03d06e891a9cfa75e63347108c9eac1010cb2d9479aafb86f796b7bdd0ab9806f1c2d77d73105b5b49434d99ee4777f9daca +DIST OpenJDK13U-jdk_arm_linux_hotspot_13.0.2_8.tar.gz 191743541 BLAKE2B 5ffd9fd462addc0766e88ded1b3c4b7d982ae3bf4946576c9a2d36a5297c4488dfa4f1c7e771bdaa190ad847db1aafc37582b0729a70df9d1fbfa31d8ed6dc64 SHA512 943860efdd55c486422c78d159dabb50b41d3a4fb7e1056286263677debef1e620947743e549f3f9587ef4e928bf050ce2f0bf77c2cf7bdbff1e93bb49cdbc87 +DIST OpenJDK13U-jdk_ppc64le_linux_hotspot_13.0.2_8.tar.gz 190310065 BLAKE2B 0cb13abcdb530a43037e3c5a36bc28cbf47c6d7eb33689adb4a0aab587d623c033a026f404d7ccc3cac3c6252b64c60e7d6ef1aaa26a266daf1cc82461b7d008 SHA512 bec72df21cfd33b8ee87b95676946e45017bb97fcb7f5a0080487cd21c0182da586d1ee0114cdf79d8fd2b803a5f47ff56d21d1604ecf81b838ec06c1a3d744a +DIST OpenJDK13U-jdk_x64_linux_hotspot_13.0.2_8.tar.gz 207518686 BLAKE2B 7c632b0ef75fef9490e789e2d89874c19db050c8e0f763f35f5d29164263c25be79b09cb5be141301af3de7529b7f28c9dc7c63a909e502fd00a7b96d12093ea SHA512 9e2698fab54e5cd2d56c6456102760321d01ac15bf8bd97ae96069676a22284bf4d08daa1a41f2c33d761dd067bb8ec176eb37848dae3290df374d06631d5d1c +DIST OpenJDK14U-jdk_aarch64_linux_hotspot_14_36.tar.gz 213697531 BLAKE2B af9de64240e925324c1107402a4e08712cb8774c840b67d988f8e723e37f33a619d6610afe9b0a68f4f6367ab6e1a2514d9fd396ce5396fc538949bac0946149 SHA512 4d1292abe81e37a7150cde8dbb0695a6a9772fec6d05dffa41010d90cb3d31e8a67d9de997428e6aa961caca926d554e184aafd8012581f05e4300821c831642 +DIST OpenJDK14U-jdk_arm_linux_hotspot_14_36.tar.gz 189027827 BLAKE2B 6e2901415485e0465fbaeea627b7610f21aae9775ede3299f5b62977a2bdd0a3661677bbca156a6d2f1504c7330c9565a24f7d220b09a1b3dfd01cf78866edde SHA512 a84561092c19ca2d38b3951511040ebaea52ca9410f13faca40d534a9bef6c6589329a74f92df4c87e99f70ff12a14ba811ce1337c179d0d1dcca03bd1fa1c44 +DIST OpenJDK14U-jdk_ppc64le_linux_hotspot_14_36.tar.gz 197951326 BLAKE2B 8c91ea619736cff9608340ad2bfa8c07f411661809391de794fa269d2eaca543f2ca7c0944744ae2e775a9be6f98be46c69aa4bd295fe8cf619691453af7abd0 SHA512 d6d56ec71451f8cca69100090d67ad9a83242e8a3622e66adf2ddc1f1a5b3f097cd61725241daaf5bc85229b244b94527c64fcb6fa2ca420170544cf76265a38 +DIST OpenJDK14U-jdk_x64_linux_hotspot_14_36.tar.gz 216382990 BLAKE2B 82a783df5e88304c3b5c1141bf56ce8a1931df500702c62fa49300973a6e770ba7cf61a602bc2d41bd375b7b0b7f91a8af7b00ee1029e8c3408a08887ba629e9 SHA512 1851cf24db0b48007a2373d8596cf4b8d832d10a2f41316799c4af2bd37cbab4b211e7913d431b59f6bc212957cdbae401c6bcd389635c248c939433cef63516 diff --git a/dev-java/openjdk-bin/files/openjdk-bin-13.env.sh b/dev-java/openjdk-bin/files/openjdk-bin-13.env.sh new file mode 100644 index 0000000..1def83a --- /dev/null +++ b/dev-java/openjdk-bin/files/openjdk-bin-13.env.sh @@ -0,0 +1,16 @@ +# Copyright 1999-2020 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/files/openjdk-bin-14.env.sh b/dev-java/openjdk-bin/files/openjdk-bin-14.env.sh new file mode 100644 index 0000000..1def83a --- /dev/null +++ b/dev-java/openjdk-bin/files/openjdk-bin-14.env.sh @@ -0,0 +1,16 @@ +# Copyright 1999-2020 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..d5bd272 --- /dev/null +++ b/dev-java/openjdk-bin/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>denis7...@gmail.com</email> + <name>Reva Denis aka RarogCmex</name> + </maintainer> + <longdescription> + 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. + </longdescription> + <use> + <flag name="headless-awt">Don't install the X backend for AWT, needed by some GUIs (used to be X flag)</flag> + <flag name="gentoo-vm">Allow this JDK to be recognised by Gentoo (package manager, eselect, java-config, EXPERIMENTAL!)</flag> + <flag name="source">Install JVM sources</flag> + </use> +</pkgmetadata> diff --git a/dev-java/openjdk-bin/openjdk-bin-13.0.2_p8.ebuild b/dev-java/openjdk-bin/openjdk-bin-13.0.2_p8.ebuild new file mode 100644 index 0000000..70a9904 --- /dev/null +++ b/dev-java/openjdk-bin/openjdk-bin-13.0.2_p8.ebuild @@ -0,0 +1,114 @@ +# 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 examples +gentoo-vm headless-awt source" + +RDEPEND=" + media-libs/fontconfig:1.0 + media-libs/freetype:2 + >=sys-apps/baselayout-java-0.1.0-r1 + >=sys-libs/glibc-2.29-r7:* + sys-libs/zlib + alsa? ( media-libs/alsa-lib ) + cups? ( net-print/cups ) + !headless-awt? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrender + x11-libs/libXtst + )" + +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 examples ; then + rm -vr demo/ || 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 + + 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. If ${P} is set for system scope" + ewarn "this will almost certainly break" + ewarn "many java ebuilds as they are not ready for ${P}" + ewarn "You may enable it only for desired users via eselect java-vm" + ewarn "Example| larry# eselect java-vm set openjdk-bin-${SLOT}" + 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-bin/openjdk-bin-14_p36.ebuild b/dev-java/openjdk-bin/openjdk-bin-14_p36.ebuild new file mode 100644 index 0000000..70a9904 --- /dev/null +++ b/dev-java/openjdk-bin/openjdk-bin-14_p36.ebuild @@ -0,0 +1,114 @@ +# 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 examples +gentoo-vm headless-awt source" + +RDEPEND=" + media-libs/fontconfig:1.0 + media-libs/freetype:2 + >=sys-apps/baselayout-java-0.1.0-r1 + >=sys-libs/glibc-2.29-r7:* + sys-libs/zlib + alsa? ( media-libs/alsa-lib ) + cups? ( net-print/cups ) + !headless-awt? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrender + x11-libs/libXtst + )" + +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 examples ; then + rm -vr demo/ || 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 + + 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. If ${P} is set for system scope" + ewarn "this will almost certainly break" + ewarn "many java ebuilds as they are not ready for ${P}" + ewarn "You may enable it only for desired users via eselect java-vm" + ewarn "Example| larry# eselect java-vm set openjdk-bin-${SLOT}" + 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 +}