From 1ac3992476cf33bcb585adba8e6c6a7aee1e3e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sat, 31 Aug 2024 16:25:20 +0700 Subject: [PATCH] openjdk21: update to 21.0.5+5. --- .../patches/system-public-suffix.patch | 16 ++++++++++++++ srcpkgs/openjdk21/template | 21 ++++++++++--------- 2 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 srcpkgs/openjdk21/patches/system-public-suffix.patch diff --git a/srcpkgs/openjdk21/patches/system-public-suffix.patch b/srcpkgs/openjdk21/patches/system-public-suffix.patch new file mode 100644 index 00000000000..e4e9a4b08a5 --- /dev/null +++ b/srcpkgs/openjdk21/patches/system-public-suffix.patch @@ -0,0 +1,16 @@ +--- a/src/java.base/share/classes/sun/security/util/DomainName.java ++++ b/src/java.base/share/classes/sun/security/util/DomainName.java +@@ -209,8 +209,11 @@ class DomainName { + new PrivilegedAction<>() { + @Override + public InputStream run() { +- File f = new File(System.getProperty("java.home"), +- "lib/security/public_suffix_list.dat"); ++ File f = new File("/usr/share/publicsuffix/public_suffix_list.dat"); ++ if (!f.exists()) { ++ f = new File(System.getProperty("java.home"), ++ "lib/security/public_suffix_list.dat"); ++ } + try { + return new FileInputStream(f); + } catch (FileNotFoundException e) { diff --git a/srcpkgs/openjdk21/template b/srcpkgs/openjdk21/template index 013e0243362..f02b024f0f3 100644 --- a/srcpkgs/openjdk21/template +++ b/srcpkgs/openjdk21/template @@ -1,6 +1,6 @@ # Template file for 'openjdk21' pkgname=openjdk21 -version=21.0.5+2 +version=21.0.5+5 revision=1 _gtest_ver=1.13.0 _java_ver="${version%%.*}" @@ -8,8 +8,6 @@ _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 @@ -19,7 +17,7 @@ configure_args="--disable-warnings-as-errors --with-libpng=system --with-lcms=system --with-jtreg=no - --with-gtest=../googletest-${_gtest_ver} + --with-gtest=./gtest --with-debug-level=release --with-native-debug-symbols=internal --with-jobs=${XBPS_ORIG_MAKEJOBS} @@ -45,11 +43,12 @@ 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="f99c751ccf9426755fa33948ba8de05fd6e3e589880759f3b0df4f71eec50472 +checksum="5dfed3786d86629bf6aa32046850f29d423398fbec88d5a87ce5c2fb190d7ef5 ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363" alternatives="jdk:/usr/lib/jvm/default-jdk:/${_jdk_home}" provides="java-environment-${version}_1" -patch_args="-Np1 --directory=$build_wrksrc" + +skip_extraction="v${_gtest_ver}.tar.gz" # Build and check are still parallel, but don't use -jN. disable_parallel_build=yes @@ -85,9 +84,11 @@ else fi post_extract() { - chmod +x $build_wrksrc/configure + mkdir -p gtest + vsrcextract -C gtest v${_gtest_ver}.tar.gz + chmod +x configure if [ "$XBPS_TARGET_LIBC" = "musl" ]; then - rm -r $build_wrksrc/src/jdk.hotspot.agent + rm -r src/jdk.hotspot.agent fi } @@ -134,7 +135,7 @@ 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" + depends="openjdk-common public-suffix" alternatives="java:/usr/lib/jvm/default-jre:/${_jdk_home}" pkg_install() { for bin in java jfr keytool rmiregistry; do @@ -163,7 +164,7 @@ openjdk21-doc_package() { 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 + cp -a $wrksrc/build/linux-*/images/docs/* ${PKGDESTDIR}/$_docdir fi } }