aboutsummaryrefslogtreecommitdiffstats
path: root/tools/coreutils/patches
diff options
context:
space:
mode:
authorMichael Pratt <mcpratt@pm.me>2023-03-23 03:49:01 -0400
committerChristian Marangi <ansuelsmth@gmail.com>2023-05-04 06:07:30 +0200
commit09f8f21ae33402201c14a125a37b64746415642d (patch)
treecd53d8bfdd5a9bae8c865aa62b2bde2408f1bc15 /tools/coreutils/patches
parent87e902fcdcce0e3d1287deb901f934aabf7ec183 (diff)
downloadupstream-09f8f21ae33402201c14a125a37b64746415642d.tar.gz
upstream-09f8f21ae33402201c14a125a37b64746415642d.tar.bz2
upstream-09f8f21ae33402201c14a125a37b64746415642d.zip
tools/coreutils: bootstrap to local gnulib source
Using the local gnulib source during bootstrap allows for fine-grained control over the macros and source files for use with coreutils but part of gnulib instead of coreutils, without having to wait for a release or deal with gnulib as a git submodule. In this case, the execution of autotools must be skipped by force. Autoconf and Automake during bootstrap on coreutils only works right when using directly checked-out source. There is a symbol in gnulib, @GNULIB_TIME@ that is not yet defined in coreutils source, so we use the backup of lib/time.in.h instead of the one provided by gnulib source. Signed-off-by: Michael Pratt <mcpratt@pm.me>
Diffstat (limited to 'tools/coreutils/patches')
-rw-r--r--tools/coreutils/patches/000-bootstrap.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/tools/coreutils/patches/000-bootstrap.patch b/tools/coreutils/patches/000-bootstrap.patch
new file mode 100644
index 0000000000..91be9d338a
--- /dev/null
+++ b/tools/coreutils/patches/000-bootstrap.patch
@@ -0,0 +1,45 @@
+--- a/bootstrap
++++ b/bootstrap
+@@ -278,7 +278,7 @@ check_exists() {
+ ($2 --version </dev/null)
+ fi
+ else
+- ($1 --version </dev/null) >/dev/null 2>&1
++ ($@ --version </dev/null) >/dev/null 2>&1
+ fi
+
+ test $? -lt 126
+@@ -563,7 +563,7 @@ p
+ q'
+
+ get_version() {
+- app=$1
++ app="$@"
+
+ $app --version >/dev/null 2>&1 || { $app --version; return 1; }
+
+@@ -620,13 +620,13 @@ check_versions() {
+ if [ "$req_ver" = "-" ]; then
+ # Merely require app to exist; not all prereq apps are well-behaved
+ # so we have to rely on $? rather than get_version.
+- if ! check_exists --verbose $app; then
++ if ! check_exists --verbose "$app"; then
+ warn_ "Error: '$app' not found"
+ ret=1
+ fi
+ else
+ # Require app to produce a new enough version string.
+- inst_ver=$(get_version $app)
++ inst_ver=$(get_version "$app")
+ if [ ! "$inst_ver" ]; then
+ warn_ "Error: '$app' not found"
+ ret=1
+@@ -923,7 +923,7 @@ version_controlled_file() {
+ # two just-pre-run programs.
+
+ # Import from gettext.
+-with_gettext=yes
++with_gettext=no
+ grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
+ with_gettext=no
+