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