diff options
author | James Le Cuirot <chewi@gentoo.org> | 2018-10-18 12:01:41 +0100 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2018-10-19 12:05:06 +0100 |
commit | bd13a0e4ed616466f678ad8470d9e3733319c130 (patch) | |
tree | 5dd89c49f0292d117cdc3e428a39878ff209b76a /dev-java/openjdk-bin | |
parent | virtual/jre: introduce masked Java 11 support (diff) | |
download | gentoo-bd13a0e4ed616466f678ad8470d9e3733319c130.tar.gz gentoo-bd13a0e4ed616466f678ad8470d9e3733319c130.tar.bz2 gentoo-bd13a0e4ed616466f678ad8470d9e3733319c130.zip |
dev-java/openjdk-bin: New package to provide Java 11
The binaries are provided by AdoptOpenJDK.
Closes: https://bugs.gentoo.org/660704
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'dev-java/openjdk-bin')
-rw-r--r-- | dev-java/openjdk-bin/Manifest | 3 | ||||
-rw-r--r-- | dev-java/openjdk-bin/files/openjdk-bin-11.env.sh | 16 | ||||
-rw-r--r-- | dev-java/openjdk-bin/metadata.xml | 15 | ||||
-rw-r--r-- | dev-java/openjdk-bin/openjdk-bin-11.28.ebuild | 102 |
4 files changed, 136 insertions, 0 deletions
diff --git a/dev-java/openjdk-bin/Manifest b/dev-java/openjdk-bin/Manifest new file mode 100644 index 000000000000..56f6f6be6619 --- /dev/null +++ b/dev-java/openjdk-bin/Manifest @@ -0,0 +1,3 @@ +DIST OpenJDK11-jdk_aarch64_linux_hotspot_11_28.tar.gz 193328951 BLAKE2B f7586ed6b5e5562f6b1b4ed155abadbe31cb85459c982b0011e75d85046261c0a78dcaab343fb5c5c7a382c3fd1ac52caefc8194262e35c3601b9aae5a9b94e3 SHA512 b2e5bd25fd62425e25a9a60cd2ca4b080748a352c04c29f206ab121245226c61fa5a8573d342d8bf88efd83a9a7890fd85cf90d700dae28f632878a60d79ea75 +DIST OpenJDK11-jdk_ppc64le_linux_hotspot_11_28.tar.gz 176285783 BLAKE2B a64f86a4f69302efe0eb2645d39c44ce89bcf58c765c12c109735fb2ede5959b0659d4b9f85cf8e79102fc6f00443b99a78fc5745086b1b5e16bd41958db1ed7 SHA512 84eb35634a985647d4fc90c6c4a1855c1c059e5fde8cf3ef7665fa754a7549cb3905a1c35710c6c936426efd6e0bc1ac773fbef11550dbadbff622fd2c201d74 +DIST OpenJDK11-jdk_x64_linux_hotspot_11_28.tar.gz 195689094 BLAKE2B 4d65b7993fddd113964103a1066faa6e7e83ab7807f6403c1f5bc5a72ca82dc51287d4911e264ba5754b7c1184aa1f1d1c94d19ae242ab02bf238f6c359c0de3 SHA512 f7a427bc33b2e8a2f68c7955b23d14f2eacf7b526f2990b29e55bdb1ae96d3e14f3d7c169c76ba4b18fd8195cef81d7199a37a81ce73d6b21a72f07388e70793 diff --git a/dev-java/openjdk-bin/files/openjdk-bin-11.env.sh b/dev-java/openjdk-bin/files/openjdk-bin-11.env.sh new file mode 100644 index 000000000000..9e9c5ec54870 --- /dev/null +++ b/dev-java/openjdk-bin/files/openjdk-bin-11.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 000000000000..7b83622b0d7c --- /dev/null +++ b/dev-java/openjdk-bin/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>java@gentoo.org</email> + <name>Java</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> + <flag name="webstart">Provide javaws command through symlink to icedtea-web</flag> + </use> +</pkgmetadata> diff --git a/dev-java/openjdk-bin/openjdk-bin-11.28.ebuild b/dev-java/openjdk-bin/openjdk-bin-11.28.ebuild new file mode 100644 index 000000000000..8e5764d5a316 --- /dev/null +++ b/dev-java/openjdk-bin/openjdk-bin-11.28.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2018 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}-jdk_${1}_linux_hotspot_${PV//./_}.tar.gz + )" +} + +SLOT=${PV%%.*} +MY_PV=${PV/./+} + +SRC_URI=" + $(abi_uri x64 amd64) + $(abi_uri aarch64 arm64) + $(abi_uri ppc64le ppc64) +" + +DESCRIPTION="Prebuilt Java JDK binaries provided by AdoptOpenJDK" +HOMEPAGE="https://adoptopenjdk.net" +LICENSE="GPL-2-with-classpath-exception" +KEYWORDS="~amd64 ~arm64 ~ppc64" +IUSE="alsa cups doc examples +gentoo-vm headless-awt nsplugin selinux source +webstart" +RESTRICT="preserve-libs" +QA_PREBUILT="*" + +RDEPEND=" + media-libs/fontconfig:1.0 + media-libs/freetype:2 + >=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] )" + +S="${WORKDIR}/jdk-${MY_PV}" + +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 + + 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. This will almost certainly break things." + else + ewarn "The experimental gentoo-vm USE flag has not been enabled so this JDK" + ewarn "will not be recognised by the system. For example, simply calling" + ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo" + ewarn "fully supports Java 11. This JDK must therefore be invoked using its" + ewarn "absolute location under ${EPREFIX}/opt/${P}." + fi +} |