Commit | Line | Data |
---|---|---|
832e64bd | 1 | ;;; GNU Guix --- Functional package management for GNU |
809f1762 | 2 | ;;; Copyright © 2013, 2015, 2016 Ludovic Courtès <ludo@gnu.org> |
77a39799 | 3 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
832e64bd LC |
4 | ;;; |
5 | ;;; This file is part of GNU Guix. | |
6 | ;;; | |
7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
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 | ;;; | |
12 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
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 | |
18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
19 | ||
20 | (define-module (gnu packages swig) | |
21 | #:use-module (guix packages) | |
22 | #:use-module (guix download) | |
23 | #:use-module (guix licenses) | |
24 | #:use-module (guix build-system gnu) | |
e8ef3cc4 | 25 | #:use-module (gnu packages) |
832e64bd LC |
26 | #:use-module (gnu packages pcre) |
27 | #:use-module (gnu packages guile) | |
0a643dc6 | 28 | #:use-module (gnu packages boost) |
832e64bd | 29 | #:use-module (gnu packages python) |
0160458b | 30 | #:use-module (gnu packages perl)) |
832e64bd | 31 | |
0160458b | 32 | (define-public swig |
832e64bd LC |
33 | (package |
34 | (name "swig") | |
0122a869 | 35 | (version "3.0.12") |
832e64bd LC |
36 | (source (origin |
37 | (method url-fetch) | |
de67e922 LF |
38 | (uri (string-append "mirror://sourceforge/" name "/" name "/" |
39 | name "-" version "/" | |
40 | name "-" version ".tar.gz")) | |
e8ef3cc4 | 41 | (patches (search-patches "swig-guile-gc.patch")) |
832e64bd LC |
42 | (sha256 |
43 | (base32 | |
a21bcd70 | 44 | "0kf99ygrjs5616gsqhz1l7bib3a12izmxi7g48bwblbymr3z9ybw")))) |
832e64bd | 45 | (build-system gnu-build-system) |
503c8c58 LF |
46 | (arguments |
47 | '(#:phases | |
48 | (modify-phases %standard-phases | |
49 | (add-after 'unpack 'set-env | |
50 | ;; Required since Perl 5.26.0's removal of the current | |
51 | ;; working directory from @INC. | |
52 | ;; TODO Try removing this for later versions of SWIG. | |
53 | (lambda _ (setenv "PERL_USE_UNSAFE_INC" "1") #t))))) | |
809f1762 LC |
54 | (native-inputs `(("boost" ,boost) |
55 | ("pcre" ,pcre "bin"))) ;for 'pcre-config' | |
56 | (inputs `(;; Provide these to run the corresponding tests. | |
832e64bd | 57 | ("guile" ,guile-2.0) |
6f7f2409 AE |
58 | ("perl" ,perl))) |
59 | ;; FIXME: reactivate input python as soon as the test failures | |
0160458b | 60 | ;; fatal error: Python.h: No such file or directory |
6f7f2409 AE |
61 | ;; # include <Python.h> |
62 | ;; are fixed. | |
63 | ;; The python part probably never worked and does not seem to | |
64 | ;; be needed for currently dependent packages. | |
65 | ;; ("python" ,python-wrapper))) | |
832e64bd LC |
66 | (home-page "http://swig.org/") |
67 | (synopsis | |
68 | "Interface compiler that connects C/C++ code to higher-level languages") | |
69 | (description | |
70 | "SWIG is an interface compiler that connects programs written in C and | |
71 | C++ with languages such as Perl, Python, Ruby, Scheme, and Tcl. It works by | |
72 | taking the declarations found in C/C++ header files and using them to generate | |
73 | the wrapper code that scripting languages need to access the underlying C/C++ | |
74 | code. In addition, SWIG provides a variety of customization features that let | |
75 | you tailor the wrapping process to suit your application.") | |
76 | ||
77 | ;; See http://www.swig.org/Release/LICENSE for details. | |
78 | (license gpl3+))) |