mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
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>
This commit is contained in:
parent
185709221d
commit
92b02d0c18
1 changed files with 26 additions and 10 deletions
|
@ -2,7 +2,7 @@
|
||||||
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
|
||||||
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
|
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
|
||||||
;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
|
;;; 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-2020 Julien Lepiller <julien@lepiller.eu>
|
||||||
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
|
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
|
||||||
;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
|
;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
|
||||||
|
@ -1792,8 +1792,13 @@ (define-public icedtea-8
|
||||||
(add-after 'unpack 'patch-jni-libs
|
(add-after 'unpack 'patch-jni-libs
|
||||||
;; Hardcode dynamically loaded libraries.
|
;; Hardcode dynamically loaded libraries.
|
||||||
(lambda _
|
(lambda _
|
||||||
(let* ((library-path (search-path-as-string->list
|
(use-modules (srfi srfi-1))
|
||||||
(getenv "LIBRARY_PATH")))
|
(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)
|
(find-library (lambda (name)
|
||||||
(search-path
|
(search-path
|
||||||
library-path
|
library-path
|
||||||
|
@ -1931,12 +1936,18 @@ (define-public openjdk9
|
||||||
(add-after 'unpack 'patch-jni-libs
|
(add-after 'unpack 'patch-jni-libs
|
||||||
;; Hardcode dynamically loaded libraries.
|
;; Hardcode dynamically loaded libraries.
|
||||||
(lambda _
|
(lambda _
|
||||||
(let* ((library-path (search-path-as-string->list
|
(use-modules (srfi srfi-1))
|
||||||
(getenv "LIBRARY_PATH")))
|
(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)
|
(find-library (lambda (name)
|
||||||
(search-path
|
(or (search-path
|
||||||
library-path
|
library-path
|
||||||
(string-append "lib" name ".so")))))
|
(string-append "lib" name ".so"))
|
||||||
|
(string-append "lib" name ".so")))))
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (file)
|
(lambda (file)
|
||||||
(catch 'decoding-error
|
(catch 'decoding-error
|
||||||
|
@ -2139,8 +2150,13 @@ (define-public openjdk11
|
||||||
(add-after 'unpack 'patch-jni-libs
|
(add-after 'unpack 'patch-jni-libs
|
||||||
;; Hardcode dynamically loaded libraries.
|
;; Hardcode dynamically loaded libraries.
|
||||||
(lambda _
|
(lambda _
|
||||||
(let* ((library-path (search-path-as-string->list
|
(use-modules (srfi srfi-1))
|
||||||
(getenv "LIBRARY_PATH")))
|
(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)
|
(find-library (lambda (name)
|
||||||
(search-path
|
(search-path
|
||||||
library-path
|
library-path
|
||||||
|
|
Loading…
Reference in a new issue