summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-04-07 21:02:22 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2024-04-07 21:05:03 +0300
commitd12dc30217085d3a6605b85e5d7a2a26be81ea7c (patch)
tree6875d6ecc0c21269988b678e6b1c5ddeb3e164e3
parentdev-db/pgbouncer: drop 1.20.0, 1.20.1, 1.21.0 (diff)
downloadgentoo-d12dc302.tar.gz
gentoo-d12dc302.tar.bz2
gentoo-d12dc302.zip
dev-java/openjdk: add x86 bootstrap tarball for SLOT=8
Requested by vaukai, to ease cleanup of icedtea. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r--dev-java/openjdk/Manifest1
-rw-r--r--dev-java/openjdk/openjdk-8.402_p06.ebuild49
-rw-r--r--profiles/arch/x86/package.use.force3
-rw-r--r--profiles/base/package.use.force1
4 files changed, 47 insertions, 7 deletions
diff --git a/dev-java/openjdk/Manifest b/dev-java/openjdk/Manifest
index 8e8a113c54e7..2fe6b10adac3 100644
--- a/dev-java/openjdk/Manifest
+++ b/dev-java/openjdk/Manifest
@@ -13,3 +13,4 @@ DIST openjdk-bootstrap-17.0.2_p8-arm64-musl.tar.xz 115353932 BLAKE2B 0cc4ab07808
DIST openjdk-bootstrap-17.0.3_p7-riscv.tar.xz 113344052 BLAKE2B 69ae326c600ecf1840a0874b1e26545779434b979e195a3bc7975615f873cd9ffce324f291e56a2800edc304447845baec774b2a08964afde274bd8e0dd3f704 SHA512 4a483faa32b26758f6fae605fdb3d3b77814c627a3a560e91ca88e2d36a88543a53f019a59b5a6456b87ca671e8b7129d5766210bd5cd52125cb3a040ec2a23f
DIST openjdk-bootstrap-21.0.0_p35-ppc64.tar.xz 125375264 BLAKE2B 28802995f393dc76362dae766f8b598fd56085051418075d4c426293e6431b441ea38a2d2e4676fc89173d10324e3aafac52c97a5d9459bb0199168a07807e16 SHA512 cbd3992450c44764373c25313f6ce32f0c8a47abec557e4a10f7f8517435bf450ba5ac9fa9c8cdfb41f1536b55829d733426dc12dc2b5a2eebf5a94e9094752a
DIST openjdk-bootstrap-21.0.0_p35-x86.tar.xz 120906212 BLAKE2B c3a56f4e51a8aca1c318b9c32bebdb4c09e42d80416ce1843bc80077f09466b7f54627ab6992f9149fdabdb4d5557c3cad6b5e93b37ba3d89d84f736fc07a57a SHA512 40f0cf60adaebd0c6ae11badb6b71727a5cc64c89077731b0f7cc82f203297b9b780ae43ec74eca9dd5a64de1209f519c2ad0f9083c017cf474d1020206f762c
+DIST openjdk-bootstrap-8.402_p06-x86.tar.xz 37076244 BLAKE2B bd50f84e8ac2ee9850c158c7e7d9fae9741112230dcd6e314163911921d63e3222cd3f4ab9d08bbaacbf6d9bfce9a1a9336e21088fba6396613489a701b30797 SHA512 fe5719e0bbf9bcd6eb9790ebd4da34e7f6c99fe4b7d41de2b5d00b20ebe76a77d857c726d1a71b7f40657ca2a9aa08eaa9efc1ab4be60016f66af95530b454b5
diff --git a/dev-java/openjdk/openjdk-8.402_p06.ebuild b/dev-java/openjdk/openjdk-8.402_p06.ebuild
index efd72999aa73..ce8e246db9d3 100644
--- a/dev-java/openjdk/openjdk-8.402_p06.ebuild
+++ b/dev-java/openjdk/openjdk-8.402_p06.ebuild
@@ -16,13 +16,36 @@ inherit check-reqs eapi8-dosym flag-o-matic java-pkg-2 java-vm-2 multiprocessing
MY_PV="$(ver_rs 1 'u' 2 '-' ${PV%_p*}-ga)"
SLOT="${PV%%[.+]*}"
+# variable name format: <UPPERCASE_KEYWORD>_XPAK
+X86_XPAK="8.402_p06"
+
+# Usage: bootstrap_uri <keyword> <version> [extracond]
+# Example: $(bootstrap_uri x86 8.402_p06)
+# Output: ppc64? ( big-endian? ( https://...8.402_p06-x86.tar.xz ) )
+bootstrap_uri() {
+ local baseuri="https://dev.gentoo.org/~arthurzam/distfiles/dev-java/${PN}/${PN}-bootstrap"
+ local suff="tar.xz"
+ local kw="${1:?${FUNCNAME[0]}: keyword not specified}"
+ local ver="${2:?${FUNCNAME[0]}: version not specified}"
+ local cond="${3-}"
+
+ # here be dragons
+ echo "${kw}? ( ${cond:+${cond}? (} ${baseuri}-${ver}-${kw}.${suff} ${cond:+) })"
+}
+
DESCRIPTION="Open source implementation of the Java programming language"
HOMEPAGE="https://openjdk.org"
-SRC_URI="https://github.com/openjdk/jdk${SLOT}u/archive/refs/tags/jdk${MY_PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="
+ https://github.com/openjdk/jdk${SLOT}u/archive/refs/tags/jdk${MY_PV}.tar.gz
+ -> ${P}.tar.gz
+ !system-bootstrap? (
+ $(bootstrap_uri x86 ${X86_XPAK})
+ )
+"
LICENSE="GPL-2-with-classpath-exception"
KEYWORDS="amd64 arm64 ppc64 x86"
-IUSE="alsa debug cups doc examples headless-awt javafx +jbootstrap selinux source"
+IUSE="alsa debug cups doc examples headless-awt javafx +jbootstrap selinux system-bootstrap source"
COMMON_DEPEND="
media-libs/freetype:2=
@@ -105,13 +128,22 @@ pkg_pretend() {
pkg_setup() {
openjdk_check_requirements
+ java-vm-2_pkg_setup
+
+ [[ ${MERGE_TYPE} == "binary" ]] && return
JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT} icedtea-${SLOT} icedtea-bin-${SLOT}"
JAVA_PKG_WANT_SOURCE="${SLOT}"
JAVA_PKG_WANT_TARGET="${SLOT}"
- java-vm-2_pkg_setup
- java-pkg-2_pkg_setup
+ if use system-bootstrap; then
+ for vm in ${JAVA_PKG_WANT_BUILD_VM}; do
+ if [[ -d ${BROOT}/usr/lib/jvm/${vm} ]]; then
+ java-pkg-2_pkg_setup
+ return
+ fi
+ done
+ fi
}
src_prepare() {
@@ -125,6 +157,11 @@ src_prepare() {
}
src_configure() {
+ if ! use system-bootstrap; then
+ local xpakvar="${ARCH^^}_XPAK"
+ export JDK_HOME="${WORKDIR}/openjdk-bootstrap-${!xpakvar}"
+ fi
+
# general build info found here:
# https://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html
@@ -156,7 +193,7 @@ src_configure() {
--with-extra-ldflags="${LDFLAGS}"
--with-freetype-lib="$( $(tc-getPKG_CONFIG) --variable=libdir freetype2 )"
--with-freetype-include="$( $(tc-getPKG_CONFIG) --variable=includedir freetype2)/freetype2"
- --with-giflib=system
+ --with-giflib="${XPAK_BOOTSTRAP:-system}"
--with-jtreg=no
--with-jobs=1
--with-num-cores=1
@@ -167,7 +204,7 @@ src_configure() {
--with-vendor-url="https://gentoo.org"
--with-vendor-bug-url="https://bugs.gentoo.org"
--with-vendor-vm-bug-url="https://bugs.openjdk.java.net"
- --with-zlib=system
+ --with-zlib="${XPAK_BOOTSTRAP:-system}"
--with-native-debug-symbols=$(usex debug internal none)
$(usex headless-awt --disable-headful '')
$(tc-is-clang && echo "--with-toolchain-type=clang")
diff --git a/profiles/arch/x86/package.use.force b/profiles/arch/x86/package.use.force
index f897eca675ea..1cf0c69377b6 100644
--- a/profiles/arch/x86/package.use.force
+++ b/profiles/arch/x86/package.use.force
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Joonas Niilola <juippis@gentoo.org> (2023-03-16)
@@ -15,6 +15,7 @@ www-client/firefox system-libvpx
# Arthur Zamarin <arthurzam@gentoo.org> (2022-01-16)
# Bootstrapping is possible using our build snapshot, so don't force
# system bootstrap
+dev-java/openjdk:8 -system-bootstrap
dev-java/openjdk:11 -system-bootstrap
dev-java/openjdk:17 -system-bootstrap
dev-java/openjdk:21 -system-bootstrap
diff --git a/profiles/base/package.use.force b/profiles/base/package.use.force
index 5a6cefad7df2..440df6153693 100644
--- a/profiles/base/package.use.force
+++ b/profiles/base/package.use.force
@@ -50,6 +50,7 @@ sys-devel/clang pie
# Arthur Zamarin <arthurzam@gentoo.org> (2022-01-13)
# Force to use installed openjdk{,-bin} for bootstrapping
+dev-java/openjdk:8 system-bootstrap
dev-java/openjdk:11 system-bootstrap
dev-java/openjdk:17 system-bootstrap
dev-java/openjdk:21 system-bootstrap