gnu: Remove static-bash-for-bootstrap.
[jackhill/guix/guix.git] / gnu / packages / swig.scm
CommitLineData
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>
a555c3f4 4;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
832e64bd
LC
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages swig)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix licenses)
25 #:use-module (guix build-system gnu)
e8ef3cc4 26 #:use-module (gnu packages)
832e64bd
LC
27 #:use-module (gnu packages pcre)
28 #:use-module (gnu packages guile)
0a643dc6 29 #:use-module (gnu packages boost)
832e64bd 30 #:use-module (gnu packages python)
0160458b 31 #:use-module (gnu packages perl))
832e64bd 32
0160458b 33(define-public swig
832e64bd
LC
34 (package
35 (name "swig")
0122a869 36 (version "3.0.12")
832e64bd
LC
37 (source (origin
38 (method url-fetch)
de67e922
LF
39 (uri (string-append "mirror://sourceforge/" name "/" name "/"
40 name "-" version "/"
41 name "-" version ".tar.gz"))
e8ef3cc4 42 (patches (search-patches "swig-guile-gc.patch"))
832e64bd
LC
43 (sha256
44 (base32
a21bcd70 45 "0kf99ygrjs5616gsqhz1l7bib3a12izmxi7g48bwblbymr3z9ybw"))))
832e64bd 46 (build-system gnu-build-system)
503c8c58
LF
47 (arguments
48 '(#:phases
49 (modify-phases %standard-phases
50 (add-after 'unpack 'set-env
51 ;; Required since Perl 5.26.0's removal of the current
52 ;; working directory from @INC.
53 ;; TODO Try removing this for later versions of SWIG.
a555c3f4
MB
54 (lambda _ (setenv "PERL_USE_UNSAFE_INC" "1") #t))
55 (add-before 'configure 'workaround-gcc-bug
56 (lambda _
57 ;; XXX: Don't add the -isystem flag, or GCCs #include_next
58 ;; won't be able to find <stdlib.h>.
59 (substitute* "configure"
60 (("-isystem ") "-I"))
61 #t)))))
809f1762
LC
62 (native-inputs `(("boost" ,boost)
63 ("pcre" ,pcre "bin"))) ;for 'pcre-config'
64 (inputs `(;; Provide these to run the corresponding tests.
457e1166 65 ("pcre" ,pcre)
832e64bd 66 ("guile" ,guile-2.0)
6f7f2409
AE
67 ("perl" ,perl)))
68 ;; FIXME: reactivate input python as soon as the test failures
0160458b 69 ;; fatal error: Python.h: No such file or directory
6f7f2409
AE
70 ;; # include <Python.h>
71 ;; are fixed.
72 ;; The python part probably never worked and does not seem to
73 ;; be needed for currently dependent packages.
74;; ("python" ,python-wrapper)))
832e64bd
LC
75 (home-page "http://swig.org/")
76 (synopsis
77 "Interface compiler that connects C/C++ code to higher-level languages")
78 (description
79 "SWIG is an interface compiler that connects programs written in C and
80C++ with languages such as Perl, Python, Ruby, Scheme, and Tcl. It works by
81taking the declarations found in C/C++ header files and using them to generate
82the wrapper code that scripting languages need to access the underlying C/C++
83code. In addition, SWIG provides a variety of customization features that let
84you tailor the wrapping process to suit your application.")
85
86 ;; See http://www.swig.org/Release/LICENSE for details.
87 (license gpl3+)))