autotools.mk: fix gettext fixup
[openwrt/staging/wigyori.git] / include / autotools.mk
index 4b48b389925b5ddb4392aa004a3e2e3c69fd82f5..eb52b55924e95b2975f44beeb575eae611f975d4 100644 (file)
@@ -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" && \