diff options
author | Carlo Zancanaro <carlo@zancanaro.id.au> | 2021-04-17 16:33:06 +1000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-05-01 17:12:15 +0200 |
commit | 92b02d0c18a6783c751a5b8b28d6bfbb77184ac7 (patch) | |
tree | c4c6e85758df83a9b211a7172ed08e3d3d36a6a7 /gnu | |
parent | 185709221d4cd2f3a06fa3c4777e9e71d15ed09d (diff) | |
download | guix-92b02d0c18a6783c751a5b8b28d6bfbb77184ac7.tar.gz |
gnu: openjdk: Clean up runtime dependencies between Java versions.
* gnu/packages/java.scm (icedtea-8, openjdk9, openjdk11): Do not consider icedtea/openjdk input paths when rewriting JNI libraries. Signed-off-by: Andreas Enge <andreas@enge.fr>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/java.scm | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 207f136513..3c4013ab6f 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org> -;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au> +;;; Copyright © 2017, 2019, 2021 Carlo Zancanaro <carlo@zancanaro.id.au> ;;; Copyright © 2017-2020 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be> ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com> @@ -1792,8 +1792,13 @@ new Date();")) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. (lambda _ - (let* ((library-path (search-path-as-string->list - (getenv "LIBRARY_PATH"))) + (use-modules (srfi srfi-1)) + (define (icedtea-or-openjdk? path) + (or (string-contains path "openjdk") + (string-contains path "icedtea"))) + (let* ((library-path (remove icedtea-or-openjdk? + (search-path-as-string->list + (getenv "LIBRARY_PATH")))) (find-library (lambda (name) (search-path library-path @@ -1931,12 +1936,18 @@ new Date();")) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. (lambda _ - (let* ((library-path (search-path-as-string->list - (getenv "LIBRARY_PATH"))) + (use-modules (srfi srfi-1)) + (define (icedtea-or-openjdk? path) + (or (string-contains path "openjdk") + (string-contains path "icedtea"))) + (let* ((library-path (remove icedtea-or-openjdk? + (search-path-as-string->list + (getenv "LIBRARY_PATH")))) (find-library (lambda (name) - (search-path - library-path - (string-append "lib" name ".so"))))) + (or (search-path + library-path + (string-append "lib" name ".so")) + (string-append "lib" name ".so"))))) (for-each (lambda (file) (catch 'decoding-error @@ -2139,8 +2150,13 @@ new Date();")) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. (lambda _ - (let* ((library-path (search-path-as-string->list - (getenv "LIBRARY_PATH"))) + (use-modules (srfi srfi-1)) + (define (icedtea-or-openjdk? path) + (or (string-contains path "openjdk") + (string-contains path "icedtea"))) + (let* ((library-path (remove icedtea-or-openjdk? + (search-path-as-string->list + (getenv "LIBRARY_PATH")))) (find-library (lambda (name) (search-path library-path |