From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: [PATCH] gnu: Fix load-extension path in packaging of guile-ncurses. Date: Mon, 19 Dec 2016 18:50:20 +0100 Message-ID: <1482169820-2043-2-git-send-email-jmd@gnu.org> References: <1482169820-2043-1-git-send-email-jmd@gnu.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJ25F-0007oH-D9 for guix-devel@gnu.org; Mon, 19 Dec 2016 12:50:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJ25D-0006sn-Uj for guix-devel@gnu.org; Mon, 19 Dec 2016 12:50:45 -0500 In-Reply-To: <1482169820-2043-1-git-send-email-jmd@gnu.org> 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 Cc: John Darrington * gnu/packages/guile.scm (guile-ncurses) [arguments]: Install shared object before attempting to build the package. Patch load-extension path before building instead of after. --- gnu/packages/guile.scm | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 1653685..741728d 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -431,16 +431,20 @@ many readers as needed).") "--with-gnu-filesystem-hierarchy") #:phases (modify-phases %standard-phases - (add-after 'install 'post-install + (add-before 'build 'fix-libguile-ncurses-file-name (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (dir (string-append out "/share/guile/site/")) - (files (find-files dir ".scm"))) - (substitute* files - (("\"libguile-ncurses\"") - (format #f "\"~a/lib/guile/2.0/libguile-ncurses\"" - out))) - #t)))))) + (and (zero? (system* "make" "install" + "-C" "src/ncurses" + "-j" (number->string + (parallel-job-count)))) + (let* ((out (assoc-ref outputs "out")) + (dir "src/ncurses") + (files (find-files dir ".scm"))) + (substitute* files + (("\"libguile-ncurses\"") + (format #f "\"~a/lib/guile/2.0/libguile-ncurses\"" + out))) + #t))))))) (home-page "https://www.gnu.org/software/guile-ncurses/") (synopsis "Guile bindings to ncurses") (description -- 2.1.4