dev-java/openjdk-bin: New package (needed by minecraft-server-1.17.0)
Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
This commit is contained in:
parent
b21a56e9fc
commit
faa2460518
4
dev-java/openjdk-bin/Manifest
Normal file
4
dev-java/openjdk-bin/Manifest
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
DIST OpenJDK16U-jdk_aarch64_linux_hotspot_16.0.1_9.tar.gz 203066417 BLAKE2B 9c051bfb6cc3c1367125ead207629d1f35132b17229947fb3e555cf31a6f0b4832a23ded1437918c7f6751ce35e1bae232d22a9453b90fae6e6d3a0a752e4b47 SHA512 36a9849f1d44b80102d2e360b360f9aaaa84c196069edac7984081111b887475bdf4602ce0984a28680d5f2a20ab946074316eca56520dc2eeabb365a081bb59
|
||||||
|
DIST OpenJDK16U-jdk_arm_linux_hotspot_16.0.1_9.tar.gz 187587741 BLAKE2B ad42e74357759a66dc087ac9fa7c1e7e2d70a236d12f214c255376a3e30474a8ea59f424aae0016525d40f7bdbaf698f7a8ccf0cf78176c3df6d42af25fd4b67 SHA512 31161281dbad9a4b32e787599d61409d51f94c3f12afcdd6232f806b3c4b60b1138e31dd05ac6f17cc254fa056ca8b91354330ce6cbc0b0680564d4a9515cae6
|
||||||
|
DIST OpenJDK16U-jdk_ppc64le_linux_hotspot_16.0.1_9.tar.gz 186081896 BLAKE2B a7201ea28e8bc35b464309eccd5c0b979c5a0946755e542b3eecc174a8b66ca6d72f056c9c0753b63a19db154f7b0079f3e5bc9ec5538c8ae3893c50aeabdb08 SHA512 5cdc074d1503f3eae49fbd036d214807d2764b8aec72b019ae1a34d36b9e4378c0f27a73111dcb3ecc71a1fd82eaa737f1afd091b3523109eff539fde5e64846
|
||||||
|
DIST OpenJDK16U-jdk_x64_linux_hotspot_16.0.1_9.tar.gz 205449187 BLAKE2B 2c264d2e183b3be585a23f62688652a65b7082cbfdf2e99039c966d64f7df15a0c8a95c5aff0e4da3b44921d662a3e56d6e3b02516322173ec586ad6ef6f1d84 SHA512 2022ecdad9fdaa37a20823e33bf1da665ec954afbf2491521434432e98d01f7ccf1fcfdad5176416b87831edfdde62136c7a27719effcb2cc60cace9986e3a4a
|
16
dev-java/openjdk-bin/files/openjdk-bin-16.env.sh
Normal file
16
dev-java/openjdk-bin/files/openjdk-bin-16.env.sh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Copyright 1999-2021 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=""
|
||||||
|
PROVIDES_TYPE="JDK JRE"
|
||||||
|
PROVIDES_VERSION="${SLOT}"
|
||||||
|
BOOTCLASSPATH=""
|
||||||
|
GENERATION="2"
|
||||||
|
ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"
|
22
dev-java/openjdk-bin/metadata.xml
Normal file
22
dev-java/openjdk-bin/metadata.xml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>gyakovlev@gentoo.org</email>
|
||||||
|
<name>Georgy Yakovlev</name>
|
||||||
|
</maintainer>
|
||||||
|
<maintainer type="project">
|
||||||
|
<email>java@gentoo.org</email>
|
||||||
|
<name>Java</name>
|
||||||
|
</maintainer>
|
||||||
|
<longdescription>
|
||||||
|
Java™ is the world's leading programming language and platform.
|
||||||
|
The code for Java is open source and available at OpenJDK™.
|
||||||
|
AdoptOpenJDK provides prebuilt OpenJDK binaries from a fully open source set of build scripts and infrastructure.
|
||||||
|
</longdescription>
|
||||||
|
<use>
|
||||||
|
<flag name="headless-awt">Don't install the X backend for AWT, needed by some GUIs (used to be X flag)</flag>
|
||||||
|
<flag name="gentoo-vm">Allow this JDK to be recognised by Gentoo (package manager, eselect, java-config, EXPERIMENTAL!)</flag>
|
||||||
|
<flag name="source">Install JVM sources</flag>
|
||||||
|
</use>
|
||||||
|
</pkgmetadata>
|
111
dev-java/openjdk-bin/openjdk-bin-16.0.1_p9.ebuild
Normal file
111
dev-java/openjdk-bin/openjdk-bin-16.0.1_p9.ebuild
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
# 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() {
|
||||||
|
echo "${2-$1}? (
|
||||||
|
https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${MY_PV}/OpenJDK${SLOT}U-jdk_${1}_linux_hotspot_${MY_PV//+/_}.tar.gz
|
||||||
|
)"
|
||||||
|
}
|
||||||
|
|
||||||
|
MY_PV=${PV/_p/+}
|
||||||
|
SLOT=${MY_PV%%[.+]*}
|
||||||
|
|
||||||
|
SRC_URI="
|
||||||
|
$(abi_uri arm)
|
||||||
|
$(abi_uri aarch64 arm64)
|
||||||
|
$(abi_uri ppc64le ppc64)
|
||||||
|
$(abi_uri x64 amd64)
|
||||||
|
"
|
||||||
|
|
||||||
|
DESCRIPTION="Prebuilt Java JDK binaries provided by AdoptOpenJDK"
|
||||||
|
HOMEPAGE="https://adoptopenjdk.net"
|
||||||
|
LICENSE="GPL-2-with-classpath-exception"
|
||||||
|
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64"
|
||||||
|
IUSE="alsa cups +gentoo-vm headless-awt selinux source"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
media-libs/fontconfig:1.0
|
||||||
|
media-libs/freetype:2
|
||||||
|
>=sys-apps/baselayout-java-0.1.0-r1
|
||||||
|
>=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_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
|
||||||
|
|
||||||
|
# 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 ../../../../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-11"
|
||||||
|
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 11. This JDK must therefore be invoked using its"
|
||||||
|
ewarn "absolute location under ${EPREFIX}/opt/${P}."
|
||||||
|
fi
|
||||||
|
}
|
Loading…
Reference in a new issue