openjdk-15: remove gentoo-vm flag.

This commit is contained in:
Andrius Štikonas 2024-03-02 14:31:20 +00:00
parent 59c668094f
commit c2cdcb4436
2 changed files with 24 additions and 52 deletions

View File

@ -94,7 +94,7 @@ EBUILD openjdk-11.0.20.1_p1.ebuild 7685 BLAKE2B 8a20baa3fd625ee50d83e7906708ec64
EBUILD openjdk-12.0.2_p01.ebuild 7977 BLAKE2B 475a85f31222335554e85dad2585a47cba3c4cf15c88eaa1e7491704b220f9cb4449e4c51f7eba11113b37e8ba4edac90c8150a588be05df0bdd35e5f8054940 SHA512 03edacd97dca7caafec2fa05a3f590bc2dcf152f3f5cd8a4dd83bd295183bca2e6f9c9d65c3872768404ea9e97bae57351b76d881a235f1ef7ef0cc3414ec63b
EBUILD openjdk-13.0.4_p01.ebuild 7821 BLAKE2B b1c3bb3d149db239e9f2bd8c30a8dafeae343ba5775d826db63949458c1c4099abcf38976bd5f66bec11a460f2720efe8c39d4d7c60399b70541678f2ee1ddb9 SHA512 b8217a7dd1308e68716ccf42cc1c1ba325e0390be22dc062eeddba06315c58d081f770df7afe10764e05242fc07313ab2939214094a9225c0ae9995c84803807
EBUILD openjdk-14.0.2_p01.ebuild 7821 BLAKE2B b1c3bb3d149db239e9f2bd8c30a8dafeae343ba5775d826db63949458c1c4099abcf38976bd5f66bec11a460f2720efe8c39d4d7c60399b70541678f2ee1ddb9 SHA512 b8217a7dd1308e68716ccf42cc1c1ba325e0390be22dc062eeddba06315c58d081f770df7afe10764e05242fc07313ab2939214094a9225c0ae9995c84803807
EBUILD openjdk-15.0.0_p36.ebuild 8530 BLAKE2B 87603ce71c6074b1037066ce698fb28e2f8052641c895c72c321e65c7809ba9e969fa79794b3cb2d0fba959d1e9c57d03b54cd4c34fc062cbc6965233e1a14d9 SHA512 ad08ad88bf287d94f2617fd2f73e5dbc678791a67b273532155c181393dffa587e48cfcdaef95c99b7f5c6d82e7dc4cc64c123771dee4d2daa3554dc9b55c86f
EBUILD openjdk-15.0.0_p36.ebuild 7377 BLAKE2B 0b311db239711583e163bfe1a485d7566997cd17f3c96dba0b45692fb47012d650324f8def4c1a168361be443d4243aabf2b8c116b265f1b1619f8cc24272d7e SHA512 3e81ba53c3043bc445a9ed0fa3c4e529887ae6bb55cda8932ee4658e0659577403ab8fc259920c72dde249bedcedbb8aab345a4fd3a4d73ec8a9c48ff029ecef
EBUILD openjdk-16.0.0_p36.ebuild 8348 BLAKE2B 9bb4fbde967017709c252ccae3bab0d308f4189456218e29960f3b0e2b31fb7e3569915f5c932f6c294417bc08aed64ca9f7de9fb3f6bb97c92541d4962e1148 SHA512 544c2b996b79aee0c08fa4a985076f7965d803f1ebf3de95e295c1c35c6c0c707a4d5152559b838696321809e270c65a4a8d78a813c9ea99dc52b75bf3f56e17
EBUILD openjdk-17.0.0_p35.ebuild 8350 BLAKE2B 7dd8c922cb389cfd95aafe140692cb267cfca39b3a3634058605cc9bacd822fb4ba8d4bf1242c18de311d9d310e544d074db821ecfc8e3a5335082e3be083228 SHA512 36ebe391d81a1cb9abe0ba2dcc8645d808bb18745e316857dbd219aee3533a7c7b2d69785686907cc9ffae6725ced7adac81eca8f43aa907c54605cdb3007403
EBUILD openjdk-18.0.2_p05.ebuild 8349 BLAKE2B 40c766352be5104b3448a5ea506b9f236cf36dbbdf825bc93578c7830c3d340f83eb5dade233d4a0c3892a83d3d1ce0ec925c73e82241d5006544f51597f5624 SHA512 1c9641916ce24dfa6ece0908e971504f53e2f9eb6147bc6279b4e03c19857036063e2b9c61550c6cf010bf447ed2b4819cde170f9abb1ed38c691d625f285a2d

View File

@ -3,7 +3,7 @@
EAPI=6
inherit autotools check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils toolchain-funcs
inherit autotools check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing toolchain-funcs
MY_PV="${PV/_p/+}"
FULL_VERSION="${PV%_p*}"
@ -24,7 +24,7 @@ HOMEPAGE="https://openjdk.java.net"
LICENSE="GPL-2"
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 pch selinux source systemtap"
COMMON_DEPEND="
media-libs/freetype:2=
@ -106,33 +106,12 @@ pkg_setup() {
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() {
@ -163,21 +142,29 @@ src_configure() {
# Work around -fno-common ( GCC10 default ), bug #713180
append-flags -fcommon
# Strip lto related flags, we rely on USE=lto and --with-jvm-features=link-time-opt
# https://bugs.gentoo.org/833097
# https://bugs.gentoo.org/833098
filter-lto
filter-flags -fdevirtualize-at-ltrans
# Enabling full docs appears to break doc building. If not
# explicitly disabled, the flag will get auto-enabled if pandoc and
# graphviz are detected. pandoc has loads of dependencies anyway.
local myconf=(
--disable-ccache
--disable-precompiled-headers
--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"
@ -187,12 +174,14 @@ 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"
if [[ -r ${zip} ]]; then
@ -202,13 +191,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= \
@ -221,6 +203,8 @@ 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 '')
product-images
@ -258,7 +242,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}"
@ -266,29 +250,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
}