aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Greener <me@r0bert.dev>2024-04-01 21:22:15 +0100
committerRobert Greener <me@r0bert.dev>2024-04-01 21:34:20 +0100
commitd9de947673954f28916bd9149004487feff2eb79 (patch)
tree8bca83320a60fd413a028e4848e9d3c6ba81de3e /dev-java
parentnet-voip/re: Added static-libs use flag (diff)
downloadguru-d9de947673954f28916bd9149004487feff2eb79.tar.gz
guru-d9de947673954f28916bd9149004487feff2eb79.tar.bz2
guru-d9de947673954f28916bd9149004487feff2eb79.zip
dev-java/corretto-bin: new package, version 21.0.2.14.1
Signed-off-by: Robert Greener <me@r0bert.dev>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/corretto-bin/Manifest1
-rw-r--r--dev-java/corretto-bin/corretto-bin-21.0.2.14.1.ebuild91
-rw-r--r--dev-java/corretto-bin/files/corretto-bin.env.sh13
-rw-r--r--dev-java/corretto-bin/metadata.xml11
4 files changed, 116 insertions, 0 deletions
diff --git a/dev-java/corretto-bin/Manifest b/dev-java/corretto-bin/Manifest
new file mode 100644
index 000000000..7ac2f1d1d
--- /dev/null
+++ b/dev-java/corretto-bin/Manifest
@@ -0,0 +1 @@
+DIST amazon-corretto-21.0.2.14.1-linux-x64.tar.gz 209399162 BLAKE2B 8778c7ae7a8588b3a4dd58d5e3c18ca8931b5d4e32c4f308c0f765df7140232d7c800708859d86a66a58275a517edd461c16457159de5ca362d51728559bcd46 SHA512 14264809f297d42163c2c55c827b16eba058c39a36d5e92589419cccf66187b59225b08a8623f556d1febdeedbb2a47975b655b8bd816483d2862c7c44ef0470
diff --git a/dev-java/corretto-bin/corretto-bin-21.0.2.14.1.ebuild b/dev-java/corretto-bin/corretto-bin-21.0.2.14.1.ebuild
new file mode 100644
index 000000000..8305000c2
--- /dev/null
+++ b/dev-java/corretto-bin/corretto-bin-21.0.2.14.1.ebuild
@@ -0,0 +1,91 @@
+# 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="
+ https://corretto.aws/downloads/resources/${PV}/amazon-corretto-${PV}-linux-x64.tar.gz
+"
+
+DESCRIPTION="Prebuilt Java JDK binaries provided by Amazon Web Services"
+HOMEPAGE="https://aws.amazon.com/corretto"
+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}/amazon-corretto-${MY_PV}-linux-x64"
+
+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#/}"
+
+ # 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
diff --git a/dev-java/corretto-bin/files/corretto-bin.env.sh b/dev-java/corretto-bin/files/corretto-bin.env.sh
new file mode 100644
index 000000000..0ec3b0f60
--- /dev/null
+++ b/dev-java/corretto-bin/files/corretto-bin.env.sh
@@ -0,0 +1,13 @@
+VERSION="AWS Corretto JDK ${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/corretto-bin/metadata.xml b/dev-java/corretto-bin/metadata.xml
new file mode 100644
index 000000000..b56f4a748
--- /dev/null
+++ b/dev-java/corretto-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>