Skip to contentSkip to conversation

pkg-autotools: fix whitespace regex in libtool patch hook

PATCH New Danomi Manchego 2 participants 2 messages Jul 7, 2015 – Jul 9, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pkg-autotools: fix whitespace regex in libtool patch hook

The first sed line for ltmain_version attempts to match whitespace before VERSION with [ space_character tab_character ]. The second sed line used to make ltmain_patchlevel has only space characters in the whitespace expression, possibly due to a smart editor automatically converting tabs to spaces. Make these lines consistent with each other and more resilient against accidental loss of tab characters by replacing the tabs with '\t'.

---
 package/pkg-autotools.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/pkg-autotools.mk +2 -2
index 54f5dcd..c748c78 100644
@@ -60,9 +60,9 @@ endef
 define LIBTOOL_PATCH_HOOK
 	@$(call MESSAGE,"Patching libtool")
 	$(Q)for i in `find $($(PKG)_SRCDIR) -name ltmain.sh`; do \
-		ltmain_version=`sed -n '/^[ 	]*VERSION=/{s/^[ 	]*VERSION=//;p;q;}' $$i | \
+		ltmain_version=`sed -n '/^[ \t]*VERSION=/{s/^[ \t]*VERSION=//;p;q;}' $$i | \
 		sed -e 's/\([0-9]*\.[0-9]*\).*/\1/' -e 's/\"//'`; \
-		ltmain_patchlevel=`sed -n '/^[     ]*VERSION=/{s/^[        ]*VERSION=//;p;q;}' $$i | \
+		ltmain_patchlevel=`sed -n '/^[ \t]*VERSION=/{s/^[ \t]*VERSION=//;p;q;}' $$i | \
 		sed -e 's/\([0-9]*\.[0-9]*\.*\)\([0-9]*\).*/\2/' -e 's/\"//'`; \
 		if test $${ltmain_version} = '1.5'; then \
 			$(APPLY_PATCHES) $${i%/*} support/libtool buildroot-libtool-v1.5.patch; \
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 pkg-autotools: fix whitespace regex in libtool patch hook

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Danomi" == Danomi Manchego <[email protected]> writes:

The first sed line for ltmain_version attempts to match whitespace before VERSION with [ space_character tab_character ]. The second sed line used to make ltmain_patchlevel has only space characters in the whitespace expression, possibly due to a smart editor automatically converting tabs to spaces. Make these lines consistent with each other and more resilient against accidental loss of tab characters by replacing the tabs with '\t'.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard