Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] openjdk11: cleanup, split jre into subpackage
Date: Mon, 04 Apr 2022 18:29:47 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36520@inbox.vuxu.org> (raw)

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

There is a new pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages openjdk11-cleanup
https://github.com/void-linux/void-packages/pull/36520

openjdk11: cleanup, split jre into subpackage
- openjdk11: clean up template
- New package: openjdk11-jre-11.0.12+5.

This should bring openjdk11 more in-line with other openjdk package templates

cc: @knusbaum for maintainer review

<!-- Uncomment relevant sections and delete options which are not applicable -->

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

<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

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

From e843792847ec8001a2e857f6f01d0e787d8fc795 Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@kb6.ee>
Date: Mon, 4 Apr 2022 12:15:17 -0400
Subject: [PATCH 1/2] openjdk11: clean up template

---
 srcpkgs/openjdk11/template | 110 ++++++++++++++++++-------------------
 1 file changed, 55 insertions(+), 55 deletions(-)

diff --git a/srcpkgs/openjdk11/template b/srcpkgs/openjdk11/template
index bd38c0c5c010..01f7e1484d80 100644
--- a/srcpkgs/openjdk11/template
+++ b/srcpkgs/openjdk11/template
@@ -1,9 +1,9 @@
 # Template file for 'openjdk11'
 pkgname=openjdk11
 version=11.0.12+5
-revision=2
+revision=4
 _java_ver="${version%%.*}"
-_openjdk_version="openjdk-${_java_ver}"
+_jdk_home="usr/lib/jvm/openjdk${_java_ver}"
 wrksrc="jdk${_java_ver}u-jdk-${version}"
 build_style=gnu-configure
 configure_args="
@@ -68,50 +68,50 @@ if [ ! "$CROSS_BUILD" ]; then
 	configure_args+=" --with-boot-jdk=/usr/lib/jvm/java-10-openjdk"
 else
 	hostmakedepends+=" openjdk11"
-	configure_args+=" --with-boot-jdk=/usr/lib/jvm/openjdk11"
+	configure_args+=" --with-boot-jdk=/${_jdk_home}"
 fi
 
 alternatives="
- java:/usr/bin/java:/usr/lib/jvm/openjdk11/bin/java
- java:/usr/bin/jjs:/usr/lib/jvm/openjdk11/bin/jjs
- java:/usr/bin/keytool:/usr/lib/jvm/openjdk11/bin/keytool
- java:/usr/bin/pack200:/usr/lib/jvm/openjdk11/bin/pack200
- java:/usr/bin/rmid:/usr/lib/jvm/openjdk11/bin/rmid
- java:/usr/bin/rmiregistry:/usr/lib/jvm/openjdk11/bin/rmiregistry
- java:/usr/bin/unpack200:/usr/lib/jvm/openjdk11/bin/unpack200
+ java:/usr/bin/java:/${_jdk_home}/bin/java
+ java:/usr/bin/jjs:/${_jdk_home}/bin/jjs
+ java:/usr/bin/keytool:/${_jdk_home}/bin/keytool
+ java:/usr/bin/pack200:/${_jdk_home}/bin/pack200
+ java:/usr/bin/rmid:/${_jdk_home}/bin/rmid
+ java:/usr/bin/rmiregistry:/${_jdk_home}/bin/rmiregistry
+ java:/usr/bin/unpack200:/${_jdk_home}/bin/unpack200
 
