aboutsummaryrefslogtreecommitdiffstats
path: root/tools/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'tools/coreutils')
-rw-r--r--tools/coreutils/Makefile45
-rw-r--r--tools/coreutils/patches/000-bootstrap.patch45
2 files changed, 83 insertions, 7 deletions
diff --git a/tools/coreutils/Makefile b/tools/coreutils/Makefile
index 537ece57cc5..86302862060 100644
--- a/tools/coreutils/Makefile
+++ b/tools/coreutils/Makefile
@@ -8,30 +8,61 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=coreutils
PKG_CPE_ID:=cpe:/a:gnu:coreutils
-PKG_VERSION:=8.32
+PKG_VERSION:=9.3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/coreutils
-PKG_HASH:=4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa
+PKG_HASH:=adbcfcfe899235b71e8768dcf07cd532520b7f54f9a8064843f8d199a904bbaa
HOST_BUILD_PARALLEL := 1
-BUILD_PROGRAMS = date readlink touch ln
+PKG_PROGRAMS:=date readlink touch ln chown ginstall
include $(INCLUDE_DIR)/host-build.mk
-BUILD_BINS = $(patsubst %,src/%,$(BUILD_PROGRAMS))
+export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
HOST_CONFIGURE_ARGS += \
- --enable-install-program=$(subst $(space),$(comma),$(strip $(BUILD_PROGRAMS)))
+ --enable-install-program=$(subst $(space),$(comma),$(strip $(PKG_PROGRAMS)))
HOST_MAKE_FLAGS += \
- PROGRAMS="$(BUILD_BINS)" \
+ $(AM_TOOL_PATHS_FAKE) \
+ PROGRAMS="$(patsubst %,src/%,$(PKG_PROGRAMS))" \
LIBRARIES= MANS= SUBDIRS=.
+define Host/Bootstrap
+ ( \
+ cd $(HOST_BUILD_DIR); \
+ $(AM_TOOL_PATHS_FAKE) \
+ ./bootstrap \
+ --bootstrap-sync \
+ --force \
+ --no-git \
+ --skip-po \
+ --gnulib-srcdir=$(GNULIB_SRCDIR) \
+ )
+endef
+
+define Host/Prepare
+ $(call Host/Prepare/Default)
+ $(if $(QUILT),,$(call Host/Bootstrap))
+endef
+
+define Host/Configure
+ $(if $(QUILT),$(call Host/Bootstrap))
+ -$(CP) $(HOST_BUILD_DIR)/lib/time.in.h~ $(HOST_BUILD_DIR)/lib/time.in.h # @GNULIB_TIME@ not defined
+ $(call Host/Configure/Default)
+endef
+
define Host/Install
$(INSTALL_DIR) $(1)/bin
- $(CP) $(patsubst %,$(HOST_BUILD_DIR)/%,$(BUILD_BINS)) $(1)/bin/
+ $(INSTALL_BIN) $(patsubst %,$(HOST_BUILD_DIR)/src/%,$(PKG_PROGRAMS)) $(1)/bin/
+ ln -sf ginstall $(1)/bin/install
+endef
+
+define Host/Uninstall
+ rm -f $(STAGING_DIR_HOST)/bin/install
+ -$(call Host/Compile/Default,uninstall)
endef
$(eval $(call HostBuild))
diff --git a/tools/coreutils/patches/000-bootstrap.patch b/tools/coreutils/patches/000-bootstrap.patch
new file mode 100644
index 00000000000..91be9d338a2
--- /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
+