Github messages for voidlinux
 help / color / mirror / Atom feed
From: 2asoft <2asoft@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: jetbrains-jdk17-17.0.3b526.1
Date: Sat, 30 Jul 2022 18:03:25 +0200	[thread overview]
Message-ID: <20220730160325.uOW1R3_KnSvga51XCvovATwuX6MOjmKCvK9l4SqCGlY@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38374@inbox.vuxu.org>

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

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

https://github.com/2asoft/void-packages 2asoft/jb_update_jdk_src
https://github.com/void-linux/void-packages/pull/38374

New package: jetbrains-jdk17-17.0.3b526.1
#### 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**

<!-- 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, (x86_64-LIBC)


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

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

From caf1c33f8978d3ef4124165229704006575ecdb5 Mon Sep 17 00:00:00 2001
From: Anton Afanasyev <anton@doubleasoftware.com>
Date: Sat, 30 Jul 2022 08:47:49 -0700
Subject: [PATCH] New package: jetbrains-jdk17-17.0.3b526.1

---
 .../01-jdk_build_classlist_sort_to_file.diff  |  64 ++++++++++
 srcpkgs/jetbrains-jdk17/template              | 109 ++++++++++++++++++
 srcpkgs/jetbrains-jdk17/update                |   5 +
 3 files changed, 178 insertions(+)
 create mode 100644 srcpkgs/jetbrains-jdk17/patches/01-jdk_build_classlist_sort_to_file.diff
 create mode 100644 srcpkgs/jetbrains-jdk17/template
 create mode 100644 srcpkgs/jetbrains-jdk17/update

