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 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
5 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
8 ;;; This file is part of GNU Guix.
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 (define-module (gnu packages swig)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix licenses)
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages boost)
30 #:use-module (gnu packages guile)
31 #:use-module (gnu packages pcre)
32 #:use-module (gnu packages perl)
33 #:use-module (gnu packages python))
41 (uri (string-append "mirror://sourceforge/" name "/" name "/"
43 name "-" version ".tar.gz"))
46 "1ac7g0gd8ndwv3ybqn5vjgqxa7090bby4db164a7mn9ssp8b803s"))))
47 (build-system gnu-build-system)
50 (modify-phases %standard-phases
51 (add-before 'configure 'workaround-gcc-bug
53 ;; XXX: Don't add the -isystem flag, or GCCs #include_next
54 ;; won't be able to find <stdlib.h>.
55 (substitute* "configure"
58 (native-inputs `(("boost" ,boost)
59 ("pcre" ,pcre "bin") ;for 'pcre-config'
60 ;; The following are for tests and examples:
63 ;;("python" ,python-wrapper)
64 (inputs `(("pcre" ,pcre)))
65 (home-page "http://swig.org/")
67 "Interface compiler that connects C/C++ code to higher-level languages")
69 "SWIG is an interface compiler that connects programs written in C and
70 C++ with languages such as Perl, Python, Ruby, Scheme, and Tcl. It works by
71 taking the declarations found in C/C++ header files and using them to generate
72 the wrapper code that scripting languages need to access the underlying C/C++
73 code. In addition, SWIG provides a variety of customization features that let
74 you tailor the wrapping process to suit your application.")
76 ;; See http://www.swig.org/Release/LICENSE for details.