gnu: Add emacs-helm-flycheck.
[guix.git] / gnu / packages / swig.scm
blobb931db412b2a0f524c113110f5355c2b83747788
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2015, 2016 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/>.
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))
31 (define-public swig
32   (package
33     (name "swig")
34     (version "3.0.12")
35     (source (origin
36              (method url-fetch)
37              (uri (string-append "mirror://sourceforge/" name "/" name "/"
38                                  name "-" version "/"
39                                  name "-" version ".tar.gz"))
40              (sha256
41               (base32
42                "0kf99ygrjs5616gsqhz1l7bib3a12izmxi7g48bwblbymr3z9ybw"))))
43     (build-system gnu-build-system)
44     (arguments
45      '(#:phases
46        (modify-phases %standard-phases
47          (add-after 'unpack 'set-env
48            ;; Required since Perl 5.26.0's removal of the current
49            ;; working directory from @INC.
50            ;; TODO Try removing this for later versions of SWIG.
51            (lambda _ (setenv "PERL_USE_UNSAFE_INC" "1") #t)))))
52     (native-inputs `(("boost" ,boost)
53                      ("pcre" ,pcre "bin")))       ;for 'pcre-config'
54     (inputs `(;; Provide these to run the corresponding tests.
55               ("guile" ,guile-2.0)
56               ("perl" ,perl)))
57               ;; FIXME: reactivate input python as soon as the test failures
58               ;;   fatal error: Python.h: No such file or directory
59               ;;   # include <Python.h>
60               ;; are fixed.
61               ;; The python part probably never worked and does not seem to
62               ;; be needed for currently dependent packages.
63 ;;               ("python" ,python-wrapper)))
64     (home-page "http://swig.org/")
65     (synopsis
66      "Interface compiler that connects C/C++ code to higher-level languages")
67     (description
68      "SWIG is an interface compiler that connects programs written in C and
69 C++ with languages such as Perl, Python, Ruby, Scheme, and Tcl.  It works by
70 taking the declarations found in C/C++ header files and using them to generate
71 the wrapper code that scripting languages need to access the underlying C/C++
72 code.  In addition, SWIG provides a variety of customization features that let
73 you tailor the wrapping process to suit your application.")
75     ;; See http://www.swig.org/Release/LICENSE for details.
76     (license gpl3+)))