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