Commit | Line | Data |
---|---|---|
233e7676 LC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> | |
a0b6a7ee | 3 | ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org> |
2b00a550 | 4 | ;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org> |
c6e96280 | 5 | ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> |
a33391bd | 6 | ;;; Copyright © 2015, 2017, 2018 Mark H Weaver <mhw@netris.org> |
6b0686fa | 7 | ;;; Copyright © 2016 David Thompson <davet@gnu.org> |
3c986a7d | 8 | ;;; Copyright © 2017 Nikita <nikita@n0.is> |
e4959cd5 | 9 | ;;; Copyright © 2017, 2019, 2021 Efraim Flashner <efraim@flashner.co.il> |
cc355333 | 10 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
2b4e5568 | 11 | ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> |
647cfcf6 | 12 | ;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com> |
b085d436 | 13 | ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> |
18d4d15d | 14 | ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
80ffc708 | 15 | ;;; |
233e7676 | 16 | ;;; This file is part of GNU Guix. |
80ffc708 | 17 | ;;; |
233e7676 | 18 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
80ffc708 NK |
19 | ;;; under the terms of the GNU General Public License as published by |
20 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
21 | ;;; your option) any later version. | |
22 | ;;; | |
233e7676 | 23 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
80ffc708 NK |
24 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
25 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
26 | ;;; GNU General Public License for more details. | |
27 | ;;; | |
28 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 29 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
80ffc708 | 30 | |
1ffa7090 | 31 | (define-module (gnu packages autotools) |
4a44e743 | 32 | #:use-module (guix licenses) |
59a43334 | 33 | #:use-module (gnu packages) |
1ffa7090 | 34 | #:use-module (gnu packages perl) |
bfe88e0c | 35 | #:use-module (gnu packages python) |
1ffa7090 | 36 | #:use-module (gnu packages m4) |
98341757 | 37 | #:use-module (gnu packages man) |
7cd1d7bd LC |
38 | #:use-module (gnu packages bash) |
39 | #:use-module (guix utils) | |
80ffc708 NK |
40 | #:use-module (guix packages) |
41 | #:use-module (guix download) | |
18d4d15d | 42 | #:use-module (guix git-download) |
7cd1d7bd | 43 | #:use-module (guix build-system gnu) |
c6e96280 MR |
44 | #:use-module (guix build-system trivial) |
45 | #:use-module (ice-9 match) | |
46 | #:export (autoconf-wrapper)) | |
80ffc708 | 47 | |
4a987352 | 48 | (define-public autoconf-2.69 |
80ffc708 NK |
49 | (package |
50 | (name "autoconf") | |
51 | (version "2.69") | |
52 | (source | |
53 | (origin | |
54 | (method url-fetch) | |
55 | (uri (string-append "mirror://gnu/autoconf/autoconf-" | |
56 | version ".tar.xz")) | |
57 | (sha256 | |
58 | (base32 | |
59 | "113nlmidxy9kjr45kg9x3ngar4951mvag1js2a3j8nxcz34wxsv4")))) | |
60 | (build-system gnu-build-system) | |
b085d436 JN |
61 | (inputs |
62 | ;; TODO: remove `if' in the next rebuild cycle. | |
63 | (if (%current-target-system) | |
64 | `(("bash" ,bash-minimal) | |
65 | ("perl" ,perl) | |
66 | ("m4" ,m4)) | |
67 | '())) | |
a6abac9f | 68 | (native-inputs |
80ffc708 NK |
69 | `(("perl" ,perl) |
70 | ("m4" ,m4))) | |
b085d436 JN |
71 | (arguments |
72 | `(;; XXX: testsuite: 209 and 279 failed. The latter is an impurity. It | |
73 | ;; should use our own "cpp" instead of "/lib/cpp". | |
74 | #:tests? #f | |
75 | ,@(if (%current-target-system) | |
76 | `(#:phases | |
77 | (modify-phases %standard-phases | |
78 | (add-after 'install 'patch-non-shebang-references | |
79 | (lambda* (#:key build inputs outputs #:allow-other-keys) | |
80 | ;; `patch-shebangs' patches shebangs only, and the Perl | |
81 | ;; scripts use a re-exec feature that references the | |
82 | ;; build hosts' perl. Also, BASH and M4 store references | |
83 | ;; hide in the scripts. | |
84 | (let ((bash (assoc-ref inputs "bash")) | |
85 | (m4 (assoc-ref inputs "m4")) | |
86 | (perl (assoc-ref inputs "perl")) | |
87 | (out (assoc-ref outputs "out")) | |
88 | (store-directory (%store-directory))) | |
89 | (substitute* (find-files (string-append out "/bin")) | |
90 | (((string-append store-directory "/[^/]*-bash-[^/]*")) | |
91 | bash) | |
92 | (((string-append store-directory "/[^/]*-m4-[^/]*")) | |
93 | m4) | |
94 | (((string-append store-directory "/[^/]*-perl-[^/]*")) | |
95 | perl)) | |
96 | #t))))) | |
97 | '()))) | |
25ee4a47 | 98 | (home-page "https://www.gnu.org/software/autoconf/") |
f50d2669 | 99 | (synopsis "Create source code configuration scripts") |
80ffc708 | 100 | (description |
a22dc0c4 LC |
101 | "Autoconf offers the developer a robust set of M4 macros which expand |
102 | into shell code to test the features of Unix-like systems and to adapt | |
103 | automatically their software package to these systems. The resulting shell | |
104 | scripts are self-contained and portable, freeing the user from needing to | |
105 | know anything about Autoconf or M4.") | |
4a44e743 | 106 | (license gpl3+))) ; some files are under GPLv2+ |
80ffc708 | 107 | |
a0b6a7ee LC |
108 | ;; This is the renaissance version, which is not widely supported yet. |
109 | (define-public autoconf-2.71 | |
4a987352 LC |
110 | (package |
111 | (inherit autoconf-2.69) | |
a0b6a7ee | 112 | (version "2.71") |
4a987352 LC |
113 | (source |
114 | (origin | |
115 | (method url-fetch) | |
116 | (uri (string-append "mirror://gnu/autoconf/autoconf-" | |
117 | version ".tar.xz")) | |
118 | (sha256 | |
119 | (base32 | |
a0b6a7ee | 120 | "197sl23irn6s9pd54rxj5vcp5y8dv65jb9yfqgr2g56cxg7q6k7i")))) |
4a987352 LC |
121 | (arguments |
122 | (substitute-keyword-arguments (package-arguments autoconf-2.69) | |
123 | ((#:tests? _ #f) | |
124 | ;; FIXME: To run the test suite, fix all the instances where scripts | |
125 | ;; generates "#! /bin/sh" shebangs. | |
126 | #f) | |
127 | ((#:phases phases '%standard-phases) | |
128 | `(modify-phases ,phases | |
129 | (add-before 'check 'prepare-tests | |
130 | (lambda _ | |
131 | (for-each patch-shebang | |
132 | (append (find-files "tests" | |
133 | (lambda (file stat) | |
134 | (executable-file? file))) | |
135 | (find-files "bin" | |
136 | (lambda (file stat) | |
137 | (executable-file? file))))) | |
138 | #t)))))))) | |
139 | ||
140 | (define-public autoconf autoconf-2.69) | |
141 | ||
c6e96280 MR |
142 | (define-public autoconf-2.68 |
143 | (package (inherit autoconf) | |
144 | (version "2.68") | |
145 | (source | |
146 | (origin | |
147 | (method url-fetch) | |
148 | (uri (string-append "mirror://gnu/autoconf/autoconf-" | |
149 | version ".tar.xz")) | |
150 | (sha256 | |
151 | (base32 | |
152 | "1fjm21k2na07f3vasf288a0zx66lbv0hd3l9bvv3q8p62s3pg569")))))) | |
153 | ||
2a7050ab LC |
154 | (define-public autoconf-2.64 |
155 | ;; As of GDB 7.8, GDB is still developed using this version of Autoconf. | |
156 | (package (inherit autoconf) | |
157 | (version "2.64") | |
158 | (source | |
159 | (origin | |
160 | (method url-fetch) | |
161 | (uri (string-append "mirror://gnu/autoconf/autoconf-" | |
162 | version ".tar.xz")) | |
163 | (sha256 | |
164 | (base32 | |
165 | "0j3jdjpf5ly39dlp0bg70h72nzqr059k0x8iqxvaxf106chpgn9j")))))) | |
166 | ||
fe18e257 MW |
167 | (define-public autoconf-2.13 |
168 | ;; GNU IceCat 52.x requires autoconf-2.13 to build! | |
169 | (package (inherit autoconf) | |
170 | (version "2.13") | |
171 | (source | |
172 | (origin | |
173 | (method url-fetch) | |
174 | (uri (string-append "mirror://gnu/autoconf/autoconf-" | |
175 | version ".tar.gz")) | |
176 | (sha256 | |
177 | (base32 | |
178 | "07krzl4czczdsgzrrw9fiqx35xcf32naf751khg821g5pqv12qgh")))) | |
179 | (arguments | |
180 | `(#:tests? #f | |
181 | #:phases | |
182 | ;; The 'configure' script in autoconf-2.13 can't cope with "SHELL=" and | |
183 | ;; "CONFIG_SHELL=" arguments, so we set them as environment variables | |
184 | ;; and pass a simplified set of arguments. | |
185 | (modify-phases %standard-phases | |
186 | (replace 'configure | |
187 | (lambda* (#:key build inputs outputs #:allow-other-keys) | |
188 | (let ((bash (which "bash")) | |
189 | (out (assoc-ref outputs "out"))) | |
190 | (setenv "CONFIG_SHELL" bash) | |
191 | (setenv "SHELL" bash) | |
95cc40a8 MW |
192 | (invoke bash "./configure" |
193 | (string-append "--prefix=" out) | |
194 | (string-append "--build=" build)))))))))) | |
fe18e257 | 195 | |
2a7050ab | 196 | |
464f5447 LC |
197 | (define (make-autoconf-wrapper autoconf) |
198 | "Return a wrapper around AUTOCONF that generates `configure' scripts that | |
c6e96280 MR |
199 | use our own Bash instead of /bin/sh in shebangs. For that reason, it should |
200 | only be used internally---users should not end up distributing `configure' | |
201 | files with a system-specific shebang." | |
7cd1d7bd | 202 | (package (inherit autoconf) |
7cd1d7bd LC |
203 | (name (string-append (package-name autoconf) "-wrapper")) |
204 | (build-system trivial-build-system) | |
205 | (inputs `(("guile" | |
168030ea LC |
206 | ;; XXX: Kludge to hide the circular dependency. |
207 | ,(module-ref (resolve-interface '(gnu packages guile)) | |
208 | 'guile-2.0)) | |
7cd1d7bd LC |
209 | ("autoconf" ,autoconf) |
210 | ("bash" ,bash))) | |
211 | (arguments | |
212 | '(#:modules ((guix build utils)) | |
213 | #:builder | |
214 | (begin | |
215 | (use-modules (guix build utils)) | |
216 | (let* ((out (assoc-ref %outputs "out")) | |
217 | (bin (string-append out "/bin")) | |
218 | (autoconf (string-append | |
219 | (assoc-ref %build-inputs "autoconf") | |
220 | "/bin/autoconf")) | |
221 | (guile (string-append | |
222 | (assoc-ref %build-inputs "guile") | |
223 | "/bin/guile")) | |
224 | (sh (string-append | |
225 | (assoc-ref %build-inputs "bash") | |
226 | "/bin/sh")) | |
227 | (modules ((compose dirname dirname dirname) | |
228 | (search-path %load-path | |
229 | "guix/build/utils.scm")))) | |
230 | (mkdir-p bin) | |
231 | ||
232 | ;; Symlink all the binaries but `autoconf'. | |
233 | (with-directory-excursion bin | |
234 | (for-each (lambda (file) | |
235 | (unless (string=? (basename file) "autoconf") | |
236 | (symlink file (basename file)))) | |
237 | (find-files (dirname autoconf) ".*"))) | |
238 | ||
239 | ;; Add an `autoconf' binary that wraps the real one. | |
240 | (call-with-output-file (string-append bin "/autoconf") | |
241 | (lambda (port) | |
242 | ;; Shamefully, Guile can be used in shebangs only if a | |
243 | ;; single argument is passed (-ds); otherwise it gets | |
244 | ;; them all as a single argument and fails to parse them. | |
245 | (format port "#!~a | |
246 | export GUILE_LOAD_PATH=\"~a\" | |
247 | export GUILE_LOAD_COMPILED_PATH=\"~a\" | |
248 | exec ~a --no-auto-compile \"$0\" \"$@\" | |
249 | !#~%" | |
250 | sh modules modules guile) | |
251 | (write | |
252 | `(begin | |
253 | (use-modules (guix build utils)) | |
254 | (let ((result (apply system* ,autoconf | |
255 | (cdr (command-line))))) | |
f11617d8 LC |
256 | (when (and (file-exists? "configure") |
257 | (not (file-exists? "/bin/sh"))) | |
258 | ;; Patch regardless of RESULT, because `autoconf | |
259 | ;; -Werror' can both create a `configure' file and | |
260 | ;; return a non-zero exit code. | |
261 | (patch-shebang "configure")) | |
262 | (exit (status:exit-val result)))) | |
7cd1d7bd | 263 | port))) |
a33391bd MW |
264 | (chmod (string-append bin "/autoconf") #o555) |
265 | #t)))) | |
464f5447 LC |
266 | |
267 | ;; Do not show it in the UI since it's meant for internal use. | |
268 | (properties '((hidden? . #t))))) | |
269 | ||
ce10e2b3 MD |
270 | ;; Only use this package when autoconf is not usable, |
271 | ;; see <https://issues.guix.gnu.org/46564#1>. | |
464f5447 LC |
272 | (define-public autoconf-wrapper |
273 | (make-autoconf-wrapper autoconf)) | |
7cd1d7bd | 274 | |
6b0686fa DT |
275 | (define-public autoconf-archive |
276 | (package | |
277 | (name "autoconf-archive") | |
e4959cd5 | 278 | (version "2021.02.19") |
6b0686fa DT |
279 | (source |
280 | (origin | |
281 | (method url-fetch) | |
282 | (uri (string-append "mirror://gnu/autoconf-archive/autoconf-archive-" | |
283 | version ".tar.xz")) | |
284 | (sha256 | |
285 | (base32 | |
e4959cd5 | 286 | "1gcwqspcxiygnyk02smsk8ivzs9r69ji38izxzzsijyx52fyp9p8")))) |
6b0686fa | 287 | (build-system gnu-build-system) |
6fd52309 | 288 | (home-page "https://www.gnu.org/software/autoconf-archive/") |
6b0686fa DT |
289 | (synopsis "Collection of freely reusable Autoconf macros") |
290 | (description | |
291 | "Autoconf Archive is a collection of over 450 new macros for Autoconf, | |
292 | greatly expanding the domain of its functionality. These macros have been | |
293 | contributed as free software by the community.") | |
294 | (license gpl3+))) | |
295 | ||
2b00a550 ML |
296 | (define-public autobuild |
297 | (package | |
298 | (name "autobuild") | |
299 | (version "5.3") | |
300 | (source (origin | |
301 | (method url-fetch) | |
302 | (uri (string-append "mirror://savannah/autobuild/autobuild-" | |
303 | version ".tar.gz")) | |
304 | (sha256 | |
305 | (base32 | |
306 | "0gv7g61ja9q9zg1m30k4snqwwy1kq7b4df6sb7d2qra7kbdq8af1")))) | |
307 | (build-system gnu-build-system) | |
308 | (inputs `(("perl" ,perl))) | |
309 | (synopsis "Process generated build logs") | |
310 | (description "Autobuild is a package that processes build logs generated | |
311 | when building software. Autobuild is primarily focused on packages using | |
312 | Autoconf and Automake, but can be used with other build systems too. | |
313 | Autobuild generates an HTML summary file, containing links to each build log. | |
314 | The summary includes project name, version, build hostname, host type (cross | |
315 | compile aware), date of build, and indication of success or failure. The | |
316 | output is indexed in many ways to simplify browsing.") | |
2eed6813 | 317 | (home-page "https://josefsson.org/autobuild/") |
2b00a550 ML |
318 | (license gpl3+))) |
319 | ||
80ffc708 NK |
320 | (define-public automake |
321 | (package | |
322 | (name "automake") | |
20586ffd | 323 | (version "1.16.2") |
7cd1d7bd LC |
324 | (source (origin |
325 | (method url-fetch) | |
326 | (uri (string-append "mirror://gnu/automake/automake-" | |
327 | version ".tar.xz")) | |
328 | (sha256 | |
329 | (base32 | |
20586ffd | 330 | "1l7dkqbsmbf94ax29jj1jf6a0r6ikc8jybg1p5m0c3ki7pg5ki6c")) |
01eafd38 | 331 | (patches |
01c7193e | 332 | (search-patches "automake-skip-amhello-tests.patch")))) |
80ffc708 | 333 | (build-system gnu-build-system) |
d64a6d26 JN |
334 | (inputs |
335 | ;; TODO: remove `if' in the next rebuild cycle. | |
336 | (if (%current-target-system) | |
337 | `(("autoconf" ,autoconf-wrapper) | |
338 | ("bash" ,bash-minimal) | |
339 | ("perl" ,perl)) | |
340 | '())) | |
a6abac9f | 341 | (native-inputs |
464f5447 | 342 | `(("autoconf" ,autoconf-wrapper) |
01eafd38 | 343 | ("perl" ,perl))) |
a9db7d10 LC |
344 | (native-search-paths |
345 | (list (search-path-specification | |
346 | (variable "ACLOCAL_PATH") | |
af070955 | 347 | (files '("share/aclocal"))))) |
7cd1d7bd | 348 | (arguments |
d64a6d26 | 349 | `(#:modules ((guix build gnu-build-system) |
63b7c6c1 LC |
350 | (guix build utils) |
351 | (srfi srfi-1) | |
352 | (srfi srfi-26) | |
353 | (rnrs io ports)) | |
759807e8 EF |
354 | #:phases |
355 | (modify-phases %standard-phases | |
356 | (add-before 'patch-source-shebangs 'patch-tests-shebangs | |
357 | (lambda _ | |
358 | (let ((sh (which "sh"))) | |
359 | (substitute* (find-files "t" "\\.(sh|tap)$") | |
360 | (("#![[:blank:]]?/bin/sh") | |
361 | (string-append "#!" sh))) | |
7cd1d7bd | 362 | |
759807e8 EF |
363 | ;; Set these variables for all the `configure' runs |
364 | ;; that occur during the test suite. | |
365 | (setenv "SHELL" sh) | |
366 | (setenv "CONFIG_SHELL" sh) | |
367 | #t))) | |
9be8d7c8 | 368 | |
20586ffd MB |
369 | (add-before 'check 'skip-test |
370 | (lambda _ | |
371 | ;; This test requires 'etags' and fails if it's missing. | |
372 | ;; Skip it. | |
373 | (substitute* "t/tags-lisp-space.sh" | |
374 | (("^required.*" all) | |
375 | (string-append "exit 77\n" all "\n"))) | |
376 | #t)) | |
377 | ||
d64a6d26 JN |
378 | ,@(if (%current-target-system) |
379 | `((add-after 'install 'patch-non-shebang-references | |
380 | (lambda* (#:key build inputs outputs #:allow-other-keys) | |
381 | ;; `patch-shebangs' patches shebangs only, and the Perl | |
382 | ;; scripts use a re-exec feature that references the | |
383 | ;; build hosts' perl. Also, AUTOCONF and BASH store | |
384 | ;; references hide in the scripts. | |
385 | (let ((autoconf (assoc-ref inputs "autoconf")) | |
386 | (bash (assoc-ref inputs "bash")) | |
387 | (perl (assoc-ref inputs "perl")) | |
388 | (out (assoc-ref outputs "out")) | |
389 | (store-directory (%store-directory))) | |
390 | (substitute* (find-files (string-append out "/bin")) | |
391 | (((string-append store-directory "/[^/]*-autoconf-[^/]*")) | |
392 | autoconf) | |
393 | (((string-append store-directory "/[^/]*-bash-[^/]*")) | |
394 | bash) | |
395 | (((string-append store-directory "/[^/]*-perl-[^/]*")) | |
396 | perl)) | |
397 | #t)))) | |
398 | '()) | |
399 | ||
cc355333 TGR |
400 | ;; Files like `install-sh', `mdate.sh', etc. must use |
401 | ;; #!/bin/sh, otherwise users could leak erroneous shebangs | |
402 | ;; in the wild. See <http://bugs.gnu.org/14201> for an | |
403 | ;; example. | |
404 | (add-after 'install 'unpatch-shebangs | |
405 | (lambda* (#:key outputs #:allow-other-keys) | |
406 | (let* ((out (assoc-ref outputs "out")) | |
407 | (dir (string-append out "/share"))) | |
408 | (define (starts-with-shebang? file) | |
409 | (equal? (call-with-input-file file | |
410 | (lambda (p) | |
411 | (list (get-u8 p) (get-u8 p)))) | |
412 | (map char->integer '(#\# #\!)))) | |
63b7c6c1 | 413 | |
cc355333 TGR |
414 | (for-each (lambda (file) |
415 | (when (and (starts-with-shebang? file) | |
416 | (executable-file? file)) | |
417 | (format #t "restoring shebang on `~a'~%" | |
418 | file) | |
419 | (substitute* file | |
420 | (("^#!.*/bin/sh") | |
421 | "#!/bin/sh") | |
422 | (("^#!.*/bin/env(.*)$" _ args) | |
423 | (string-append "#!/usr/bin/env" | |
424 | args))))) | |
425 | (find-files dir ".*")) | |
426 | #t)))))) | |
6fd52309 | 427 | (home-page "https://www.gnu.org/software/automake/") |
f50d2669 | 428 | (synopsis "Making GNU standards-compliant Makefiles") |
80ffc708 | 429 | (description |
79c311b8 LC |
430 | "Automake the part of the GNU build system for producing |
431 | standards-compliant Makefiles. Build requirements are entered in an | |
432 | intuitive format and then Automake works with Autoconf to produce a robust | |
433 | Makefile, simplifying the entire process for the developer.") | |
7cd1d7bd | 434 | (license gpl2+))) ; some files are under GPLv3+ |
36d4d49e NK |
435 | |
436 | (define-public libtool | |
437 | (package | |
438 | (name "libtool") | |
192c6f96 | 439 | (version "2.4.6") |
36d4d49e | 440 | (source (origin |
c154e1ea LC |
441 | (method url-fetch) |
442 | (uri (string-append "mirror://gnu/libtool/libtool-" | |
443 | version ".tar.xz")) | |
444 | (sha256 | |
445 | (base32 | |
192c6f96 | 446 | "0vxj52zm709125gwv9qqlw02silj8bnjnh4y07arrz60r31ai1vw")) |
fc1adab1 | 447 | (patches (search-patches "libtool-skip-tests2.patch")))) |
36d4d49e | 448 | (build-system gnu-build-system) |
62c155c0 | 449 | (propagated-inputs `(("m4" ,m4))) |
36d4d49e | 450 | (native-inputs `(("m4" ,m4) |
c154e1ea | 451 | ("perl" ,perl) |
2b4e5568 RW |
452 | ;; XXX: this shouldn't be necessary, but without it test |
453 | ;; 102 fails because it cannot find ltdl/libltdl.la. | |
454 | ("libltdl" ,libltdl) | |
98341757 | 455 | ("help2man" ,help2man) ;because we modify ltmain.sh |
c154e1ea | 456 | ("automake" ,automake) ;some tests rely on 'aclocal' |
464f5447 | 457 | ("autoconf" ,autoconf-wrapper))) ;others on 'autom4te' |
2f8a123e | 458 | |
36d4d49e | 459 | (arguments |
3246cc91 LC |
460 | `(;; Libltdl is provided as a separate package, so don't install it here. |
461 | #:configure-flags '("--disable-ltdl-install") | |
462 | ||
463 | ;; XXX: There are test failures on mips64el-linux starting from 2.4.4: | |
464 | ;; <http://hydra.gnu.org/build/181662>. | |
647cfcf6 PML |
465 | ;; Also, do not run tests when cross compiling |
466 | #:tests? ,(not (or (%current-target-system) | |
467 | (string-prefix? "mips64" | |
3246cc91 | 468 | (%current-system)))) |
c154e1ea | 469 | |
dc70626d | 470 | #:phases |
471 | (modify-phases %standard-phases | |
472 | (add-before 'check 'pre-check | |
647cfcf6 | 473 | (lambda* (#:key inputs native-inputs #:allow-other-keys) |
dc70626d | 474 | ;; Run the test suite in parallel, if possible. |
475 | (setenv "TESTSUITEFLAGS" | |
476 | (string-append | |
477 | "-j" | |
478 | (number->string (parallel-job-count)))) | |
c5862bda | 479 | ;; Patch references to /bin/sh. |
647cfcf6 | 480 | (let ((bash (assoc-ref (or native-inputs inputs) "bash"))) |
dc70626d | 481 | (substitute* "tests/testsuite" |
482 | (("/bin/sh") | |
78c172a5 LF |
483 | (string-append bash "/bin/sh"))) |
484 | #t))) | |
98341757 | 485 | (add-after 'patch-source-shebangs 'restore-ltmain-shebang |
486 | (lambda* (#:key inputs #:allow-other-keys) | |
487 | (substitute* "build-aux/ltmain.in" | |
92e77959 | 488 | (("^#!.*/bin/sh$") "#!/bin/sh")) |
78c172a5 | 489 | #t))))) |
42ff70e2 | 490 | |
f50d2669 | 491 | (synopsis "Generic shared library support tools") |
36d4d49e | 492 | (description |
79c311b8 LC |
493 | "GNU Libtool helps in the creation and use of shared libraries, by |
494 | presenting a single consistent, portable interface that hides the usual | |
495 | complexity of working with shared libraries across platforms.") | |
4a44e743 | 496 | (license gpl3+) |
6fd52309 | 497 | (home-page "https://www.gnu.org/software/libtool/"))) |
e13f715b | 498 | |
18d4d15d MC |
499 | (define-public config |
500 | (let ((revision "1") | |
501 | (commit "c8ddc8472f8efcadafc1ef53ca1d863415fddd5f")) | |
502 | (package | |
503 | (name "config") | |
504 | (version (git-version "0.0.0" revision commit)) ;no release tag | |
505 | (source (origin | |
506 | (method git-fetch) | |
507 | (uri (git-reference | |
508 | (url "https://git.savannah.gnu.org/git/config.git/") | |
509 | (commit commit))) | |
510 | (file-name (git-file-name name version)) | |
511 | (sha256 | |
512 | (base32 | |
513 | "0x6ycvkmmhhhag97wsf0pw8n5fvh12rjvrck90rz17my4ys16qwv")))) | |
514 | (build-system gnu-build-system) | |
515 | (arguments | |
516 | `(#:phases (modify-phases %standard-phases | |
517 | (add-after 'unpack 'patch-/bin/sh | |
518 | (lambda _ | |
519 | (substitute* "testsuite/config-guess.sh" | |
520 | (("#!/bin/sh") | |
521 | (string-append "#!" (which "sh")))) | |
522 | #t)) | |
523 | (replace 'build | |
524 | (lambda _ | |
525 | (invoke "make" "manpages"))) | |
526 | (delete 'configure) | |
527 | (replace 'install | |
528 | (lambda* (#:key outputs #:allow-other-keys) | |
529 | (let* ((out (assoc-ref outputs "out")) | |
530 | (bin (string-append out "/bin")) | |
531 | (man1 (string-append out "/share/man/man1"))) | |
532 | (install-file "config.guess" bin) | |
533 | (install-file "config.sub" bin) | |
534 | (install-file "doc/config.guess.1" man1) | |
535 | (install-file "doc/config.sub.1" man1) | |
536 | #t)))))) | |
537 | (native-inputs | |
538 | `(("help2man" ,help2man))) | |
539 | (home-page "https://savannah.gnu.org/projects/config") | |
44a53674 | 540 | (synopsis "Ubiquitous config.guess and config.sub scripts") |
18d4d15d MC |
541 | (description "The `config.guess' script tries to guess a canonical system triple, |
542 | and `config.sub' validates and canonicalizes. These are used as part of | |
543 | configuration in nearly all GNU packages (and many others).") | |
544 | (license gpl2+)))) | |
545 | ||
3cbb3f9c LC |
546 | (define-public libltdl |
547 | ;; This is a libltdl package separate from the libtool package. This is | |
548 | ;; useful because, unlike libtool, it has zero extra dependencies (making it | |
549 | ;; readily usable during bootstrap), and it builds very quickly since | |
550 | ;; Libtool's extensive test suite isn't run. | |
551 | (package | |
552 | (name "libltdl") | |
192c6f96 | 553 | (version "2.4.6") |
a101c891 LC |
554 | (source (origin |
555 | (method url-fetch) | |
556 | (uri (string-append "mirror://gnu/libtool/libtool-" | |
557 | version ".tar.xz")) | |
558 | (sha256 | |
559 | (base32 | |
ef593a10 | 560 | "0vxj52zm709125gwv9qqlw02silj8bnjnh4y07arrz60r31ai1vw")))) |
3cbb3f9c LC |
561 | (build-system gnu-build-system) |
562 | (arguments | |
563 | '(#:configure-flags '("--enable-ltdl-install") ;really install it | |
8c88e0ba EF |
564 | #:phases (modify-phases %standard-phases |
565 | (add-before 'configure 'change-directory | |
566 | (lambda _ (chdir "libltdl") #t))))) | |
3cbb3f9c LC |
567 | |
568 | (synopsis "System-independent dlopen wrapper of GNU libtool") | |
569 | (description (package-description libtool)) | |
570 | (home-page (package-home-page libtool)) | |
571 | (license lgpl2.1+))) | |
bfe88e0c ML |
572 | |
573 | (define-public pyconfigure | |
574 | (package | |
575 | (name "pyconfigure") | |
576 | (version "0.2.3") | |
577 | (source (origin | |
578 | (method url-fetch) | |
579 | (uri (string-append "mirror://gnu/pyconfigure/pyconfigure-" | |
580 | version ".tar.gz")) | |
581 | (sha256 | |
582 | (base32 | |
583 | "0kxi9bg7l6ric39vbz9ykz4a21xlihhh2zcc3297db8amvhqwhrp")))) | |
584 | (build-system gnu-build-system) | |
585 | (arguments | |
586 | `(#:phases | |
587 | (modify-phases %standard-phases | |
588 | (add-before 'configure 'patch-python | |
589 | (lambda _ | |
590 | (substitute* "pyconf.in" | |
591 | (("/usr/bin/env python") (which "python3"))) | |
592 | #t))))) | |
593 | (inputs | |
594 | `(("python" ,python-3))) | |
595 | (synopsis "@command{configure} interface for Python-based packages") | |
596 | (description | |
597 | "GNU pyconfigure provides template files for easily implementing | |
598 | standards-compliant configure scripts and Makefiles for Python-based packages. | |
599 | It is designed to work alongside existing Python setup scripts, making it easy | |
600 | to integrate into existing projects. Powerful and flexible Autoconf macros | |
601 | are available, allowing you to easily make adjustments to the installation | |
602 | procedure based on the capabilities of the target computer.") | |
603 | (home-page "https://www.gnu.org/software/pyconfigure/manual/") | |
604 | (license | |
605 | (fsf-free | |
606 | "https://www.gnu.org/prep/maintain/html_node/License-Notices-for-Other-Files.html")))) |