commit:     e52efd6be230adda909f76e6cb6166bc53d38c10
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  1 08:19:22 2019 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Feb  1 09:02:49 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e52efd6b

dev-java/openjdk-bin: add ~arm64 only openjdk-bin:8

Bug: https://bugs.gentoo.org/672058
Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 dev-java/openjdk-bin/Manifest                     |   1 +
 dev-java/openjdk-bin/files/openjdk-bin-8.env.sh   |  16 ++++
 dev-java/openjdk-bin/openjdk-bin-8.191_p12.ebuild | 101 ++++++++++++++++++++++
 3 files changed, 118 insertions(+)

diff --git a/dev-java/openjdk-bin/Manifest b/dev-java/openjdk-bin/Manifest
index b22583da608..8214785139f 100644
--- a/dev-java/openjdk-bin/Manifest
+++ b/dev-java/openjdk-bin/Manifest
@@ -4,3 +4,4 @@ DIST OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.1_13.tar.gz 
179520284 BLAKE2B 32a
 DIST OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.2_7.tar.gz 180394013 BLAKE2B 
b5b82b6cd4121e2fbf66c948435bc84d549a11a793310bf0624898562005d5fc01a2f2de84a18517a75ccb2ed7d9f5173dc0a087500eb897e8d7461838991af1
 SHA512 
5f1a54e7d2456b42e23488b3699b09d82c57f3cb7056684a15f5aa19b992f4b1638acac716d6ed15c0a409ff1953022892ea55f7ed0542d210f5fd43f33fd8e0
 DIST OpenJDK11U-jdk_x64_linux_hotspot_11.0.1_13.tar.gz 195710782 BLAKE2B 
a374afea8de4333488294dcb200e235f7cc42309a56e693a9b5434dc74d0189b57c26adc93ef22454a4ed05f44b90afa8fdfc016feb022c1eaeb706044581f24
 SHA512 
b5e55cd32daa3b30fb84b8f4fed0ef70e4f8e3e153974c0c9fa0fcdf22cade99613da93f2289798b625adde24d9a1c4c4808a139e9f2feb2543b05f273f3bdd8
 DIST OpenJDK11U-jdk_x64_linux_hotspot_11.0.2_7.tar.gz 195593592 BLAKE2B 
038c88dd4475842ffd27afc9249925baea0230cd993a963e13c2e090a0f6332fbeaebefae5b5e98026a12a7d94696633507a9d08af469b0227372088b5cd4869
 SHA512 
f9f4d168105e499b0da4923c6fe18c31ea6f6a24a48fc9d47b643460316d75de273f8f6dcbd43c9df6efcfb77127182dab8125c55f63200c5ff53cc9eb0ddcdc
+DIST OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gz 75382012 BLAKE2B 
9521bb3d0dc08d5069108bb56594d401cbadf7a290652a39c7379e6ded530044e85f1ffae1cd3eb7e881d7c283c06463e6f8b76602d03a7bf5b188b1004f5daf
 SHA512 
156f7a57f095095b72edb4bfc766d575795e496b006fb994566b0207d346e89863cf377ce97290bf1b47923c5d6aee5558eaa7a54f394f95a270b1cfec4308e2

diff --git a/dev-java/openjdk-bin/files/openjdk-bin-8.env.sh 
b/dev-java/openjdk-bin/files/openjdk-bin-8.env.sh
new file mode 100644
index 00000000000..264572a4b21
--- /dev/null
+++ b/dev-java/openjdk-bin/files/openjdk-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 ${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="JDK 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:\${JAVA_HOME}/jre/lib/jfr.jar"
+GENERATION="2"
+ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"

diff --git a/dev-java/openjdk-bin/openjdk-bin-8.191_p12.ebuild 
b/dev-java/openjdk-bin/openjdk-bin-8.191_p12.ebuild
new file mode 100644
index 00000000000..baff27abbc5
--- /dev/null
+++ b/dev-java/openjdk-bin/openjdk-bin-8.191_p12.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eapi7-ver java-vm-2
+
+abi_uri() {
+       echo "${2-$1}? (
+                       
https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk${MY_PV}/OpenJDK8U-jdk_${1}_linux_hotspot_${MY_PV/-/}.tar.gz
+               )"
+}
+
+MY_PV=$(ver_rs 1 'u' 2 '-' ${PV//p/b})
+SLOT="$(ver_cut 1)"
+
+DESCRIPTION="Prebuilt Java JDK binaries provided by AdoptOpenJDK"
+HOMEPAGE="https://adoptopenjdk.net";
+SRC_URI="
+       $(abi_uri aarch64 arm64)
+"
+
+LICENSE="GPL-2-with-classpath-exception"
+KEYWORDS="~arm64"
+
+IUSE="alsa cups doc examples +gentoo-vm headless-awt nsplugin selinux source 
+webstart"
+
+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:1.${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}"
+
+src_install() {
+       local dest="/opt/${P}"
+       local ddest="${ED}${dest#/}"
+
+       rm ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README || die
+
+       # this does not exist on arm64 hence -f
+       rm -fv jre/lib/*/libfreetype.so* || die
+
+       if ! use alsa ; then
+               rm -v jre/lib/*/libjsoundalsa.so* || die
+       fi
+
+       if ! use examples ; then
+               rm -vr sample || die
+       fi
+
+       if use headless-awt ; then
+               rm -fvr */jre/lib/*/lib*{[jx]awt,splashscreen}* \
+                       {,jre/}bin/policytool bin/appletviewer || die
+       fi
+
+       if ! use source ; then
+               rm -v 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 OpenJDK 8. This JDK must therefore be 
invoked using its"
+               ewarn "absolute location under ${EPREFIX}/opt/${P}."
+       fi
+}

Reply via email to