summary refs log tree commit diff
path: root/gnu/packages/libffi.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-01-27 13:24:19 +0100
committerLudovic Courtès <ludo@gnu.org>2014-01-27 15:30:35 +0100
commitd43547f12d4eae19845f3bf13a53a050af965063 (patch)
treecb1c4f015a443c0bf9fac8375fd0f99b1b601dfa /gnu/packages/libffi.scm
parentecb1b610d2e5ce02cab1edc3093c10ccacbc075e (diff)
downloadguix-d43547f12d4eae19845f3bf13a53a050af965063.tar.gz
gnu: libffi: Leave a copy of headers where libffi.pc expects them.
Suggested by Sree Harsha Totakura <sreeharsha@totakura.in>.

* gnu/packages/libffi.scm (libffi): Symlink header files instead of
  moving them.
Diffstat (limited to 'gnu/packages/libffi.scm')
-rw-r--r--gnu/packages/libffi.scm20
1 files changed, 6 insertions, 14 deletions
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index d1a834d9c5..c5e265087e 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -25,18 +25,12 @@
 
 (define-public libffi
   (let ((post-install-phase
-         ;; Install headers in the right place.
+         ;; Keep headers where libffi.pc expects them, but also make them
+         ;; available in $includedir where some users expect them.
          '(lambda* (#:key outputs #:allow-other-keys)
             (define out (assoc-ref outputs "out"))
-            (mkdir (string-append out "/include"))
-            (with-directory-excursion
-                (string-append out "/lib/libffi-3.0.13/include")
-              (for-each (lambda (h)
-                          (format #t "moving `~a' to includedir~%" h)
-                          (rename-file h (string-append out "/include/" h)))
-                        (scandir "."
-                                 (lambda (x)
-                                   (not (member x '("." ".."))))))))))
+            (symlink (string-append out "/lib/libffi-3.0.13/include")
+                     (string-append out "/include")))))
    (package
     (name "libffi")
     (version "3.0.13")
@@ -50,9 +44,7 @@
                "077ibkf84bvcd6rw1m6jb107br63i2pp301rkmsbgg6300adxp8x"))
              (patches (list (search-patch "libffi-mips-n32-fix.patch")))))
     (build-system gnu-build-system)
-    (arguments `(#:modules ((guix build utils) (guix build gnu-build-system)
-                            (ice-9 ftw) (srfi srfi-26))
-                 #:phases (alist-cons-after 'install 'post-install
+    (arguments `(#:phases (alist-cons-after 'install 'post-install
                                             ,post-install-phase
                                             %standard-phases)))
     (outputs '("out" "debug"))