[openwrt/openwrt] autotools.mk: fix gettext fixup

LEDE Commits lede-commits at lists.infradead.org
Tue Feb 23 18:31:05 EST 2021


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/90b1524f75023ad0f441e82773ca9e9b5d513e1a

commit 90b1524f75023ad0f441e82773ca9e9b5d513e1a
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Wed Feb 17 02:51:10 2021 -0800

    autotools.mk: fix gettext fixup
    
    The update to gettext 0.21 broke packages that use autotools and
    gettext because the sed line was failing with the new version. Fix with
    a better sed expression.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 include/autotools.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/autotools.mk b/include/autotools.mk
index 4b48b38992..eb52b55924 100644
--- a/include/autotools.mk
+++ b/include/autotools.mk
@@ -90,7 +90,7 @@ endef
 
 define gettext_version_target
 	(cd $(PKG_BUILD_DIR) && \
-		GETTEXT_VERSION=$(shell $(STAGING_DIR_HOSTPKG)/bin/gettext -V | $(STAGING_DIR_HOST)/bin/sed -ne '1s/.*\([0-9]\.[0-9]\{2\}\.[0-9]\).*/\1/p' ) && \
+		GETTEXT_VERSION=$(shell $(STAGING_DIR_HOSTPKG)/bin/gettext -V | $(STAGING_DIR_HOST)/bin/sed -rne '1s/.*\b([0-9]\.[0-9]+(\.[0-9]+)?)\b.*/\1/p' ) && \
 		$(STAGING_DIR_HOST)/bin/sed \
 			-i $(PKG_BUILD_DIR)/configure.ac \
 			-e "s/AM_GNU_GETTEXT_VERSION(.*)/AM_GNU_GETTEXT_VERSION(\[$$$$GETTEXT_VERSION\])/g" && \



More information about the lede-commits mailing list