diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-09-30 12:01:32 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-09-30 12:05:27 +0200 |
commit | 79355ae3e84359716f5135cc7083e72246bc8bf9 (patch) | |
tree | 6b61851e2153581578bb78ef0f177b8841ee5db7 /gnu/packages/java.scm | |
parent | 39d6b9c99f297e14fc4f47f002be3d40556726be (diff) | |
parent | 86d8f6d3efb8300a3354735cbf06be6c01e23243 (diff) | |
download | guix-79355ae3e84359716f5135cc7083e72246bc8bf9.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r-- | gnu/packages/java.scm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 7387235c5b..36c10d0fd0 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -994,6 +994,33 @@ build process and its dependencies, whereas Make uses Makefile format.") (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) |