all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice <me@tobias.gr>
To: guix-devel@gnu.org
Subject: [PATCH 1/2] gnu: ncurses: Install pkg-config ‘.pc’ files.
Date: Mon,  7 Nov 2016 19:05:37 +0100	[thread overview]
Message-ID: <20161107180538.21231-2-me@tobias.gr> (raw)
In-Reply-To: <20161107180538.21231-1-me@tobias.gr>

* 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

  reply	other threads:[~2016-11-07 18:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07 18:05 [PATCH 0/2] Install ncurses .pc files; update progress Tobias Geerinckx-Rice
2016-11-07 18:05 ` Tobias Geerinckx-Rice [this message]
2016-11-08 20:55   ` [PATCH 1/2] gnu: ncurses: Install pkg-config ‘.pc’ files Mark H Weaver
2016-11-07 18:05 ` [PATCH 2/2] gnu: progress: Update to 0.13.1 Tobias Geerinckx-Rice

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161107180538.21231-2-me@tobias.gr \
    --to=me@tobias.gr \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.