icoutils/0005-bootstrap-Run-gnulib-tool-if-available.patch
Richard W.M. Jones 86a1ed311e Add a series of upstream patches to enable compiler warnings and
fix multiple issues.

Revert one of the checks which breaks processing of PE binaries.

Removed the 'Group' line, not needed with modern Fedora/RPM.
2017-03-10 12:18:04 +00:00

84 lines
2.1 KiB
Diff

From a80b70d60112354fc53c79df97c7a359ebff9c9e Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 9 Mar 2017 12:23:38 +0000
Subject: [PATCH 05/26] bootstrap: Run gnulib-tool if available.
For most people using icoutils from git, compilation won't work unless
they update gnulib modules. This runs gnulib-tool from ../gnulib or
another directory (pointed to by $GNULIB_SRCDIR) or else prints
instructions on how to update gnulib modules.
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
---
bootstrap | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 53 insertions(+), 1 deletion(-)
diff --git a/bootstrap b/bootstrap
index 816fd63..dce9299 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,7 +1,59 @@
-#!/bin/sh
+#!/bin/bash
set -e
+GNULIB_SRCDIR=${GNULIB_SRCDIR:-../gnulib}
+gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
+
+if $gnulib_tool --version >/dev/null 2>&1; then
+ echo "Updating gnulib files from $GNULIB_SRCDIR"
+
+ $gnulib_tool \
+ --import \
+ --lib=libgnu \
+ --source-base=lib \
+ --m4-base=m4 \
+ --doc-base=. \
+ --tests-base=test \
+ --aux-dir=build-aux \
+ --no-conditional-dependencies \
+ --no-libtool \
+ --macro-prefix=gl \
+ byteswap \
+ configmake \
+ dirname \
+ dup2 \
+ getline \
+ getopt-gnu \
+ gettext \
+ gettimeofday \
+ lstat \
+ malloc-gnu \
+ memchr \
+ minmax \
+ progname \
+ stdbool \
+ stdint \
+ strcase \
+ strdup-posix \
+ strerror \
+ strndup \
+ strstr \
+ vasprintf \
+ version-etc \
+ xalloc \
+ xalloc-die \
+ xvasprintf
+else
+ echo "***"
+ echo "Warning: Not updating gnulib files"
+ echo "***"
+ echo "If you get errors in the lib/ directory, then check out gnulib"
+ echo "from git and set \$GNULIB_SRCDIR to point to that directory."
+ echo "If you have gnulib in ../gnulib then it will be used automatically."
+ echo "***"
+fi
+
aclocal -I m4
autoheader
libtoolize --force -c
--
2.10.2