distro: Change the module name space to (gnu ...).
[jackhill/guix/guix.git] / gnu / packages / autotools.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.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 autotools)
21 #:use-module (guix licenses)
22 #:use-module (distro)
23 #:use-module (gnu packages perl)
24 #:use-module (gnu packages m4)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu))
28
29 (define-public autoconf
30 (package
31 (name "autoconf")
32 (version "2.69")
33 (source
34 (origin
35 (method url-fetch)
36 (uri (string-append "mirror://gnu/autoconf/autoconf-"
37 version ".tar.xz"))
38 (sha256
39 (base32
40 "113nlmidxy9kjr45kg9x3ngar4951mvag1js2a3j8nxcz34wxsv4"))))
41 (build-system gnu-build-system)
42 (inputs
43 `(("perl" ,perl)
44 ("m4" ,m4)))
45 ;; XXX: testsuite: 209 and 279 failed. The latter is an impurity. It
46 ;; should use our own "cpp" instead of "/lib/cpp".
47 (arguments `(#:tests? #f))
48 (home-page
49 "http://www.gnu.org/software/autoconf/")
50 (synopsis
51 "GNU Autoconf, a part of the GNU Build System")
52 (description
53 "GNU Autoconf is an extensible package of M4 macros that produce
54 shell scripts to automatically configure software source code
55 packages. These scripts can adapt the packages to many kinds of
56 UNIX-like systems without manual user intervention. Autoconf
57 creates a configuration script for a package from a template
58 file that lists the operating system features that the package
59 can use, in the form of M4 macro calls.")
60 (license gpl3+))) ; some files are under GPLv2+
61
62 (define-public automake
63 (package
64 (name "automake")
65 (version "1.12.6")
66 (source
67 (origin
68 (method url-fetch)
69 (uri (string-append "mirror://gnu/automake/automake-"
70 version ".tar.xz"))
71 (sha256
72 (base32
73 "1ynvca8z4aqcwr94rf7j1bfiid2w9w250y9qhnyj9vmi8lhsnd7q"))))
74 (build-system gnu-build-system)
75 (inputs
76 `(("autoconf" ,autoconf)
77 ("perl" ,perl)))
78 (home-page
79 "http://www.gnu.org/software/automake/")
80 (synopsis
81 "GNU Automake, a GNU standard-compliant makefile generator")
82 (description
83 "GNU Automake is a tool for automatically generating
84 `Makefile.in' files compliant with the GNU Coding
85 Standards. Automake requires the use of Autoconf.")
86 (license gpl2+))) ; some files are under GPLv3+
87
88 (define-public libtool
89 (package
90 (name "libtool")
91 (version "2.4.2")
92 (source (origin
93 (method url-fetch)
94 (uri (string-append "mirror://gnu/libtool/libtool-"
95 version ".tar.gz"))
96 (sha256
97 (base32
98 "0649qfpzkswgcj9vqkkr9rn4nlcx80faxpyqscy2k1x9c94f93dk"))))
99 (build-system gnu-build-system)
100 (native-inputs `(("m4" ,m4)
101 ("perl" ,perl)))
102
103 ;; Separate binaries from the rest. During bootstrap, only ltdl is
104 ;; used; not depending on the binaries allows us to avoid retaining
105 ;; a reference to the bootstrap bash.
106 (outputs '("bin" ; libtoolize, libtool, etc.
107 "out")) ; libltdl.so, ltdl.h, etc.
108
109 (arguments
110 `(#:patches (list (assoc-ref %build-inputs "patch/skip-tests"))
111 #:phases (alist-cons-before
112 'check 'pre-check
113 (lambda* (#:key inputs #:allow-other-keys)
114 ;; Run the test suite in parallel, if possible.
115 (let ((ncores
116 (cond
117 ((getenv "NIX_BUILD_CORES")
118 =>
119 (lambda (n)
120 (if (zero? (string->number n))
121 (number->string (current-processor-count))
122 n)))
123 (else "1"))))
124 (setenv "TESTSUITEFLAGS"
125 (string-append "-j" ncores)))
126
127 ;; Path references to /bin/sh.
128 (let ((bash (assoc-ref inputs "bash")))
129 (substitute* "tests/testsuite"
130 (("/bin/sh")
131 (string-append bash "/bin/bash")))))
132 %standard-phases)))
133 (inputs `(("patch/skip-tests"
134 ,(search-patch "libtool-skip-tests.patch"))))
135 (synopsis "GNU Libtool, a generic library support script")
136 (description
137 "GNU libtool is a generic library support script. Libtool hides the
138 complexity of using shared libraries behind a consistent, portable interface.
139
140 To use libtool, add the new generic library building commands to your
141 Makefile, Makefile.in, or Makefile.am. See the documentation for
142 details.")
143 (license gpl3+)
144 (home-page "http://www.gnu.org/software/libtool/")))