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