openjdk-16: remove gentoo-vm flag.

This commit is contained in:
Andrius Štikonas 2024-03-02 16:02:08 +00:00
parent bfc563fa86
commit 35d16b9b73
5 changed files with 37 additions and 64 deletions

View File

@ -164,6 +164,7 @@ src_configure() {
local myconf=(
--disable-ccache
--disable-precompiled-headers
--disable-warnings-as-errors
--enable-full-docs=no
--with-boot-jdk="${JDK_HOME}"
--with-extra-cflags="${CFLAGS}"
@ -221,7 +222,6 @@ src_compile() {
local myemakeargs=(
JOBS=$(makeopts_jobs)
LOG=debug
CFLAGS_WARNINGS_ARE_ERRORS= # No -Werror
NICE= # Use PORTAGE_NICENESS, don't adjust further down
ALL_NAMED_TESTS= # Build error
$(usex doc docs '')

View File

@ -160,6 +160,7 @@ src_configure() {
local myconf=(
--disable-ccache
--disable-precompiled-headers
--disable-warnings-as-errors
--enable-full-docs=no
--with-boot-jdk="${JDK_HOME}"
--with-extra-cflags="${CFLAGS}"
@ -217,7 +218,6 @@ src_compile() {
local myemakeargs=(
JOBS=$(makeopts_jobs)
LOG=debug
CFLAGS_WARNINGS_ARE_ERRORS= # No -Werror
NICE= # Use PORTAGE_NICENESS, don't adjust further down
ALL_NAMED_TESTS= # Build error
$(usex doc docs '')

View File

@ -160,6 +160,7 @@ src_configure() {
local myconf=(
--disable-ccache
--disable-precompiled-headers
--disable-warnings-as-errors
--enable-full-docs=no
--with-boot-jdk="${JDK_HOME}"
--with-extra-cflags="${CFLAGS}"
@ -217,7 +218,6 @@ src_compile() {
local myemakeargs=(
JOBS=$(makeopts_jobs)
LOG=debug
CFLAGS_WARNINGS_ARE_ERRORS= # No -Werror
NICE= # Use PORTAGE_NICENESS, don't adjust further down
ALL_NAMED_TESTS= # Build error
$(usex doc docs '')

View File

@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
inherit check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing toolchain-funcs
@ -155,6 +155,7 @@ src_configure() {
local myconf=(
--disable-ccache
--disable-precompiled-headers
--disable-warnings-as-errors
--enable-full-docs=no
--with-boot-jdk="${JDK_HOME}"
--with-extra-cflags="${CFLAGS}"
@ -183,7 +184,12 @@ src_configure() {
use lto && myconf+=( --with-jvm-features=link-time-opt )
if use javafx; then
local zip="${EROOT%/}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip"
# this is not useful for users, just for upstream developers
# build system compares mesa version in md file
# https://bugs.gentoo.org/822612
export LEGAL_EXCLUDES=mesa3d.md
local zip="${EPREFIX%/}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip"
if [[ -r ${zip} ]]; then
myconf+=( --with-import-modules="${zip}" )
else
@ -203,7 +209,6 @@ src_compile() {
local myemakeargs=(
JOBS=$(makeopts_jobs)
LOG=debug
CFLAGS_WARNINGS_ARE_ERRORS= # No -Werror
NICE= # Use PORTAGE_NICENESS, don't adjust further down
ALL_NAMED_TESTS= # Build error
$(usex doc docs '')

View File

@ -1,9 +1,9 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
inherit autotools check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils toolchain-funcs
inherit check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing toolchain-funcs
MY_PV="${PV/_p/+}"
FULL_VERSION="${PV%_p*}"
@ -21,10 +21,10 @@ fi
DESCRIPTION="Open source implementation of the Java programming language"
HOMEPAGE="https://openjdk.java.net"
LICENSE="GPL-2"
LICENSE="GPL-2-with-classpath-exception"
KEYWORDS="amd64 ~arm arm64 ~ppc64"
IUSE="alsa cups debug doc examples gentoo-vm headless-awt javafx pch selinux source systemtap"
IUSE="alsa cups debug doc examples headless-awt javafx lto selinux source systemtap"
COMMON_DEPEND="
media-libs/freetype:2=
@ -70,9 +70,7 @@ DEPEND="
x11-libs/libXtst
javafx? ( dev-java/openjfx:${SLOT}= )
|| (
dev-java/openjdk-bin:${SLOT}
dev-java/openjdk:${SLOT}
dev-java/openjdk-bin:$((SLOT-1))
dev-java/openjdk:$((SLOT-1))
)
"
@ -102,37 +100,16 @@ pkg_setup() {
openjdk_check_requirements
java-vm-2_pkg_setup
JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT} openjdk-$((SLOT-1)) openjdk-bin-$((SLOT-1))"
JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-$((SLOT-1))"
JAVA_PKG_WANT_SOURCE="${SLOT}"
JAVA_PKG_WANT_TARGET="${SLOT}"
# The nastiness below is necessary while the gentoo-vm USE flag is
# masked. First we call java-pkg-2_pkg_setup if it looks like the
# flag was unmasked against one of the possible build VMs. If not,
# we try finding one of them in their expected locations. This would
# have been slightly less messy if openjdk-bin had been installed to
# /opt/${PN}-${SLOT} or if there was a mechanism to install a VM env
# file but disable it so that it would not normally be selectable.
local vm
for vm in ${JAVA_PKG_WANT_BUILD_VM}; do
if [[ -d ${EPREFIX}/usr/lib/jvm/${vm} ]]; then
java-pkg-2_pkg_setup
return
fi
done
if has_version --host-root dev-java/openjdk:${SLOT}; then
export JDK_HOME=${EPREFIX}/usr/$(get_libdir)/openjdk-${SLOT}
else
if [[ ${MERGE_TYPE} != "binary" ]]; then
JDK_HOME=$(best_version --host-root dev-java/openjdk-bin:${SLOT})
[[ -n ${JDK_HOME} ]] || die "Build VM not found!"
JDK_HOME=${JDK_HOME#*/}
JDK_HOME=${EPREFIX}/opt/${JDK_HOME%-r*}
export JDK_HOME
fi
fi
}
src_prepare() {
@ -162,15 +139,18 @@ src_configure() {
local myconf=(
--disable-ccache
--disable-precompiled-headers
--disable-warnings-as-errors
--enable-full-docs=no
--with-boot-jdk="${JDK_HOME}"
--with-extra-cflags="${CFLAGS}"
--with-extra-cxxflags="${CXXFLAGS}"
--with-extra-ldflags="${LDFLAGS}"
--with-giflib=system
--with-lcms=system
--with-libjpeg=system
--with-libpng=system
--with-freetype="${XPAK_BOOTSTRAP:-system}"
--with-giflib="${XPAK_BOOTSTRAP:-system}"
--with-lcms="${XPAK_BOOTSTRAP:-system}"
--with-libjpeg="${XPAK_BOOTSTRAP:-system}"
--with-libpng="${XPAK_BOOTSTRAP:-system}"
--with-native-debug-symbols=$(usex debug internal none)
--with-vendor-name="Gentoo"
--with-vendor-url="https://gentoo.org"
@ -180,15 +160,21 @@ src_configure() {
--with-version-pre=""
--with-version-string="${PV%_p*}"
--with-version-build="${PV#*_p}"
--with-zlib=system
--disable-warnings-as-errors
--with-zlib="${XPAK_BOOTSTRAP:-system}"
--enable-dtrace=$(usex systemtap yes no)
--enable-headless-only=$(usex headless-awt yes no)
$(tc-is-clang && echo "--with-toolchain-type=clang")
)
use lto && myconf+=( --with-jvm-features=link-time-opt )
if use javafx; then
local zip="${EROOT%/}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip"
# this is not useful for users, just for upstream developers
# build system compares mesa version in md file
# https://bugs.gentoo.org/822612
export LEGAL_EXCLUDES=mesa3d.md
local zip="${EPREFIX%/}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip"
if [[ -r ${zip} ]]; then
myconf+=( --with-import-modules="${zip}" )
else
@ -196,13 +182,6 @@ src_configure() {
fi
fi
# PaX breaks pch, bug #601016
if use pch && ! host-is-pax; then
myconf+=( --enable-precompiled-headers )
else
myconf+=( --disable-precompiled-headers )
fi
(
unset _JAVA_OPTIONS JAVA JAVA_TOOL_OPTIONS JAVAC XARGS
CFLAGS= CXXFLAGS= LDFLAGS= \
@ -215,6 +194,7 @@ src_compile() {
local myemakeargs=(
JOBS=$(makeopts_jobs)
LOG=debug
NICE= # Use PORTAGE_NICENESS, don't adjust further down
ALL_NAMED_TESTS= # Build error
$(usex doc docs '')
product-images
@ -224,7 +204,7 @@ src_compile() {
src_install() {
local dest="/usr/$(get_libdir)/${PN}-${SLOT}"
local ddest="${ED}${dest#/}"
local ddest="${ED}/${dest#/}"
cd "${S}"/build/*-release/images/jdk || die
@ -252,7 +232,7 @@ src_install() {
dodir "${dest}"
cp -pPR * "${ddest}" || die
dosym ../../../../../etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts
dosym8 ../../../../../etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts
# must be done before running itself
java-vm_set-pax-markings "${ddest}"
@ -260,29 +240,17 @@ src_install() {
einfo "Creating the Class Data Sharing archives and disabling usage tracking"
"${ddest}/bin/java" -server -Xshare:dump -Djdk.disableLastUsageTracking || die
use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
java-vm_revdep-mask
java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
if use doc ; then
docinto html
dodoc -r "${S}"/build/*-release/images/docs/*
dosym ../../../usr/share/doc/"${PF}" /usr/share/doc/"${PN}-${SLOT}"
dosym8 ../../../usr/share/doc/"${PF}" /usr/share/doc/"${PN}-${SLOT}"
fi
}
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 ${SLOT}. This JDK must therefore be invoked using its"
ewarn "absolute location under ${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}."
fi
}