;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages libffi)
+ #:use-module (gnu packages)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
- #:use-module (guix utils)
#:use-module (guix build-system gnu))
(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.9/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.1/include")
+ (string-append out "/include")))))
(package
(name "libffi")
- (version "3.0.9")
+ (version "3.1")
(source (origin
(method url-fetch)
(uri
name "-" version ".tar.gz"))
(sha256
(base32
- "0ln4jbpb6clcsdpb9niqk0frgx4k0xki96wiv067ig0q4cajb7aq"))))
+ "1sznmrhcswwbyqla9y2ximlkzbxks59wjfs3lh7qf8ayranyxzlp"))))
(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)))
- (synopsis "libffi, a foreign function call interface library")
+ (outputs '("out" "debug"))
+ (synopsis "Foreign function call interface library")
(description
"The libffi library provides a portable, high level programming interface
to various calling conventions. This allows a programmer to call any