guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: gnu: Add openjdk@21.


From: guix-commits
Subject: 02/03: gnu: Add openjdk@21.
Date: Thu, 21 Sep 2023 16:40:55 -0400 (EDT)

dannym pushed a commit to branch master
in repository guix.

commit ec8c5d027f87bb39ce3fd03c40a13d7b316d9dac
Author: Danny Milosavljevic <dannym@scratchpost.org>
AuthorDate: Thu Sep 21 14:14:45 2023 +0200

    gnu: Add openjdk@21.
    
    * gnu/packages/java.scm (openjdk21): New variable.
    * gnu/packages/patches/openjdk-21-fix-rpath.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                    |  1 +
 gnu/packages/java.scm                           | 17 +++++++++++++++++
 gnu/packages/patches/openjdk-21-fix-rpath.patch | 16 ++++++++++++++++
 3 files changed, 34 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index e05f687467..b059689954 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1696,6 +1696,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/openjdk-10-pointer-comparison.patch      \
   %D%/packages/patches/openjdk-10-setsignalhandler.patch        \
   %D%/packages/patches/openjdk-15-xcursor-no-dynamic.patch     \
+  %D%/packages/patches/openjdk-21-fix-rpath.patch              \
   %D%/packages/patches/openmpi-mtl-priorities.patch            \
   %D%/packages/patches/openmw-assume-nonconst-SIGSTKSZ.patch    \
   %D%/packages/patches/openssh-trust-guix-store-directory.patch        \
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index a87c688749..0307b09acf 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1550,6 +1550,23 @@ blacklisted.certs.pem"
   (make-openjdk openjdk19 "20"
                 "0pk5lpwijfv9qv7vwpsq2xfklbnqdfs6xbdhc5aamrpar4xi4ykx"))
 
+(define-public openjdk21
+  (make-openjdk openjdk20 "21"
+                "06wjfwrkqykjdkis2s1nh91cy8vwincnmc699cxvyk3fc12jf3vw"
+   (source (origin
+             (inherit (package-source base))
+             (patches (search-patches "openjdk-21-fix-rpath.patch"
+                                      "openjdk-15-xcursor-no-dynamic.patch"))))
+   (arguments
+    (substitute-keyword-arguments (package-arguments base)
+      ((#:phases phases)
+       #~(modify-phases #$phases
+           (replace 'fix-java-shebangs
+             (lambda _
+               ;; 'blacklisted' was renamed back to 'blocked'.
+               (substitute* 
"src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
+                 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))))
+
 ;;; Convenience alias to point to the latest version of OpenJDK.
 (define-public openjdk openjdk19)
 
diff --git a/gnu/packages/patches/openjdk-21-fix-rpath.patch 
b/gnu/packages/patches/openjdk-21-fix-rpath.patch
new file mode 100644
index 0000000000..62e2a50a52
--- /dev/null
+++ b/gnu/packages/patches/openjdk-21-fix-rpath.patch
@@ -0,0 +1,16 @@
+Author: Danny Milosavljevic <dannym@scratchpost.org>
+Date: 2023-09-20
+
+diff -ru openjdk-21/make/modules/jdk.internal.le/Lib.gmk.orig 
openjdk-21.drv-4/source/make/modules/jdk.internal.le/Lib.gmk
+--- openjdk-21/make/modules/jdk.internal.le/Lib.gmk.orig       1970-01-01 
01:00:01.000000000 +0100
++++ openjdk-21/make/modules/jdk.internal.le/Lib.gmk    2023-09-20 
21:42:04.626821839 +0200
+@@ -34,7 +34,8 @@
+       TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
+       OPTIMIZATION := LOW, \
+       CFLAGS := $(CXXFLAGS_JDKLIB), \
+-      LDFLAGS := $(LDFLAGS_JDKLIB), \
++      LDFLAGS := $(LDFLAGS_JDKLIB) \
++        $(call SET_SHARED_LIBRARY_ORIGIN), \
+       LIBS_unix := $(JDKLIB_LIBS) $(LIBCXX), \
+       LIBS_windows := $(JDKLIB_LIBS) user32.lib, \
+   ))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]