From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: [PATCH] gnu: icedtea: Patch dynamically loaded libraries with absolute paths. Date: Thu, 08 Sep 2016 23:34:22 +0800 Message-ID: <87zini4d8h.fsf@member.fsf.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi1LY-0007Cv-PW for guix-devel@gnu.org; Thu, 08 Sep 2016 11:34:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bi1LT-0001hA-OC for guix-devel@gnu.org; Thu, 08 Sep 2016 11:34:36 -0400 Received: from smtp1.openmailbox.org ([62.4.1.35]:51701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi1LT-0001gu-Hg for guix-devel@gnu.org; Thu, 08 Sep 2016 11:34:31 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --=-=-= Content-Type: text/plain I think this will fix the fontconfig issue (eg: #24327). Not tested (build) any jdk version yet... --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-icedtea-Patch-dynamically-loaded-libraries-with-.patch >From 3dbe71f7cd7b99851bd616f1ab6e1269f1fc6e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Thu, 8 Sep 2016 23:25:23 +0800 Subject: [PATCH] gnu: icedtea: Patch dynamically loaded libraries with absolute paths. * gnu/packages/java.scm (icedtea-6)[arguments]: Add 'patch-jni-libs' phase. --- gnu/packages/java.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 7387235..932ecc5 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -525,6 +525,32 @@ build process and its dependencies, whereas Make uses Makefile format.") (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))))) + (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))) (add-before 'configure 'set-additional-paths (lambda* (#:key inputs #:allow-other-keys) (let* ((gcjdir (assoc-ref %build-inputs "gcj")) -- 2.8.4 --=-=-=--