From patchwork Thu Sep 8 15:34:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?B?5a6L5paH5q2m?= X-Patchwork-Id: 15401 Received: (qmail 50817 invoked by uid 89); 8 Sep 2016 17:16:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=ron, LIBRARY_PATH, H*F:D*fsf.org, library_path X-Spam-Status: No, score=-3.1 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: lists.gnu.org Received: from lists.gnu.org (HELO lists.gnu.org) (208.118.235.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Sep 2016 17:16:29 +0000 Received: from localhost ([::1]:49627 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi2w7-0007YV-90 for patchwork@sourceware.org; Thu, 08 Sep 2016 13:16:27 -0400 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 Received: by mail2.openmailbox.org (Postfix, from userid 1001) id D6AA9103640; Thu, 8 Sep 2016 17:34:29 +0200 (CEST) From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) To: guix-devel@gnu.org 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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 62.4.1.35 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list 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+patchwork=sourceware.org@gnu.org Sender: "Guix-devel" I think this will fix the fontconfig issue (eg: #24327). Not tested (build) any jdk version yet... 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