aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Greener <me@r0bert.dev>2024-04-01 20:54:33 +0100
committerRobert Greener <me@r0bert.dev>2024-04-01 20:59:01 +0100
commit5ac7751de305032b987e0162f2171642c195ebf3 (patch)
tree181779f45d9edaa5ecfd2c2c5c6a94e415d36449 /dev-java
parentdev-python/injector: add 0.21.0-r1, drop 0.21.0 (diff)
downloadguru-5ac7751de305032b987e0162f2171642c195ebf3.tar.gz
guru-5ac7751de305032b987e0162f2171642c195ebf3.tar.bz2
guru-5ac7751de305032b987e0162f2171642c195ebf3.zip
dev-java/microsoft-openjdk-bin: new package, version 11.0.22
Signed-off-by: Robert Greener <me@r0bert.dev>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/microsoft-openjdk-bin/Manifest2
-rw-r--r--dev-java/microsoft-openjdk-bin/files/microsoft-openjdk-bin.env.sh13
-rw-r--r--dev-java/microsoft-openjdk-bin/metadata.xml11
-rw-r--r--dev-java/microsoft-openjdk-bin/microsoft-openjdk-bin-11.0.22.ebuild97
4 files changed, 123 insertions, 0 deletions
diff --git a/dev-java/microsoft-openjdk-bin/Manifest b/dev-java/microsoft-openjdk-bin/Manifest
new file mode 100644
index 000000000..9259ee7c9
--- /dev/null
+++ b/dev-java/microsoft-openjdk-bin/Manifest
@@ -0,0 +1,2 @@
+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
diff --git a/dev-java/microsoft-openjdk-bin/files/microsoft-openjdk-bin.env.sh b/dev-java/microsoft-openjdk-bin/files/microsoft-openjdk-bin.env.sh
new file mode 100644
index 000000000..0f41a2216
--- /dev/null
+++ b/dev-java/microsoft-openjdk-bin/files/microsoft-openjdk-bin.env.sh
@@ -0,0 +1,13 @@
+VERSION="Microsoft OpenJDK ${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/microsoft-openjdk-bin/metadata.xml b/dev-java/microsoft-openjdk-bin/metadata.xml
new file mode 100644
index 000000000..b56f4a748
--- /dev/null
+++ b/dev-java/microsoft-openjdk-bin/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>me@r0bert.dev</email>
+ <name>Robert Greener</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">microsoft/openjdk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-java/microsoft-openjdk-bin/microsoft-openjdk-bin-11.0.22.ebuild b/dev-java/microsoft-openjdk-bin/microsoft-openjdk-bin-11.0.22.ebuild
new file mode 100644
index 000000000..cf80650e3
--- /dev/null
+++ b/dev-java/microsoft-openjdk-bin/microsoft-openjdk-bin-11.0.22.ebuild
@@ -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
+} \ No newline at end of file