1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-19 05:58:53 +02:00
openwrt/tools/coreutils/Makefile
Michael Pratt 44625e9d95 tools/coreutils: update to 9.5
Update to latest stable release.

The following commits in gnulib caused a conflict in locally bootstrapped
coreutils with stable gnulib:

  8f4b4e52c991de2233b471f8e35a068866b31f01
  2749234203959df8d72cd8638d4e00a9fff450db

A module (strftime) was marked deprecated and replaced by another module
(nstrftime) in the version of gnulib that coreutils was released with
compared to the stable branch that we use for importing. Conflicts from
the previous version of coreutils are now gone, so other imported headers
are now good.

Refresh patch:
 - 000-bootstrap.patch

Remove upstreamed patch:
 - 001-bootstrap-sync.patch

Link: https://lists.gnu.org/archive/html/coreutils/2024-03/msg00132.html
Tested-by: Georgi Valkov <gvalkov@gmail.com> # MacOS
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2024-04-25 21:33:51 +02:00

75 lines
1.7 KiB
Makefile

#
# Copyright (C) 2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=coreutils
PKG_CPE_ID:=cpe:/a:gnu:coreutils
PKG_VERSION:=9.5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/coreutils
PKG_HASH:=767ae6a22950ec42f3ba5f7c1de79dd27800ee8e9b8642da5dedb5974a1741e5
HOST_BUILD_PARALLEL := 1
PKG_PROGRAMS:=date readlink touch ln chown ginstall
include $(INCLUDE_DIR)/host-build.mk
export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
HOST_GNULIB_SKIP := \
lib/nstrftime.c \
lib/fprintftime.c \
lib/locale.in.h
HOST_CONFIGURE_ARGS += \
--disable-year2038 \
--enable-install-program=$(subst $(space),$(comma),$(strip $(PKG_PROGRAMS)))
HOST_MAKE_FLAGS += \
$(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))
$(foreach src,$(HOST_GNULIB_SKIP),mv -f $(HOST_BUILD_DIR)/$(src)~ $(HOST_BUILD_DIR)/$(src) || true; )
$(call Host/Configure/Default)
endef
define Host/Install
$(INSTALL_DIR) $(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))