- jdk:/usr/bin/jaotc:/usr/lib/jvm/openjdk11/bin/jaotc
- jdk:/usr/bin/jar:/usr/lib/jvm/openjdk11/bin/jar
- jdk:/usr/bin/jarsigner:/usr/lib/jvm/openjdk11/bin/jarsigner
- jdk:/usr/bin/java:/usr/lib/jvm/openjdk11/bin/java
- jdk:/usr/bin/javac:/usr/lib/jvm/openjdk11/bin/javac
- jdk:/usr/bin/javadoc:/usr/lib/jvm/openjdk11/bin/javadoc
- jdk:/usr/bin/javap:/usr/lib/jvm/openjdk11/bin/javap
- jdk:/usr/bin/jcmd:/usr/lib/jvm/openjdk11/bin/jcmd
- jdk:/usr/bin/jconsole:/usr/lib/jvm/openjdk11/bin/jconsole
- jdk:/usr/bin/jdb:/usr/lib/jvm/openjdk11/bin/jdb
- jdk:/usr/bin/jdeprscan:/usr/lib/jvm/openjdk11/bin/jdeprscan
- jdk:/usr/bin/jdeps:/usr/lib/jvm/openjdk11/bin/jdeps
- jdk:/usr/bin/jhsdb:/usr/lib/jvm/openjdk11/bin/jhsdb
- jdk:/usr/bin/jimage:/usr/lib/jvm/openjdk11/bin/jimage
- jdk:/usr/bin/jinfo:/usr/lib/jvm/openjdk11/bin/jinfo
- jdk:/usr/bin/jjs:/usr/lib/jvm/openjdk11/bin/jjs
- jdk:/usr/bin/jlink:/usr/lib/jvm/openjdk11/bin/jlink
- jdk:/usr/bin/jmap:/usr/lib/jvm/openjdk11/bin/jmap
- jdk:/usr/bin/jmod:/usr/lib/jvm/openjdk11/bin/jmod
- jdk:/usr/bin/jps:/usr/lib/jvm/openjdk11/bin/jps
- jdk:/usr/bin/jrunscript:/usr/lib/jvm/openjdk11/bin/jrunscript
- jdk:/usr/bin/jshell:/usr/lib/jvm/openjdk11/bin/jshell
- jdk:/usr/bin/jstack:/usr/lib/jvm/openjdk11/bin/jstack
- jdk:/usr/bin/jstat:/usr/lib/jvm/openjdk11/bin/jstat
- jdk:/usr/bin/jstatd:/usr/lib/jvm/openjdk11/bin/jstatd
- jdk:/usr/bin/keytool:/usr/lib/jvm/openjdk11/bin/keytool
- jdk:/usr/bin/pack200:/usr/lib/jvm/openjdk11/bin/pack200
- jdk:/usr/bin/rmic:/usr/lib/jvm/openjdk11/bin/rmic
- jdk:/usr/bin/rmid:/usr/lib/jvm/openjdk11/bin/rmid
- jdk:/usr/bin/rmiregistry:/usr/lib/jvm/openjdk11/bin/rmiregistry
- jdk:/usr/bin/serialver:/usr/lib/jvm/openjdk11/bin/serialver
- jdk:/usr/bin/unpack200:/usr/lib/jvm/openjdk11/bin/unpack200
+ jdk:/usr/bin/jaotc:/${_jdk_home}/bin/jaotc
+ jdk:/usr/bin/jar:/${_jdk_home}/bin/jar
+ jdk:/usr/bin/jarsigner:/${_jdk_home}/bin/jarsigner
+ jdk:/usr/bin/java:/${_jdk_home}/bin/java
+ jdk:/usr/bin/javac:/${_jdk_home}/bin/javac
+ jdk:/usr/bin/javadoc:/${_jdk_home}/bin/javadoc
+ jdk:/usr/bin/javap:/${_jdk_home}/bin/javap
+ jdk:/usr/bin/jcmd:/${_jdk_home}/bin/jcmd
+ jdk:/usr/bin/jconsole:/${_jdk_home}/bin/jconsole
+ jdk:/usr/bin/jdb:/${_jdk_home}/bin/jdb
+ jdk:/usr/bin/jdeprscan:/${_jdk_home}/bin/jdeprscan
+ jdk:/usr/bin/jdeps:/${_jdk_home}/bin/jdeps
+ jdk:/usr/bin/jhsdb:/${_jdk_home}/bin/jhsdb
+ jdk:/usr/bin/jimage:/${_jdk_home}/bin/jimage
+ jdk:/usr/bin/jinfo:/${_jdk_home}/bin/jinfo
+ jdk:/usr/bin/jjs:/${_jdk_home}/bin/jjs
+ jdk:/usr/bin/jlink:/${_jdk_home}/bin/jlink
+ jdk:/usr/bin/jmap:/${_jdk_home}/bin/jmap
+ jdk:/usr/bin/jmod:/${_jdk_home}/bin/jmod
+ jdk:/usr/bin/jps:/${_jdk_home}/bin/jps
+ jdk:/usr/bin/jrunscript:/${_jdk_home}/bin/jrunscript
+ jdk:/usr/bin/jshell:/${_jdk_home}/bin/jshell
+ jdk:/usr/bin/jstack:/${_jdk_home}/bin/jstack
+ jdk:/usr/bin/jstat:/${_jdk_home}/bin/jstat
+ jdk:/usr/bin/jstatd:/${_jdk_home}/bin/jstatd
+ jdk:/usr/bin/keytool:/${_jdk_home}/bin/keytool
+ jdk:/usr/bin/pack200:/${_jdk_home}/bin/pack200
+ jdk:/usr/bin/rmic:/${_jdk_home}/bin/rmic
+ jdk:/usr/bin/rmid:/${_jdk_home}/bin/rmid
+ jdk:/usr/bin/rmiregistry:/${_jdk_home}/bin/rmiregistry
+ jdk:/usr/bin/serialver:/${_jdk_home}/bin/serialver
+ jdk:/usr/bin/unpack200:/${_jdk_home}/bin/unpack200
 "
 
 post_extract() {
@@ -151,11 +151,11 @@ do_configure() {
 }
 
 do_install() {
-	vmkdir usr/lib/jvm/openjdk${_java_ver}
-	vcopy build/*-normal-*-release/images/jdk/* "usr/lib/jvm/openjdk${_java_ver}"
-	vmkdir usr/lib/jvm/$_openjdk_version/lib/security
-	make-ca -g -f --destdir "${PWD}/ca" -k "${DESTDIR}/usr/lib/jvm/openjdk${_java_ver}/bin/keytool"
-	mv ./ca/etc/pki/tls/java/cacerts ${DESTDIR}/usr/lib/jvm/openjdk${_java_ver}/lib/security/
+	vmkdir $_jdk_home
+	vcopy build/*-normal-*-release/images/jdk/* $_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
 	vmkdir etc/profile.d
@@ -170,14 +170,14 @@ openjdk11-doc_package() {
 	nostrip=yes
 	noverifyrdeps=yes
 	noshlibprovides=yes
-	short_desc+=" -- documentation"
+	short_desc+=" - documentation"
 	pkg_install() {
 		cd ${wrksrc}
 		if [ "$build_option_docs" ]; then
 			vmkdir usr/share/doc/openjdk11
-			cp -a build/linux-*/images/docs/* ${PKGDESTDIR}/usr/share/doc/openjdk11
+			cp -a build/linux-*/images/docs/* $PKGDESTDIR/usr/share/doc/openjdk11
 		fi
-		vmove usr/lib/jvm/openjdk11/man/man1
+		vmove $_jdk_home/man/man1
 	}
 }
 
@@ -185,17 +185,17 @@ openjdk11-src_package() {
 	nostrip=yes
 	noverifyrdeps=yes
 	noshlibprovides=yes
-	short_desc+=" -- sources"
+	short_desc+=" - sources"
 	pkg_install() {
-		vmove "usr/lib/jvm/openjdk11/lib/src.zip"
+		vmove $_jdk_home/lib/src.zip
 	}
 }
 
 openjdk11-static-libs_package() {
 	notstrip=yes
-	short_desc+=" -- static libs"
+	short_desc+=" - static libs"
 	pkg_install() {
-		vmkdir usr/lib/jvm/openjdk${_java_ver}
-		vcopy build/*-normal-*-release/images/static-libs/lib "usr/lib/jvm/openjdk${_java_ver}"
+		vmkdir $_jdk_home
+		vcopy build/*-normal-*-release/images/static-libs/lib $_jdk_home
 	}
 }

From 229fa5c604c52eeb53e9a2cd6d5433b7ae5e73d5 Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@kb6.ee>
Date: Mon, 4 Apr 2022 12:25:32 -0400
Subject: [PATCH 2/2] New package: openjdk11-jre-11.0.12+5.

---
 common/shlibs              | 12 ++++++------
 srcpkgs/openjdk11/template | 35 ++++++++++++++++++++++++++++++++---
 2 files changed, 38 insertions(+), 9 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 307cb13347fc..f77f30c048ea 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1809,12 +1809,12 @@ libawt_xawt.so openjdk8-jre-8u20_1
 libjava.so openjdk8-jre-8u20_1
 libjli.so openjdk8-jre-8u20_1
 libjvm.so openjdk8-jre-8u20_1
-libjawt.so openjdk11-11.0.5+10_1
-libawt.so openjdk11-11.0.5+10_1
-libawt_xawt.so openjdk11-11.0.5+10_1
-libjava.so openjdk11-11.0.5+10_1
-libjli.so openjdk11-11.0.5+10_1
-libjvm.so openjdk11-11.0.5+10_1
+libjawt.so openjdk11-jre-11.0.5+10_1
+libawt.so openjdk11-jre-11.0.5+10_1
+libawt_xawt.so openjdk11-jre-11.0.5+10_1
+libjava.so openjdk11-jre-11.0.5+10_1
+libjli.so openjdk11-jre-11.0.5+10_1
+libjvm.so openjdk11-jre-11.0.5+10_1
 libjawt.so openjdk7-bootstrap-7u221b02_1
 libawt.so openjdk7-bootstrap-7u221b02_1
 libawt_xawt.so openjdk7-bootstrap-7u221b02_1
diff --git a/srcpkgs/openjdk11/template b/srcpkgs/openjdk11/template
index 01f7e1484d80..e52436b93e0b 100644
--- a/srcpkgs/openjdk11/template
+++ b/srcpkgs/openjdk11/template
@@ -31,15 +31,14 @@ hostmakedepends="pkg-config automake autoconf cpio tar unzip zip ca-certificates
 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="fontconfig"
+depends="${pkgname}-jre-${version}_${revision}"
 short_desc="OpenJDK Java Development Kit"
 maintainer="Kyle Nusbaum <knusbaum+void@sdf.org>"
 license="GPL-2.0-only WITH Classpath-exception-2.0"
 homepage="http://openjdk.java.net/"
 distfiles="https://hg.openjdk.java.net/jdk-updates/jdk${_java_ver}u/archive/jdk-${version}.tar.gz"
 checksum=ff0edaf800c76ae435840365a9205a5f7277a5a2fd3c79ad874522a15c213559
-provides="java-environment-${version}_1 java-runtime-${version}_1"
-shlib_provides="libawt.so libawt_xawt.so libjava.so libjli.so libjvm.so libjawt.so"
+provides="java-environment-${version}_1"
 
 # Build is still parallel, but don't use -jN.
 disable_parallel_build=yes
@@ -166,6 +165,36 @@ EOF
 	vlicense LICENSE
 }
 
+subpackages="openjdk11-src openjdk11-jre openjdk11-doc openjdk11-static-libs"
+
+openjdk11-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="fontconfig"
+	alternatives="
+	 java:/usr/bin/java:/${_jdk_home}/bin/java
+	 java:/usr/bin/jjs:/${_jdk_home}/bin/jjs
+	 java:/usr/bin/keytool:/${_jdk_home}/bin/keytool
+	 java:/usr/bin/pack200:/${_jdk_home}/bin/pack200
+	 java:/usr/bin/rmid:/${_jdk_home}/bin/rmid
+	 java:/usr/bin/rmiregistry:/${_jdk_home}/bin/rmiregistry
+	 java:/usr/bin/unpack200:/${_jdk_home}/bin/unpack200
+	"
+	pkg_install() {
+		for bf in java jjs keytool pack200 rmid rmiregistry unpack200; do
+			vmove $_jdk_home/bin/$bf
+		done
+
+		for f in lib legal conf release; do
+			vmove $_jdk_home/$f
+		done
+
+		vlicense ASSEMBLY_EXCEPTION
+		vlicense LICENSE
+	}
+}
+
 openjdk11-doc_package() {
 	nostrip=yes
 	noverifyrdeps=yes

             reply	other threads:[~2022-04-04 16:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 16:29 classabbyamp [this message]
2022-04-04 16:31 ` [PR PATCH] [Updated] " classabbyamp
2022-04-04 16:36 ` classabbyamp
2022-04-04 17:47 ` classabbyamp
2022-04-04 19:58 ` classabbyamp
2022-04-04 21:04 ` classabbyamp
2022-04-19 15:30 ` classabbyamp
2022-04-20  2:26 ` classabbyamp
2022-04-20 23:54 ` classabbyamp
2022-04-21  0:15 ` [PR PATCH] [Updated] openjdk11: cleanup, split jre, jmods " classabbyamp
2022-04-21  1:25 ` [PR PATCH] [Updated] openjdk11: update to 11.0.12+7, cleanup, split jre & jmods into subpkgs classabbyamp
2022-04-21  1:28 ` classabbyamp
2022-04-21  3:31 ` classabbyamp
2022-04-25 15:05 ` classabbyamp
2022-04-25 15:10 ` classabbyamp
2022-04-25 17:16 ` classabbyamp
2022-04-25 18:46 ` classabbyamp
2022-04-27 15:14 ` classabbyamp
2022-04-27 22:34 ` [PR PATCH] [Merged]: " leahneukirchen

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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36520@inbox.vuxu.org \
    --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).