Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] jdk21
Date: Sun, 24 Dec 2023 05:16:38 +0100	[thread overview]
Message-ID: <20231224041638.WhWE_lqk9t1Rgckox0NChuYeRkxR5di-SJS29PfSaj0@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47882@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages jdk21
https://github.com/void-linux/void-packages/pull/47882

jdk21
#### Testing the changes
- I tested the changes in this PR: **YES**

test please: https://files.placeviolette.net/jdk21/

[ci skip]



A patch file from https://github.com/void-linux/void-packages/pull/47882.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-jdk21-47882.patch --]
[-- Type: text/x-diff, Size: 8274 bytes --]

From 8b5d66621d608d69813d3a1d7fd1ba15fa9bb4d4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 22 Dec 2023 00:47:14 -0500
Subject: [PATCH] New package: openjdk21-21.0.1+12

---
 srcpkgs/openjdk21-doc         |   1 +
 srcpkgs/openjdk21-jmods       |   1 +
 srcpkgs/openjdk21-jre         |   1 +
 srcpkgs/openjdk21-src         |   1 +
 srcpkgs/openjdk21-static-libs |   1 +
 srcpkgs/openjdk21/template    | 194 ++++++++++++++++++++++++++++++++++
 srcpkgs/openjdk21/update      |   1 +
 7 files changed, 200 insertions(+)
 create mode 120000 srcpkgs/openjdk21-doc
 create mode 120000 srcpkgs/openjdk21-jmods
 create mode 120000 srcpkgs/openjdk21-jre
 create mode 120000 srcpkgs/openjdk21-src
 create mode 120000 srcpkgs/openjdk21-static-libs
 create mode 100644 srcpkgs/openjdk21/template
 create mode 100644 srcpkgs/openjdk21/update

