mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 06:18:07 -05:00
gnu: icedtea-8: Hardcode dynamically loaded libraries.
Fixes <https://bugs.gnu.org/24327>. * gnu/packages/java.scm (icedtea-8)[arguments]: Add 'patch-jni-libs' phase.
This commit is contained in:
parent
dd4476214c
commit
cab1760de2
1 changed files with 27 additions and 0 deletions
|
@ -994,6 +994,33 @@ (define-public icedtea-8
|
|||
(delete 'patch-paths)
|
||||
(delete 'set-additional-paths)
|
||||
(delete 'patch-patches)
|
||||
(add-after 'unpack 'patch-jni-libs
|
||||
;; Hardcode dynamically loaded libraries.
|
||||
(lambda _
|
||||
(let* ((library-path (search-path-as-string->list
|
||||
(getenv "LIBRARY_PATH")))
|
||||
(find-library (lambda (name)
|
||||
(search-path
|
||||
library-path
|
||||
(string-append "lib" name ".so")))))
|
||||
(for-each
|
||||
(lambda (file)
|
||||
(catch 'encoding-error
|
||||
(lambda ()
|
||||
(substitute* file
|
||||
(("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
|
||||
_ name version)
|
||||
(format #f "\"~a\"" (find-library name)))
|
||||
(("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
|
||||
(format #f "\"~a\"" (find-library name)))))
|
||||
(lambda _
|
||||
;; Those are safe to skip.
|
||||
(format (current-error-port)
|
||||
"warning: failed to substitute: ~a~%"
|
||||
file))))
|
||||
(find-files "openjdk.src/jdk/src/solaris/native"
|
||||
"\\.c|\\.h"))
|
||||
#t)))
|
||||
;; FIXME: This phase is needed but fails with this version of
|
||||
;; IcedTea.
|
||||
(delete 'install-keystore)
|
||||
|
|
Loading…
Reference in a new issue