1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
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.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
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.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages libffi)
20 #:use-module (gnu packages)
21 #:use-module (guix licenses)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu))
27 (let ((post-install-phase
28 ;; Keep headers where libffi.pc expects them, but also make them
29 ;; available in $includedir where some users expect them.
30 '(lambda* (#:key outputs #:allow-other-keys)
31 (define out (assoc-ref outputs "out"))
32 (symlink (string-append out "/lib/libffi-3.1/include")
33 (string-append out "/include")))))
40 (string-append "ftp://sourceware.org/pub/libffi/"
41 name "-" version ".tar.gz"))
44 "1sznmrhcswwbyqla9y2ximlkzbxks59wjfs3lh7qf8ayranyxzlp"))))
45 (build-system gnu-build-system)
46 (arguments `(#:phases (alist-cons-after 'install 'post-install
49 (outputs '("out" "debug"))
50 (synopsis "Foreign function call interface library")
52 "The libffi library provides a portable, high level programming interface
53 to various calling conventions. This allows a programmer to call any
54 function specified by a call interface description at run-time.
56 FFI stands for Foreign Function Interface. A foreign function interface is
57 the popular name for the interface that allows code written in one language
58 to call code written in another language. The libffi library really only
59 provides the lowest, machine dependent layer of a fully featured foreign
60 function interface. A layer must exist above libffi that handles type
61 conversions for values passed between the two languages.")
62 (home-page "http://sources.redhat.com/libffi/")
64 ;; See <http://github.com/atgreen/libffi/blob/master/LICENSE>.