summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/linux.scm18
-rw-r--r--gnu/packages/patches/util-linux-perl.patch15
2 files changed, 24 insertions, 9 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 7b46190d79..1690cd8805 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -317,15 +317,15 @@ providing the system administrator with some help in common tasks.")
   (package
     (name "util-linux")
     (version "2.21")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (string-append "mirror://kernel.org/linux/utils/"
-                          name "/v" version "/"
-                          name "-" version ".2" ".tar.xz"))
-      (sha256
-       (base32
-        "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))))
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://kernel.org/linux/utils/"
+                                  name "/v" version "/"
+                                  name "-" version ".2" ".tar.xz"))
+              (sha256
+               (base32
+                "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir"))
+              (patches (list (search-patch "util-linux-perl.patch")))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--disable-use-tty-group"
diff --git a/gnu/packages/patches/util-linux-perl.patch b/gnu/packages/patches/util-linux-perl.patch
new file mode 100644
index 0000000000..c657a1b5ae
--- /dev/null
+++ b/gnu/packages/patches/util-linux-perl.patch
@@ -0,0 +1,15 @@
+Use this common trick that exploits similarities between sh and Perl syntax
+to avoid a hard dependency on Perl.  Instead, this script will work only
+when 'perl' is available in $PATH.
+
+--- util-linux-2.21.2/misc-utils/chkdupexe.pl	2012-05-15 13:51:45.000000000 +0200
++++ util-linux-2.21.2/misc-utils/chkdupexe.pl	2014-06-01 22:46:06.000000000 +0200
+@@ -1,5 +1,6 @@
+-#!@PERL@ -w
+-#
++eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
++  & eval 'exec perl -wS "$0" $argv:q'
++    if 0;
+ # chkdupexe version 2.1.1
+ #
+ # Simple script to look for and list duplicate executables and dangling