diff --git a/srcpkgs/openjdk21-doc b/srcpkgs/openjdk21-doc
new file mode 120000
index 0000000000000..57e991f86dff5
--- /dev/null
+++ b/srcpkgs/openjdk21-doc
@@ -0,0 +1 @@
+openjdk21
\ No newline at end of file
diff --git a/srcpkgs/openjdk21-jmods b/srcpkgs/openjdk21-jmods
new file mode 120000
index 0000000000000..57e991f86dff5
--- /dev/null
+++ b/srcpkgs/openjdk21-jmods
@@ -0,0 +1 @@
+openjdk21
\ No newline at end of file
diff --git a/srcpkgs/openjdk21-jre b/srcpkgs/openjdk21-jre
new file mode 120000
index 0000000000000..57e991f86dff5
--- /dev/null
+++ b/srcpkgs/openjdk21-jre
@@ -0,0 +1 @@
+openjdk21
\ No newline at end of file
diff --git a/srcpkgs/openjdk21-src b/srcpkgs/openjdk21-src
new file mode 120000
index 0000000000000..57e991f86dff5
--- /dev/null
+++ b/srcpkgs/openjdk21-src
@@ -0,0 +1 @@
+openjdk21
\ No newline at end of file
diff --git a/srcpkgs/openjdk21-static-libs b/srcpkgs/openjdk21-static-libs
new file mode 120000
index 0000000000000..57e991f86dff5
--- /dev/null
+++ b/srcpkgs/openjdk21-static-libs
@@ -0,0 +1 @@
+openjdk21
\ No newline at end of file
diff --git a/srcpkgs/openjdk21/template b/srcpkgs/openjdk21/template
new file mode 100644
index 0000000000000..87099542c3373
--- /dev/null
+++ b/srcpkgs/openjdk21/template
@@ -0,0 +1,194 @@
+# Template file for 'openjdk21'
+pkgname=openjdk21
+version=21.0.1+12
+revision=1
+_gtest_ver=1.13.0
+_java_ver="${version%%.*}"
+_jdk_update="${version#*+}"
+_base_version="${version%+*}"
+_jdk_home="usr/lib/jvm/openjdk${_java_ver}"
+archs="x86_64* aarch64*"
+create_wrksrc=yes
+build_wrksrc="jdk${_java_ver}u-jdk-${version/+/-}"
+build_style=gnu-configure
+configure_args="--disable-warnings-as-errors
+ --enable-unlimited-crypto
+ --with-zlib=system
+ --with-libjpeg=system
+ --with-giflib=system
+ --with-libpng=system
+ --with-lcms=system
+ --with-jtreg=no
+ --with-gtest=../googletest-${_gtest_ver}
+ --with-debug-level=release
+ --with-native-debug-symbols=internal
+ --with-jobs=${XBPS_ORIG_MAKEJOBS}
+ --with-version-pre=
+ --with-version-build=${_jdk_update}
+ --with-version-opt=void-r${revision}
+ --with-vendor-name=Void
+ --with-vendor-url=https://voidlinux.org/
+ --with-vendor-bug-url=https://github.com/void-linux/void-packages/issues
+ --with-vendor-vm-bug-url=https://github.com/void-linux/void-packages/issues"
+make_build_args="images static-libs-image $(vopt_if docs docs)"
+make_install_args="INSTALL_PREFIX=\"${DESTDIR}/usr/lib\""
+make_check_target="test-hotspot-gtest"
+hostmakedepends="pkg-config automake autoconf cpio tar unzip zip ca-certificates
+ openssl zlib-devel which make-ca openjdk20-bootstrap"
+makedepends="libXrender-devel libXtst-devel libXt-devel libXrandr-devel
+ giflib-devel libjpeg-turbo-devel cups-devel freetype-devel alsa-lib-devel
+ fontconfig-devel zlib-devel lcms2-devel"
+depends="${pkgname}-jre-${version}_${revision}"
+short_desc="OpenJDK Java Development Kit (version ${_java_ver})"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="GPL-2.0-only WITH Classpath-exception-2.0"
+homepage="http://openjdk.java.net/"
+distfiles="https://github.com/openjdk/jdk${_java_ver}u/archive/jdk-${version}.tar.gz
+ https://github.com/google/googletest/archive/refs/tags/v${_gtest_ver}.tar.gz"
+checksum="9943e3814d3c1a31f1449f09a8b67df54841944f855a1d372be892c5e6b19217
+ ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363"
+alternatives="jdk:/usr/lib/jvm/default-jdk:/${_jdk_home}"
+provides="java-environment-${version}_1"
+patch_args="-Np1 --directory=$build_wrksrc"
+
+# Build and check are still parallel, but don't use -jN.
+disable_parallel_build=yes
+disable_parallel_check=yes
+build_options="docs"
+
+case "$XBPS_TARGET_MACHINE" in
+	ppc64*) ;;
+	# no hotspot JIT for ppc32
+	ppc*) _use_zero=yes ;;
+	i686*|arm*) broken="Unsupported architecture" ;;
+esac
+
+if [ -n "$_use_zero" ]; then
+	makedepends+=" libffi-devel"
+	configure_args+=" --with-jvm-variants=zero"
+	case "$XBPS_TARGET_MACHINE" in
+	ppc*) configure_args+=" --with-boot-jdk-jvmargs=-XX:ThreadStackSize=2560";;
+	esac
+fi
+configure_args+=" --with-boot-jdk-jvmargs=-Xlog:disable"
+
+case "$XBPS_TARGET_LIBC" in
+	glibc) build_options_default+=" docs";;
+esac
+
+if [ ! "$CROSS_BUILD" ]; then
+	hostmakedepends+=" openjdk20-bootstrap"
+	configure_args+=" --with-boot-jdk=/usr/lib/jvm/openjdk20"
+else
+	hostmakedepends+=" openjdk21"
+	configure_args+=" --with-boot-jdk=/usr/lib/jvm/openjdk21"
+fi
+
+post_extract() {
+	chmod +x $build_wrksrc/configure
+	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+		rm -r $build_wrksrc/src/jdk.hotspot.agent
+	fi
+}
+
+do_configure() {
+	CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
+	CXXFLAGS=${CXXFLAGS/-D_FORTIFY_SOURCE=2/}
+
+	# force ELFv2 for ppc64 just in case
+	case "$XBPS_TARGET_MACHINE" in
+		ppc64*)
+			CFLAGS+=" -DABI_ELFv2"
+			CXXFLAGS+=" -DABI_ELFv2"
+			;;
+	esac
+
+	configure_args=${configure_args/--with-libtool-sysroot=$XBPS_CROSS_BASE}
+	if [ "$XBPS_CCACHE" ] && [ -z "$CROSS_BUILD" ]; then
+		configure_args+=" --enable-ccache"
+		CC="/usr/bin/cc"
+		CXX="/usr/bin/c++"
+	fi
+	./configure ${configure_args} \
+		--with-extra-cflags="$CFLAGS" \
+		--with-extra-cxxflags="$CXXFLAGS" \
+		--with-extra-ldflags="$LDFLAGS" \
+		READELF=$READELF AR=$AR STRIP=$STRIP NM=$NM \
+		OBJDUMP=$OBJDUMP OBJCOPY=$OBJCOPY
+}
+
+post_install() {
+	rm -rf ${DESTDIR}/usr/lib/bin
+	mv ${DESTDIR}/usr/lib/jvm/openjdk-${_base_version} ${DESTDIR}/$_jdk_home
+	vcopy build/*-release/images/static-libs/lib $_jdk_home
+	vmkdir $_jdk_home/lib/security
+	make-ca -g -f --destdir "${PWD}/ca" -k "${DESTDIR}/$_jdk_home/bin/keytool"
+	mv ./ca/etc/pki/tls/java/cacerts ${DESTDIR}/$_jdk_home/lib/security/
+	chmod -R ugo+rw ./ca
+	rm -rf ./ca
+}
+
+subpackages="openjdk21-static-libs openjdk21-src openjdk21-jre openjdk21-doc openjdk21-jmods"
+
+openjdk21-jre_package() {
+	shlib_provides="libawt.so libawt_xawt.so libjava.so libjli.so libjvm.so libjawt.so"
+	short_desc+=" - runtime components"
+	provides="java-runtime-${version}_1"
+	depends="openjdk-common"
+	alternatives="java:/usr/lib/jvm/default-jre:/${_jdk_home}"
+	pkg_install() {
+		for bin in java jfr keytool rmiregistry; do
+			vmove "${_jdk_home}/bin/${bin}"
+			vmove "${_jdk_home}/man/man1/${bin}.1"
+		done
+
+		for f in lib legal conf release; do
+			vmove $_jdk_home/$f
+		done
+
+		vlicense ASSEMBLY_EXCEPTION
+		vlicense LICENSE
+	}
+}
+
+openjdk21-doc_package() {
+	nostrip=yes
+	noverifyrdeps=yes
+	noshlibprovides=yes
+	short_desc+=" - documentation"
+	if [ -z "$build_option_docs" ]; then
+		build_style=meta
+	fi
+	pkg_install() {
+		if [ "$build_option_docs" ]; then
+			local _docdir=usr/share/doc/openjdk$_java_ver
+			vmkdir $_docdir
+			cp -a $wrksrc/$build_wrksrc/build/linux-*/images/docs/* ${PKGDESTDIR}/$_docdir
+		fi
+	}
+}
+
+openjdk21-src_package() {
+	nostrip=yes
+	noverifyrdeps=yes
+	noshlibprovides=yes
+	short_desc+=" - source code"
+	pkg_install() {
+		vmove "$_jdk_home/lib/src.zip"
+	}
+}
+
+openjdk21-static-libs_package() {
+	short_desc+=" - static libs"
+	pkg_install() {
+		vmove "$_jdk_home/lib/*.a"
+	}
+}
+
+openjdk21-jmods_package() {
+	short_desc+=" - JMODs"
+	depends="${sourcepkg}-${version}_${revision}"
+	pkg_install() {
+		vmove $_jdk_home/jmods
+	}
+}
diff --git a/srcpkgs/openjdk21/update b/srcpkgs/openjdk21/update
new file mode 100644
index 0000000000000..0090f26b68e1b
--- /dev/null
+++ b/srcpkgs/openjdk21/update
@@ -0,0 +1 @@
+pattern='jdk-\K21\.[\d.+]+(?=\.)'

  parent reply	other threads:[~2023-12-24  4:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-23  0:38 [PR PATCH] jdk21 classabbyamp
2023-12-23  0:41 ` [PR PATCH] [Updated] jdk21 classabbyamp
2023-12-24  4:16 ` classabbyamp [this message]
2023-12-24 14:55 ` [PR PATCH] [Merged]: jdk21 classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231224041638.WhWE_lqk9t1Rgckox0NChuYeRkxR5di-SJS29PfSaj0@z \
    --to=classabbyamp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).