From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Geerinckx-Rice Subject: [PATCH 1/2] =?UTF-8?q?gnu:=20ncurses:=20Install=20pkg-config=20?= =?UTF-8?q?=E2=80=98.pc=E2=80=99=20files.?= Date: Mon, 7 Nov 2016 19:05:37 +0100 Message-ID: <20161107180538.21231-2-me@tobias.gr> References: <20161107180538.21231-1-me@tobias.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3oJ4-0000ID-BG for guix-devel@gnu.org; Mon, 07 Nov 2016 13:06:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3oIz-0004Su-Dp for guix-devel@gnu.org; Mon, 07 Nov 2016 13:06:06 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:46960) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c3oIz-0004SX-1D for guix-devel@gnu.org; Mon, 07 Nov 2016 13:06:01 -0500 Received: from mfilter38-d.gandi.net (mfilter38-d.gandi.net [217.70.178.169]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id 1D8D2FB8CD for ; Mon, 7 Nov 2016 19:05:59 +0100 (CET) Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter38-d.gandi.net (mfilter38-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id n0YjAHSnbXZT for ; Mon, 7 Nov 2016 19:05:57 +0100 (CET) Received: from v5.tobias.gr (162.196-247-81.adsl-dyn.isp.belgacom.be [81.247.196.162]) (Authenticated sender: me@tobias.gr) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 62F7FFB8C7 for ; Mon, 7 Nov 2016 19:05:57 +0100 (CET) In-Reply-To: <20161107180538.21231-1-me@tobias.gr> 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 * gnu/packages/ncurses.scm (ncurses)[arguments]: Add ‘--enable-pc-files’ and ‘--with-pkg-config-libdir=’ to #:configure-flags. Create ‘non-wide’ compatibility symbolic links for ‘.pc’ files in the post-install-phase. [native-inputs]: Add pkg-config. --- gnu/packages/ncurses.scm | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm index 9799167..46e4adc 100644 --- a/gnu/packages/ncurses.scm +++ b/gnu/packages/ncurses.scm @@ -26,7 +26,8 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (gnu packages) - #:use-module (gnu packages perl)) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config)) (define-public ncurses (let ((patch-makefile-phase @@ -68,7 +69,7 @@ (let ((out (assoc-ref outputs "out"))) ;; When building a wide-character (Unicode) build, create backward ;; compatibility links from the the "normal" libraries to the - ;; wide-character libraries (e.g. libncurses.so to libncursesw.so). + ;; wide-character ones (e.g. libncurses.so to libncursesw.so). (with-directory-excursion (string-append out "/lib") (for-each (lambda (lib) (define libw.a @@ -81,6 +82,10 @@ (string-append "lib" lib ".so.6")) (define lib.so (string-append "lib" lib ".so")) + (define packagew.pc + (string-append lib "w.pc")) + (define package.pc + (string-append lib ".pc")) (when (file-exists? libw.a) (format #t "creating symlinks for `lib~a'~%" lib) @@ -89,7 +94,11 @@ (false-if-exception (delete-file lib.so)) (call-with-output-file lib.so (lambda (p) - (format p "INPUT (-l~aw)~%" lib))))) + (format p "INPUT (-l~aw)~%" lib)))) + (with-directory-excursion "pkgconfig" + (format #t "creating symlink for `~a'~%" package.pc) + (when (file-exists? packagew.pc) + (symlink packagew.pc package.pc)))) '("curses" "ncurses" "form" "panel" "menu"))))))) (package (name "ncurses") @@ -108,6 +117,11 @@ `(#:configure-flags `("--with-shared" "--without-debug" "--enable-widec" + "--enable-pc-files" + ,(string-append "--with-pkg-config-libdir=" + (assoc-ref %outputs "out") + "/lib/pkgconfig") + ;; By default headers land in an `ncursesw' subdir, which is not ;; what users expect. ,(string-append "--includedir=" (assoc-ref %outputs "out") @@ -128,6 +142,8 @@ (add-after 'unpack 'remove-unneeded-shebang ,remove-shebang-phase)))) (self-native-input? #t) ; for `tic' + (native-inputs + `(("pkg-config" ,pkg-config))) (native-search-paths (list (search-path-specification (variable "TERMINFO_DIRS") -- 2.9.3