From 02afc88c008bbe42d15199fc8e062a3fba6cf762 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 21 Aug 2014 11:40:43 -0400 Subject: [PATCH 3/3] gnu: Rely on 'file' as an implicit input, and on 'patch-usr-bin-file'. * gnu/packages/admin.scm (sudo): Remove 'file' native-input * gnu/packages/bdw-gc.scm (libatomic-ops, libgc): Remove 'file' native-input. * gnu/packages/bittorrent.scm (transmission): Remove 'file' input. * gnu/packages/cmake.scm (cmake): Remove 'file' input. * gnu/packages/file.scm (file): Remove 'file' native-input. * gnu/packages/gawk.scm (gawk): Remove 'file' native-input. * gnu/packages/image.scm (libtiff): Remove 'file' native-input. Remove 'patch-configure' phase. * gnu/packages/libffi.scm (libffi): Remove 'file' native-input. * gnu/packages/mc.scm (mc): Remove 'file' native-input. Remove 'patch-configure' phase. * gnu/packages/mcrypt.scm (libmcrypt, libmhash): Remove 'file' native-input. * gnu/packages/patchutils.scm (quilt): Remove 'file' input. * gnu/packages/pretty-print.scm (a2ps, trueprint, source-highlight): Remove 'file' native-input. Remove 'patch-configure' phase. --- gnu/packages/admin.scm | 6 --- gnu/packages/bdw-gc.scm | 14 +----- gnu/packages/bittorrent.scm | 1 - gnu/packages/cmake.scm | 2 - gnu/packages/file.scm | 3 -- gnu/packages/gawk.scm | 6 --- gnu/packages/image.scm | 11 +---- gnu/packages/libffi.scm | 6 --- gnu/packages/mc.scm | 10 +--- gnu/packages/mcrypt.scm | 4 +- gnu/packages/patchutils.scm | 1 - gnu/packages/pretty-print.scm | 109 +++++++++++++++++------------------------- 12 files changed, 49 insertions(+), 124 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 83b0180..8a85827 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -659,12 +659,6 @@ system administrator.") `(("groff" ,groff) ("linux-pam" ,linux-pam) ("coreutils" ,coreutils))) - (native-inputs - `(;; 'file' is needed by the pre-release libtool on MIPS. - ,@(if (equal? "mips64el-linux" (or (%current-target-system) - (%current-system))) - `(("file" ,file)) - '()))) (home-page "http://www.sudo.ws/") (synopsis "Run commands as root") (description diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm index e68ca50..e5a08b0 100644 --- a/gnu/packages/bdw-gc.scm +++ b/gnu/packages/bdw-gc.scm @@ -76,12 +76,6 @@ C or C++ programs, though that is not its primary goal.") (base32 "1pdm0h1y7bgkczr8byg20r6bq15m5072cqm5pny4f9crc9gn3yh4")))) (build-system gnu-build-system) - (native-inputs - `(;; 'file' is needed by the pre-release libtool on MIPS. - ,@(if (equal? "mips64el-linux" (or (%current-target-system) - (%current-system))) - `(("file" ,file)) - '()))) (outputs '("out" "debug")) (synopsis "Accessing hardware atomic memory update operations") (description @@ -106,13 +100,7 @@ lock-free code, experiment with thread programming paradigms, etc.") "18mg28rr6kwr5clc65k4l4hkyy4kd16amx831sjf8q2lqkbhlck3")))) ;; New dependencies. - (native-inputs - `(("pkg-config" ,pkg-config) - ;; 'file' is needed by the pre-release libtool on MIPS. - ,@(if (equal? "mips64el-linux" (or (%current-target-system) - (%current-system))) - `(("file" ,file)) - '()))) + (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("libatomic-ops" ,libatomic-ops))) ;; 'USE_LIBC_PRIVATES' is now the default. diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm index 496120a..c3e874b 100644 --- a/gnu/packages/bittorrent.scm +++ b/gnu/packages/bittorrent.scm @@ -66,7 +66,6 @@ ("libevent" ,libevent) ("curl" ,curl) ("openssl" ,openssl) - ("file" ,file) ("zlib" ,zlib) ("gtk+" ,gtk+))) (native-inputs diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 87a70de..afe816d 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -78,8 +78,6 @@ (string-join (take (string-split version #\.) 2) ".")))))) %standard-phases))) - (inputs - `(("file" ,file))) (home-page "http://www.cmake.org/") (synopsis "Cross-platform build system") (description diff --git a/gnu/packages/file.scm b/gnu/packages/file.scm index f53c22f..067f20e 100644 --- a/gnu/packages/file.scm +++ b/gnu/packages/file.scm @@ -35,9 +35,6 @@ (sha256 (base32 "01xz106biz6x4h5ilymg5v3367djvgnfp4lm87132cjqdmqgn6b5")))) (build-system gnu-build-system) - (native-inputs - ;; This package depends upon a native install of itself. - (if (%current-target-system) `(("file" ,file)) '() )) (synopsis "file, a file type guesser") (description "The file command is a file type guesser, a command-line tool that tells diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm index 737e610..adcf385 100644 --- a/gnu/packages/gawk.scm +++ b/gnu/packages/gawk.scm @@ -63,12 +63,6 @@ ,@(if (%current-target-system) `(("bash" ,bash)) '()))) - (native-inputs - `(;; 'file' is needed by the pre-release libtool on MIPS. - ,@(if (equal? "mips64el-linux" (or (%current-target-system) - (%current-system))) - `(("file" ,file)) - '()))) (home-page "http://www.gnu.org/software/gawk/") (synopsis "A text scanning and processing language") (description diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 014266c..25bb0e1 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -97,20 +97,11 @@ image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats.") (inputs `(("zlib" ,zlib) ("libjpeg-8" ,libjpeg-8))) ;; currently does not compile with libjpeg version 9 - (native-inputs `(("file" ,file))) (arguments `(#:configure-flags (list (string-append "--with-jpeg-include-dir=" (assoc-ref %build-inputs "libjpeg-8") - "/include")) - #:phases - (alist-cons-before - 'configure 'patch-configure - (lambda _ - (substitute* "configure" - (("`/usr/bin/file") - (string-append "`" (which "file"))))) - %standard-phases))) + "/include")))) (synopsis "Libtiff, a library for handling TIFF files") (description "Libtiff provides support for the Tag Image File Format (TIFF), a format diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm index 067838f..8033fdc 100644 --- a/gnu/packages/libffi.scm +++ b/gnu/packages/libffi.scm @@ -45,12 +45,6 @@ (base32 "1sznmrhcswwbyqla9y2ximlkzbxks59wjfs3lh7qf8ayranyxzlp")))) (build-system gnu-build-system) - (native-inputs - `(;; 'file' is needed by the pre-release libtool on MIPS. - ,@(if (equal? "mips64el-linux" (or (%current-target-system) - (%current-system))) - `(("file" ,file)) - '()))) (arguments `(#:phases (alist-cons-after 'install 'post-install ,post-install-phase %standard-phases))) diff --git a/gnu/packages/mc.scm b/gnu/packages/mc.scm index aba14d5..e83f82c 100644 --- a/gnu/packages/mc.scm +++ b/gnu/packages/mc.scm @@ -46,7 +46,6 @@ (patches (list (search-patch "mc-fix-ncurses-build.patch"))))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) - ("file" ,file) ("perl" ,perl))) (inputs `(("aspell" ,aspell) ("ncurses" ,ncurses) @@ -55,14 +54,7 @@ ("check" ,check))) (arguments `(#:configure-flags - '("--with-screen=ncurses" "--enable-aspell") - #:phases - (alist-cons-before - 'configure 'patch-configure - (lambda _ - (substitute* "configure" - (("/usr/bin/file") (which "file")))) - %standard-phases))) + '("--with-screen=ncurses" "--enable-aspell"))) (home-page "http://www.midnight-commander.org") (synopsis "Graphical file manager") (description diff --git a/gnu/packages/mcrypt.scm b/gnu/packages/mcrypt.scm index eac8c72..a656639 100644 --- a/gnu/packages/mcrypt.scm +++ b/gnu/packages/mcrypt.scm @@ -68,7 +68,6 @@ them.") (base32 "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4")))) (build-system gnu-build-system) - (native-inputs `(("file" ,file))) (home-page "http://mcrypt.sourceforge.net/") (synopsis "Encryption algorithm library") (description @@ -95,8 +94,7 @@ XTEA, 3WAY, TWOFISH, BLOWFISH, ARCFOUR, WAKE and more.") (patches (list (search-patch "mhash-keygen-test-segfault.patch"))))) (build-system gnu-build-system) (native-inputs - `(("file" ,file) - ("perl" ,perl))) ;for tests + `(("perl" ,perl))) ;for tests (home-page "http://mhash.sourceforge.net/") (synopsis "Thread-safe hash library") (description diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm index 48f4d29..854be3c 100644 --- a/gnu/packages/patchutils.scm +++ b/gnu/packages/patchutils.scm @@ -96,7 +96,6 @@ listing the files modified by a patch.") (build-system gnu-build-system) (inputs `(("perl" ,perl) ("less" ,less) - ("file" ,file) ("ed" ,ed))) (arguments '(#:parallel-tests? #f diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 8c51b54..2209cb9 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -53,45 +53,39 @@ ("imagemagick" ,imagemagick))) (native-inputs `(("gperf" ,gperf) - ("perl" ,perl) - ("file" ,file))) + ("perl" ,perl))) (arguments '(#:phases (alist-cons-before - 'configure 'patch-configure + 'build 'patch-scripts (lambda _ - (substitute* "configure" - (("/usr/bin/file") (which "file")))) + (substitute* + '("afm/make_fonts_map.sh" + "tests/defs" + "tests/backup.tst" + "tests/styles.tst") + (("/bin/rm") (which "rm")))) (alist-cons-before - 'build 'patch-scripts - (lambda _ - (substitute* - '("afm/make_fonts_map.sh" - "tests/defs" - "tests/backup.tst" - "tests/styles.tst") - (("/bin/rm") (which "rm")))) - (alist-cons-before - 'check 'patch-test-files - ;; Alternatively, we could unpatch the shebangs in tstfiles - (lambda* (#:key inputs #:allow-other-keys) - (let ((perl (assoc-ref inputs "perl"))) - (substitute* '("tests/ps-ref/includeres.ps" - "tests/gps-ref/includeres.ps") - (("/usr/local/bin/perl") - (string-append perl "/bin/perl")))) - ;; Some of the reference postscript contain a 'version 3' - ;; string that in inconsistent with the source text in the - ;; tstfiles directory. Erroneous search-and-replace? - (substitute* '("tests/ps-ref/InsertBlock.ps" - "tests/gps-ref/InsertBlock.ps" - "tests/ps-ref/bookie.ps" - "tests/gps-ref/bookie.ps") - (("version 3") "version 2")) - (substitute* '("tests/ps-ref/psmandup.ps" - "tests/gps-ref/psmandup.ps") - (("#! */bin/sh") (string-append - "#!" (which "sh"))))) - %standard-phases))))) + 'check 'patch-test-files + ;; Alternatively, we could unpatch the shebangs in tstfiles + (lambda* (#:key inputs #:allow-other-keys) + (let ((perl (assoc-ref inputs "perl"))) + (substitute* '("tests/ps-ref/includeres.ps" + "tests/gps-ref/includeres.ps") + (("/usr/local/bin/perl") + (string-append perl "/bin/perl")))) + ;; Some of the reference postscript contain a 'version 3' + ;; string that in inconsistent with the source text in the + ;; tstfiles directory. Erroneous search-and-replace? + (substitute* '("tests/ps-ref/InsertBlock.ps" + "tests/gps-ref/InsertBlock.ps" + "tests/ps-ref/bookie.ps" + "tests/gps-ref/bookie.ps") + (("version 3") "version 2")) + (substitute* '("tests/ps-ref/psmandup.ps" + "tests/gps-ref/psmandup.ps") + (("#! */bin/sh") (string-append + "#!" (which "sh"))))) + %standard-phases)))) (home-page "http://www.gnu.org/software/a2ps") (synopsis "Any file to PostScript, including pretty-printing") (description @@ -115,16 +109,9 @@ special cases, such as pretty-printing \"--help\" output.") (base32 "13rkc0fga10xyf56yy9dnq95zndnfadkhxflnp24skszj21y8jqh")))) (build-system gnu-build-system) - (native-inputs `(("file" ,file))) (arguments ;; Must define DIFF_CMD for tests to pass - '(#:configure-flags '("CPPFLAGS=-DDIFF_CMD=\\\"diff\\\"") - #:phases (alist-cons-before - 'configure 'patch-configure - (lambda _ - (substitute* "configure" - (("/usr/bin/file") (which "file")))) - %standard-phases))) + '(#:configure-flags '("CPPFLAGS=-DDIFF_CMD=\\\"diff\\\""))) (home-page "http://www.gnu.org/software/trueprint") (synopsis "Pretty-print C sources and other plain text to PostScript") (description @@ -178,34 +165,28 @@ different programming languages.") `(("boost" ,boost))) (native-inputs `(("bison" ,bison) - ("flex" ,flex) - ("file" ,file))) + ("flex" ,flex))) (arguments `(#:configure-flags (list (string-append "--with-boost=" (assoc-ref %build-inputs "boost"))) #:parallel-tests? #f ;There appear to be race conditions #:phases (alist-cons-before - 'configure 'patch-configure + 'check 'patch-test-files (lambda _ - (substitute* "configure" - (("/usr/bin/file") (which "file")))) - (alist-cons-before - 'check 'patch-test-files - (lambda _ - ;; Unpatch shebangs in test input so that source-highlight - ;; is still able to infer input language - (substitute* '("tests/test.sh" - "tests/test2.sh" - "tests/test.tcl") - (((string-append "#! *" (which "sh"))) "#!/bin/sh")) - ;; Initial patching unrecoverably removes whitespace, so - ;; remove it also in the comparison output. - (substitute* '("tests/test.sh.html" - "tests/test2.sh.html" - "tests/test.tcl.html") - (("#! */bin/sh") "#!/bin/sh"))) - %standard-phases)))) + ;; Unpatch shebangs in test input so that source-highlight + ;; is still able to infer input language + (substitute* '("tests/test.sh" + "tests/test2.sh" + "tests/test.tcl") + (((string-append "#! *" (which "sh"))) "#!/bin/sh")) + ;; Initial patching unrecoverably removes whitespace, so + ;; remove it also in the comparison output. + (substitute* '("tests/test.sh.html" + "tests/test2.sh.html" + "tests/test.tcl.html") + (("#! */bin/sh") "#!/bin/sh"))) + %standard-phases))) (home-page "http://www.gnu.org/software/src-highlite") (synopsis "Produce a document with syntax highlighting from a source file") (description -- 1.8.4