dev-java/microsoft-openjdk-bin: New version 17.0.10

Signed-off-by: Robert Greener <me@r0bert.dev>
This commit is contained in:
Robert Greener
2024-04-01 20:55:10 +01:00
parent 5ac7751de3
commit 2a1576d0f9
2 changed files with 99 additions and 0 deletions

View File

@@ -1,2 +1,4 @@
DIST microsoft-jdk-11.0.22-linux-aarch64.tar.gz 195581683 BLAKE2B e27735a58eaa600652c0c1400968de7d7a24fce15da4d41ca1998c84a79462de548852b39945d6b4cb0aa0f04577b9c4bf36219bd0bb5b5438d9f93860f304c2 SHA512 d63048448d99199f6be6fe4f340abc77e40f547021eaf3908c64930b6a86e5113b08ab67a1ab00e5a9fa620fb8087fd0c9c1b2cfce83ab0a4897b0b764a3ca00
DIST microsoft-jdk-11.0.22-linux-x64.tar.gz 197022932 BLAKE2B 8ac69530bd7ccc832d8466f8ad94ddb6159b6bd70fbe4d3d84f72bde78d418d578a4143407331a61e5e8cbd8c1979b1eab8a3b9a79888a760eed0f442625cfcc SHA512 04aceb51c148f97f6f88242bf473ad0259b64776858e9cc89048beff4dfac0149d10e608ee51cce5466ed3f51034d69252e6eccf1b5c890d55ad3f1e88ec563b
DIST microsoft-jdk-17.0.10-linux-aarch64.tar.gz 190078768 BLAKE2B 03cea395bd0336dbc75ad14aa6add1c98851022abf03644c4c0d8a054d70527b104db46103442c0bc5d2592d28c7dbafc51e6e8573150f730a645d12cc3edc32 SHA512 4878e00b6d3acc5b7c9af938e64270c69a35a757452955bcf9fef2c62e3072461e28e5974f5aba82dcec8fc1eafa7ea02fae2347ff564dedd80ab2a28d265c0d
DIST microsoft-jdk-17.0.10-linux-x64.tar.gz 191482548 BLAKE2B befaa3495a80b52b2320c0d6955635df5c5252a33955569d0204273d9bd152a9506723abed85685876349ef2f80771528165d13c177a16cd93b8431801acd1c2 SHA512 c3a0302cdc9c9ef4674c191eb149a85a4f9f771a6237baa00b6346d3f83d935f47d87e08c3fc37eead872b3e36c5904a15c4554289220df1feadd23baddb902e

View File

@@ -0,0 +1,97 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit java-vm-2 toolchain-funcs
MY_PV=${PV/_p/+}
SLOT=$(ver_cut 1)
SRC_URI="
amd64? ( https://aka.ms/download-jdk/microsoft-jdk-${PV}-linux-x64.tar.gz )
arm64? ( https://aka.ms/download-jdk/microsoft-jdk-${PV}-linux-aarch64.tar.gz )
"
DESCRIPTION="Prebuilt Java JDK binaries provided by Microsoft"
HOMEPAGE="https://www.microsoft.com/openjdk"
LICENSE="GPL-2-with-classpath-exception"
KEYWORDS="~amd64"
IUSE="alsa cups 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:* )
elibc_musl? ( sys-libs/musl )
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}+7"
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
# 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
if ! use source ; then
rm -v lib/src.zip || die
fi
rm -v lib/security/cacerts || die
dosym -r /etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts
dodir "${dest}"
cp -pPR * "${ddest}" || die
# provide stable symlink
dosym "${P}" "/opt/${PN}-${SLOT}"
java-vm_install-env "${FILESDIR}"/${PN}.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
}