commit:     591bc0b178942b6939240069ff704eb9e5b4964d
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  9 02:26:21 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Nov  9 02:31:24 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=591bc0b1

dev-java/openjdk-bin: add 17.0.1_p12

Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 dev-java/openjdk-bin/Manifest                      |   6 +
 dev-java/openjdk-bin/openjdk-bin-17.0.1_p12.ebuild | 147 +++++++++++++++++++++
 2 files changed, 153 insertions(+)

diff --git a/dev-java/openjdk-bin/Manifest b/dev-java/openjdk-bin/Manifest
index ff8d3a984cd..801aef2b7e1 100644
--- a/dev-java/openjdk-bin/Manifest
+++ b/dev-java/openjdk-bin/Manifest
@@ -14,6 +14,12 @@ DIST OpenJDK17-jdk_ppc64le_linux_hotspot_17_35.tar.gz 
187664371 BLAKE2B c12df4a2
 DIST OpenJDK17-jdk_x64_alpine-linux_hotspot_17_35.tar.gz 191382466 BLAKE2B 
78b5e126b25bf6fa4471913cb209ff0f76838b44f1a2a5845cee190d2fa5b3957696f353ff8bcf7395a716b3ff22431e12be2f966457cf525fb89ff1a6f32d7c
 SHA512 
2264bebae07d060ce34ef0b743d11afb06c66fcd21d2ff338c5fb641cc55b95d70b2e1b17456cf68264442e58d0dea3988a36ee29d7c2430ee8a8f84116a5584
 DIST OpenJDK17-jdk_x64_linux_hotspot_17_35.tar.gz 192014376 BLAKE2B 
6707451ca3aaa22f232592f6497899f4751a67cfce5c539a275806b551d3494c686905dd91c03ba6de64afc65841d1e9836a1dead4ce55d99df3da4a077aecb4
 SHA512 
9af1945e46a1b444cb49ec8e58e14650098266e29973688c2a25b3707d23bf90b0a1287ad0ea5c467425f959354359fcdf1eaa8bd68e784399a6780298b22a44
 DIST OpenJDK17-jdk_x64_mac_hotspot_17_35.tar.gz 192417649 BLAKE2B 
53fdd3f71b9c3860231451eb0f59414c03a863944c9b7f2106490c1d39a8b94715d1743bab10959fe513277f5fa9a4d397c76c464680f9b1f35d879e7c82ff05
 SHA512 
ebe2f1f936c93150f2bd5e2bb9b07b572eb14abd71ad7446dd0f5c511c8b6debc882d6ec69376b55a50b964c9a2b8efb52db96de1041dd2aa857bcdb64915494
+DIST OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.1_12.tar.gz 188878354 BLAKE2B 
4e2b4272ae91f12b8a4c7a3c1cf2eab250102ff1590c84f2f3612bc206337477284d63914dddcecd8dc259da1ddd08a1fc6e3c52a37b0cbb5ed0187456c2b24e
 SHA512 
8289fb50b06f08c6288bcbab9e609a24744f123568a901b5ea4f2c1928bfdc236a9a9cfa572708c56f1f7f844b17562f9ddcb502b15df8ac8bc7d1ef758a741b
+DIST OpenJDK17U-jdk_arm_linux_hotspot_17.0.1_12.tar.gz 188832535 BLAKE2B 
4ea2e209f7bebde4cfae439773b42cb9d4143eb5b61a5e69fba181946cd3a3dc977966ed14e24ce6b23066450e64bbf204b72b04562f7af381c765bb4ea31d53
 SHA512 
615806f02c108c08be70d975f3dc402fc2e30f9a961630fe6528eedb7a5ee76ac07851ada5264fe263453eaefc40aa1ded1cefa37d3455af78b04fdf9caf9a93
+DIST OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.1_12.tar.gz 187718236 BLAKE2B 
a55eeb2651d6fbd83b579527761e246bc3babb3858b7c14823e0d512e308a65be1e35899206c1e2458db74ee2aaf4d69578b4045a13a35a0b3d6577d4821d137
 SHA512 
5179991d451f8736776de933aa44fa726217282da66236f373a0e47d815d03754f28588acf0aca55258ca1085d0e06f53627092bd0cff2c2b60eb6ff9c1df248
+DIST OpenJDK17U-jdk_x64_alpine-linux_hotspot_17.0.1_12.tar.gz 191355612 
BLAKE2B 
21c1459c58a10ed6a87a422e70fc4fa27a37a1ea4cbd121e237d82f9ec0991e7245193c5a44cd2826d502301166a48e2d3e7ac0015dcb9a1c3732f03210ff366
 SHA512 
30ce2ff05d46ea125fc17256420c8bf9dcc3afe802338cd62d0961e6588cf54663aee07c6d4d21fd0f363b58628ee34cf4f9cf622b6da970924aa94d47e6406a
+DIST OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz 191978211 BLAKE2B 
f0428e67c6f75bc204c8e7c74b25c73a270cff1889c0e3fdcc830f868bcddb58e6c9a480ba0313638a7edf56dd2e61e52b7c4f1dd9ad3643f3e70c9770141c93
 SHA512 