diff --git a/srcpkgs/jetbrains-jdk17/patches/01-jdk_build_classlist_sort_to_file.diff b/srcpkgs/jetbrains-jdk17/patches/01-jdk_build_classlist_sort_to_file.diff
new file mode 100644
index 000000000000..e94884daf217
--- /dev/null
+++ b/srcpkgs/jetbrains-jdk17/patches/01-jdk_build_classlist_sort_to_file.diff
@@ -0,0 +1,64 @@
+diff --git a/make/GenerateLinkOptData.gmk b/make/GenerateLinkOptData.gmk
+index 5dd766c8c07..7b2480625f1 100644
+--- a/make/GenerateLinkOptData.gmk
++++ b/make/GenerateLinkOptData.gmk
+@@ -89,9 +89,10 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
+ 	        exit $$exitcode \
+ 	    )
+ 	$(GREP) -v HelloClasslist $@.raw.2 > $@.raw.3
++	echo "" > $@
+ 	$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java \
+ 	    -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
+-	    build.tools.classlist.SortClasslist $@.raw.3 > $@
++	    build.tools.classlist.SortClasslist $@.raw.3 $@
+ 
+ # The jli trace is created by the same recipe as classlist. By declaring these
+ # dependencies, make will correctly rebuild both jli trace and classlist
+diff --git a/make/jdk/src/classes/build/tools/classlist/SortClasslist.java b/make/jdk/src/classes/build/tools/classlist/SortClasslist.java
+index 07987feb2da..7a5b84421fc 100644
+--- a/make/jdk/src/classes/build/tools/classlist/SortClasslist.java
++++ b/make/jdk/src/classes/build/tools/classlist/SortClasslist.java
+@@ -33,6 +33,10 @@ package build.tools.classlist;
+ 
+ import java.io.FileInputStream;
+ import java.io.FileNotFoundException;
++import java.io.FileOutputStream;
++import java.io.OutputStreamWriter;
++import java.io.PrintWriter;
++import java.nio.charset.StandardCharsets;
+ import java.util.ArrayList;
+ import java.util.Collections;
+ import java.util.regex.Pattern;
+@@ -50,13 +54,15 @@ public class SortClasslist {
+         ArrayList<String> lambdas = new ArrayList<>();
+ 
+         FileInputStream fis = new FileInputStream(args[0]);
++        FileOutputStream fos = new FileOutputStream(args[1], false);
++        PrintWriter outWriter = new PrintWriter(new OutputStreamWriter(fos, StandardCharsets.UTF_8));
+         Scanner scanner = new Scanner(fis);
+         while (scanner.hasNextLine()) {
+             String line = scanner.nextLine();
+             if (line.startsWith("#")) {
+                 // Comments -- print them first without sorting. These appear only at the top
+                 // of the file.
+-                System.out.println(line);
++                outWriter.println(line);
+             } else if (line.startsWith("@")) {
+                 // @lambda-form-invoker, @lambda-proxy, etc.
+                 lambdas.add(line);
+@@ -73,10 +79,13 @@ public class SortClasslist {
+         Collections.sort(lambdas);
+ 
+         for (String s : classes) {
+-            System.out.println(s);
++            outWriter.println(s);
+         }
+         for (String s : lambdas) {
+-            System.out.println(s);
++            outWriter.println(s);
+         }
++
++        outWriter.flush();
++        outWriter.close();
+     }
+ }
diff --git a/srcpkgs/jetbrains-jdk17/template b/srcpkgs/jetbrains-jdk17/template
new file mode 100644
index 000000000000..88e4079bf714
--- /dev/null
+++ b/srcpkgs/jetbrains-jdk17/template
@@ -0,0 +1,109 @@
+# Template file for 'jetbrains-jdk17'
+pkgname=jetbrains-jdk17
+version=17.0.3b526.1
+revision=1
+archs="x86_64"
+_jdk_ver=${version%b*}
+_jdk_build=${version#*b}
+_tag_name="jb${_jdk_ver}-b${_jdk_build}"
+_jdk_home="usr/lib/jvm/jbrsdk"
+wrksrc="JetBrainsRuntime-${_tag_name}"
+build_style=gnu-configure
+configure_args="
+ --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
+ --with-version-pre=
+ --with-version-opt=${_jdk_build}-void-r${revision}
+ --with-stdc++lib=dynamic
+ --with-libjpeg=system
+ --with-giflib=system
+ --with-libpng=system
+ --with-lcms=system
+ --with-zlib=system
+ --with-jtreg=no
+ --with-harfbuzz=system
+ --with-jvm-features=zgc
+ --enable-unlimited-crypto
+ --disable-warnings-as-errors
+ --with-native-debug-symbols=internal
+"
+make_build_args="images"
+make_install_args="INSTALL_PREFIX=\"${DESTDIR}/usr/lib\""
+make_check_target="test-hotspot-gtest"
+makedepends="pkg-config zip bzip2 unzip tar wget make autoconf automake libtool alsa-lib-devel cups-devel libX11-devel libjpeg-turbo-devel harfbuzz-devel giflib-devel freetype-devel file which libXtst-devel libXt-devel libXrender-devel alsa-lib-devel fontconfig-devel libXrandr-devel libXi-devel zlib-devel lcms2-devel git make-ca"
+short_desc="JetBrains Java 17 JDK"
+maintainer="Anton Afanasyev <anton@doubleasoftware.com>"
+license="GPL-2.0-only, Classpath-exception-2.0"
+homepage="https://github.com/JetBrains/JetBrainsRuntime"
+distfiles="https://github.com/JetBrains/JetBrainsRuntime/archive/refs/tags/${_tag_name}.tar.gz"
+checksum=aab60e37c10fb1c122397855fa448e285b241fcff1731342b659ac0e6ecff3ae
+conflicts="jetbrains-jdk-bin"
+
+# For whatever reason, XBPS finds libjava, libjli, etc as dependencies of this package, and decides to make it depend on openjdk8, which provides those.
+# But that is not true, nor desired -- this is a full fledged JDK distribution, just not installed as such here in XBPS land.
+noverifyrdeps=yes
+
+# Build is still parallel, but don't use -jN.
+disable_parallel_build=yes
+
+# This does not currently accomplish anything, since only building on x86_64. Leaving this for future, taken from `openjdk17`.
+if [ ! "$CROSS_BUILD" ]; then
+	makedepends+=" openjdk16-bootstrap"
+	configure_args+=" --with-boot-jdk=/usr/lib/jvm/openjdk16"
+else
+	makedepends+=" openjdk17"
+	configure_args+=" --with-boot-jdk=/usr/lib/jvm/openjdk17"
+fi
+configure_args+=" --with-boot-jdk-jvmargs=-Xlog:disable"
+
+do_configure() {
+	CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
+	CXXFLAGS=${CXXFLAGS/-D_FORTIFY_SOURCE=2/}
+
+	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
+
+	sh ./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
+}
+
+# TODO: openjdk17 had the following hook in it. Debug it for understanding.
+#post_install() {
+#	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
+#}
+
+do_install() {
+	TARGET_PATH="${_jdk_home}"
+
+	vmkdir ${TARGET_PATH}
+
+	vlicense ASSEMBLY_EXCEPTION
+	vlicense LICENSE
+
+	cd build/linux-*-server-release/images/jdk/
+	vcopy bin ${TARGET_PATH}
+	vcopy conf ${TARGET_PATH}
+	vcopy include ${TARGET_PATH}
+	vcopy legal ${TARGET_PATH}
+	vcopy lib ${TARGET_PATH}
+	vcopy release ${TARGET_PATH}
+
+	vmkdir etc/profile.d
+	cat > ${DESTDIR}/etc/profile.d/10_jbrsdk.sh <<EOF
+export IDEA_JDK=\${IDEA_JDK=/${_jdk_home}}
+EOF
+}
diff --git a/srcpkgs/jetbrains-jdk17/update b/srcpkgs/jetbrains-jdk17/update
new file mode 100644
index 000000000000..b8a971d471d5
--- /dev/null
+++ b/srcpkgs/jetbrains-jdk17/update
@@ -0,0 +1,5 @@
+_jdk_ver=${version%b*}
+_jdk_build=${version#*b}
+version=${_jdk_ver}-b${_jdk_build}
+pattern="/releases/tag/jb\K17.\d+.\d+-b\d+(\.\d+)?(?=\")"
+site="https://github.com/JetBrains/JetBrainsRuntime/tags"

  parent reply	other threads:[~2022-07-30 16:03 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-30 15:51 [PR PATCH] " 2asoft
2022-07-30 16:01 ` 2asoft
2022-07-30 16:03 ` 2asoft [this message]
2022-07-30 16:08 ` 2asoft
2022-07-31  2:19 ` 2asoft
2022-07-31  2:29 ` classabbyamp
2022-07-31  2:53 ` [PR PATCH] [Updated] " 2asoft
2022-07-31  5:25 ` classabbyamp
2022-07-31  5:35 ` 2asoft
2022-07-31  5:38 ` classabbyamp
2022-08-23  3:43 ` [PR PATCH] [Updated] " 2asoft
2022-09-09 17:11 ` 2asoft
2022-09-09 17:12 ` 2asoft
2022-09-16 20:15 ` [PR PATCH] [Updated] New package: jetbrains-jdk17-17.0.4b469.54 2asoft
2022-09-16 20:20 ` 2asoft
2022-09-19  5:09 ` [PR REVIEW] " classabbyamp
2022-09-19  5:09 ` classabbyamp
2022-09-19  5:09 ` classabbyamp
2022-09-19  5:09 ` classabbyamp
2022-09-19  5:09 ` classabbyamp
2022-09-19  5:09 ` classabbyamp
2022-09-19  5:09 ` classabbyamp
2022-10-08  8:42 ` [PR PATCH] [Updated] " 2asoft
2022-10-08  9:05 ` 2asoft
2022-10-31  6:58 ` 2asoft
2022-10-31  8:09 ` 2asoft
2022-11-10 13:33 ` 2asoft
2022-12-07 18:33 ` 2asoft
2023-01-14  5:05 ` 2asoft
2023-02-10  8:00 ` 2asoft
2023-02-10  8:07 ` 2asoft
2023-03-17  1:43 ` dontlaugh
2023-03-21 18:40 ` 2asoft
2023-03-26 22:14 ` [PR PATCH] [Updated] " 2asoft
2023-03-28 20:33 ` Chocimier
2023-03-28 20:33 ` Chocimier
2023-06-27  2:08 ` github-actions
2023-07-12  2:06 ` [PR PATCH] [Closed]: " github-actions

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=20220730160325.uOW1R3_KnSvga51XCvovATwuX6MOjmKCvK9l4SqCGlY@z \
    --to=2asoft@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).