Revert "PRELIMINARY: gnu: Add network-manager."
[jackhill/guix/guix.git] / gnu / packages / libffi.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
d43547f1 2;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
c44899a2 3;;;
233e7676 4;;; This file is part of GNU Guix.
c44899a2 5;;;
233e7676 6;;; GNU Guix is free software; you can redistribute it and/or modify it
c44899a2
LC
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
233e7676 11;;; GNU Guix is distributed in the hope that it will be useful, but
c44899a2
LC
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
233e7676 17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
c44899a2 18
1ffa7090 19(define-module (gnu packages libffi)
1602fcea 20 #:use-module (gnu packages)
4a44e743 21 #:use-module (guix licenses)
c44899a2 22 #:use-module (guix packages)
87f5d366 23 #:use-module (guix download)
c44899a2
LC
24 #:use-module (guix build-system gnu))
25
26(define-public libffi
27 (let ((post-install-phase
d43547f1
LC
28 ;; Keep headers where libffi.pc expects them, but also make them
29 ;; available in $includedir where some users expect them.
c44899a2
LC
30 '(lambda* (#:key outputs #:allow-other-keys)
31 (define out (assoc-ref outputs "out"))
785c33e3 32 (symlink (string-append out "/lib/libffi-3.1/include")
d43547f1 33 (string-append out "/include")))))
c44899a2
LC
34 (package
35 (name "libffi")
785c33e3 36 (version "3.1")
c44899a2 37 (source (origin
87f5d366 38 (method url-fetch)
c44899a2
LC
39 (uri
40 (string-append "ftp://sourceware.org/pub/libffi/"
41 name "-" version ".tar.gz"))
42 (sha256
43 (base32
785c33e3 44 "1sznmrhcswwbyqla9y2ximlkzbxks59wjfs3lh7qf8ayranyxzlp"))))
c44899a2 45 (build-system gnu-build-system)
d43547f1 46 (arguments `(#:phases (alist-cons-after 'install 'post-install
c44899a2 47 ,post-install-phase
56c092ce 48 %standard-phases)))
9bf62d9b 49 (outputs '("out" "debug"))
089b0634 50 (synopsis "Foreign function call interface library")
c44899a2
LC
51 (description
52 "The libffi library provides a portable, high level programming interface
53to various calling conventions. This allows a programmer to call any
54function specified by a call interface description at run-time.
55
56FFI stands for Foreign Function Interface. A foreign function interface is
57the popular name for the interface that allows code written in one language
58to call code written in another language. The libffi library really only
59provides the lowest, machine dependent layer of a fully featured foreign
60function interface. A layer must exist above libffi that handles type
61conversions for values passed between the two languages.")
62 (home-page "http://sources.redhat.com/libffi/")
63
64 ;; See <http://github.com/atgreen/libffi/blob/master/LICENSE>.
4a44e743 65 (license expat))))
c44899a2 66