057fc5c4869bc9113c1a299b125c8bed47e4a841238b42fbd4b39adfd7bbbca0fa9efed7315a98303ff8f4000afd02baaa5b3169be6287d06edbfbbb44728538
+DIST OpenJDK17U-jdk_x64_mac_hotspot_17.0.1_12.tar.gz 192449459 BLAKE2B 
506d31e97c7be57a870e80e1beb0bfa72528cb0e5d006b0dc76667f6ef29624165375a91127e3cc934f3135298d748c43a5adcecb9a07c5d758998bbf6551837
 SHA512 
8d7afed31b37759ba426d412f70c36e380f0f472d850c9ba9e895e0ebd4a2cf9a7f6118526f0a30f6a1d9d880affca4e1ed9848125509ae97e32f506ad78f541
 DIST OpenJDK8U-jdk_aarch64_linux_hotspot_8u292b10.tar.gz 102423506 BLAKE2B 
dab839491d359e4366d316fd1a0eb3b7009e1739d7c6d4dc3ded47bd44fc7af36068d76183d9656d748beec0117bf95f09a78e577c3e1f685f0fb3c2e2d45e28
 SHA512 
6ca2dddd371223c0bae6caea1f4841d7d718b9ea812d914ec8fe3f03671e2176454ca094c05e55286ba0560e2897a515714bf607e868b4b0405b6bce03c5c22c
 DIST OpenJDK8U-jdk_aarch64_linux_hotspot_8u302b08.tar.gz 102111219 BLAKE2B 
0af54c05957c3f56c495cc83baf68f27fea4773ab4577b212e8abd19e7c7be123c067cb614fb42a320a865c3ab96c9e6ae663d96f79346f73282d99ea8aba5e6
 SHA512 
43e74f8029cb0d0ea48c6af4e2b8f00c4664264a51803acf0f539efb117be2dadf4c6a216ecf81c86e24152e6f87933f7a9e97bf4ba526eb01557bf561c2cc22
 DIST OpenJDK8U-jdk_arm_linux_hotspot_8u292b10.tar.gz 98376195 BLAKE2B 
55ae7181b8e4aa5d3097bee40a5acfaee48a2f208e4362e74cdec1647460770efe49b774b22188c78ca6816716ef20173471b881ce3f75b0d90e95740049f4c7
 SHA512 
d2c88712a95bcc96172b6b589493038d8e721eb7ec4ae546dd998d82a5148dd5ada6e22c92bacaec2ef88e47a75761d283d1f73983f1848a631e00c5833901ee

diff --git a/dev-java/openjdk-bin/openjdk-bin-17.0.1_p12.ebuild 
b/dev-java/openjdk-bin/openjdk-bin-17.0.1_p12.ebuild
new file mode 100644
index 00000000000..e90e1c5b5be
--- /dev/null
+++ b/dev-java/openjdk-bin/openjdk-bin-17.0.1_p12.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit java-vm-2 toolchain-funcs
+
+abi_uri() {
+       local 
baseuri="https://github.com/adoptium/temurin${SLOT}-binaries/releases/download/jdk-${MY_PV}/";
+       local musl=
+       local os=linux
+
+       case ${2} in
+               *-macos)    os=mac      ;;
+               *-solaris)  os=solaris  ;;
+       esac
+
+       if [[ ${3} == musl ]]; then
+               os=alpine-linux
+               musl=true
+       fi
+
+       echo "${2-$1}? (
+               ${musl:+ elibc_musl? ( }
+                       
${baseuri}/OpenJDK${SLOT}U-jdk_${1}_${os}_hotspot_${MY_PV//+/_}.tar.gz
+               ${musl:+ ) } )"
+}
+
+MY_PV=${PV/_p/+}
+SLOT=${MY_PV%%[.+]*}
+
+SRC_URI="
+       $(abi_uri arm)
+       $(abi_uri aarch64 arm64)
+       $(abi_uri ppc64le ppc64)
+       $(abi_uri x64 amd64)
+       $(abi_uri x64 amd64 musl)
+       $(abi_uri x64 x64-macos)
+"
+
+DESCRIPTION="Prebuilt Java JDK binaries provided by Eclipse Temurin"
+HOMEPAGE="https://adoptium.net";
+LICENSE="GPL-2-with-classpath-exception"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x64-macos"
+IUSE="alsa cups +gentoo-vm headless-awt selinux source"
+
+RDEPEND="
+       >=sys-apps/baselayout-java-0.1.0-r1
+       kernel_linux? (
+               media-libs/fontconfig:1.0
+               media-libs/freetype:2
+               media-libs/harfbuzz
+               elibc_glibc? ( >=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
+               )
+       )"
+
+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_unpack() {
+       default
+       if [[ ${A} == *_mac_* ]] ; then
+               mv -v "${S}/Contents/Home/"* "${S}" || die
+               rm -Rf "${S}/Contents"  # drop macOS executable
+       fi
+}
+
+src_install() {
+       local dest="/opt/${P}"
+       local ddest="${ED%/}/${dest#/}"
+
+       # on macOS if they would exist they would be called .dylib, but most
+       # importantly, there are no different providers, so everything
+       # that's shipped works.
+       if [[ ${A} != *_mac_* ]] ; then
+               # 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
+
+               # prefer system copy # https://bugs.gentoo.org/776676
+               rm -vf lib/libharfbuzz.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
+       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-${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 ${SLOT}. This JDK must therefore be 
invoked using its"
+               ewarn "absolute location under ${EPREFIX}/opt/${P}."
+       fi
+}

Reply via email to