linux-initrd: Add USB kernel modules to the default initrd.
[jackhill/guix/guix.git] / gnu / packages / swig.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
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)
25 #:use-module (gnu packages pcre)
26 #:use-module (gnu packages guile)
27 #:use-module (gnu packages boost)
28 #:use-module (gnu packages python)
29 #:use-module (gnu packages perl)
30 #:export (swig))
31
32 (define swig
33 (package
34 (name "swig")
35 (version "3.0.2")
36 (source (origin
37 (method url-fetch)
38 (uri (string-append "mirror://sourceforge/swig/swig-"
39 version ".tar.gz"))
40 (sha256
41 (base32
42 "04vqrij3k6pcq41y7rzl5rmhnghqg905f11wyrqw7vdwr9brcrm2"))))
43 (build-system gnu-build-system)
44 (native-inputs `(("boost" ,boost)))
45 (inputs `(("pcre" ,pcre)
46
47 ;; Provide these to run the corresponding tests.
48 ("guile" ,guile-2.0)
49 ("perl" ,perl)))
50 ;; FIXME: reactivate input python as soon as the test failures
51 ;; fatal error: Python.h: No such file or directory
52 ;; # include <Python.h>
53 ;; are fixed.
54 ;; The python part probably never worked and does not seem to
55 ;; be needed for currently dependent packages.
56 ;; ("python" ,python-wrapper)))
57 (arguments
58 `(#:phases
59 (alist-cons-before
60 'check 'install-locales
61 (lambda _
62 ;; One of the tests requires the availability of a UTF-8
63 ;; locale and otherwise fails.
64 (setenv "LOCPATH" (getcwd))
65 (zero? (system* "localedef" "--no-archive"
66 "--prefix" (getcwd) "-i" "en_US"
67 "-f" "UTF-8" "./en_US.utf8")))
68 %standard-phases)))
69 (home-page "http://swig.org/")
70 (synopsis
71 "Interface compiler that connects C/C++ code to higher-level languages")
72 (description
73 "SWIG is an interface compiler that connects programs written in C and
74 C++ with languages such as Perl, Python, Ruby, Scheme, and Tcl. It works by
75 taking the declarations found in C/C++ header files and using them to generate
76 the wrapper code that scripting languages need to access the underlying C/C++
77 code. In addition, SWIG provides a variety of customization features that let
78 you tailor the wrapping process to suit your application.")
79
80 ;; See http://www.swig.org/Release/LICENSE for details.
81 (license gpl3+)))