Browse Source

distro: Add GNU Findutils.

* distro/base.scm (findutils): New variable.
* distro/findutils-absolute-paths.patch: New file.
* Makefile.am (nobase_dist_guilemodule_DATA): Add it.
version-0.8.3
Ludovic Courtès 10 years ago
parent
commit
af5521ca01
  1. 1
      Makefile.am
  2. 42
      distro/base.scm
  3. 29
      distro/findutils-absolute-paths.patch

1
Makefile.am

@ -41,6 +41,7 @@ nobase_dist_guilemodule_DATA = \
distro/m4-readlink-EINVAL.patch \
distro/m4-s_isdir.patch \
distro/make-impure-dirs.patch \
distro/findutils-absolute-paths.patch \
distro/readline-link-ncurses.patch
nobase_nodist_guilemodule_DATA = $(GOBJECTS)

42
distro/base.scm

@ -177,6 +177,48 @@ files (as archives).")
(license "GPLv3+")
(home-page "http://www.gnu.org/software/tar/")))
(define-public findutils
(package
(name "findutils")
(version "4.4.2")
(source (origin
(method http-fetch)
(uri (string-append "http://ftp.gnu.org/gnu/findutils/findutils-"
version ".tar.gz"))
(sha256
(base32
"0amn0bbwqvsvvsh6drfwz20ydc2czk374lzw5kksbh6bf78k4ks3"))))
(build-system gnu-build-system)
(native-inputs
`(("patch/absolute-paths"
,(search-path %load-path "distro/findutils-absolute-paths.patch"))))
(arguments
(case-lambda
((system)
`(#:patches (list (assoc-ref %build-inputs "patch/absolute-paths"))))
((system cross-system)
;; Work around cross-compilation failure.
;; See <http://savannah.gnu.org/bugs/?27299#comment1>.
`(#:configure-flags '("gl_cv_func_wcwidth_works=yes")
,@(arguments cross-system)))))
(description "Basic directory searching utilities of the GNU operating
system")
(long-description
"The GNU Find Utilities are the basic directory searching utilities of
the GNU operating system. These programs are typically used in conjunction
with other programs to provide modular and powerful directory search and file
locating capabilities to other commands.
The tools supplied with this package are:
* find - search for files in a directory hierarchy;
* locate - list files in databases that match a pattern;
* updatedb - update a file name database;
* xargs - build and execute command lines from standard input.
")
(license "GPLv3+")
(home-page "http://www.gnu.org/software/findutils/")))
(define-public m4
(package
(name "m4")

29
distro/findutils-absolute-paths.patch

@ -0,0 +1,29 @@
Fix use of LFS-style absolute paths.
Patches from Nixpkgs by Armijn Hemel <armijn@gpl-violations.org>
and Wouter den Breejen <uu@denbreejen.net>.
diff -ruN findutils-4.2.20/locate/updatedb.sh findutils-4.2.20.new/locate/updatedb.sh
--- findutils-4.2.20/locate/updatedb.sh 2005-01-24 17:12:35.000000000 +0100
+++ findutils-4.2.20.new/locate/updatedb.sh 2005-08-23 14:37:10.000000000 +0200
@@ -141,7 +141,7 @@
: ${code:=${LIBEXECDIR}/@code@}
-PATH=/bin:/usr/bin:${BINDIR}; export PATH
+PATH=/bin:/usr/bin:${BINDIR}:${PATH}; export PATH
: ${PRUNEFS="nfs NFS proc afs proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs sysfs shfs"}
diff -Naur findutils-4.2.30/xargs/xargs.c findutils-4.2.30_new/xargs/xargs.c
--- findutils-4.2.30/xargs/xargs.c 2007-02-27 11:21:08.000000000 +0100
+++ findutils-4.2.30_new/xargs/xargs.c 2007-07-17 19:02:05.000000000 +0200
@@ -402,7 +402,7 @@
int show_limits = 0; /* --show-limits */
int always_run_command = 1;
char *input_file = "-"; /* "-" is stdin */
- char *default_cmd = "/bin/echo";
+ char *default_cmd = "echo";
int (*read_args) PARAMS ((void)) = read_line;
void (*act_on_init_result)(void) = noop;
int env_too_big = 0;
Loading…
Cancel
Save