mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-01 06:21:56 -09:00
Added the ability to patch ltmain.sh based on version
There are two versions of ltmain.sh in use in the buildroot system, 1.5.x and 2.2.x. buildroot-libtool.patch would only patch 1.5.x, which meant that for 2.2.x, a separate patch for the affected package had to be maintained. Modified Makefile.autotools.in to check the version of ltmain.sh and apply the correct patch. Signed-off-by: Martin Banky <Martin.Banky@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
fda95b5b10
commit
83af822f7b
@@ -139,10 +139,16 @@ $(2)_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
|
||||
#
|
||||
define LIBTOOL_PATCH_HOOK
|
||||
@$(call MESSAGE,"Patching libtool")
|
||||
$(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES" -a \
|
||||
"$$($$(PKG)_AUTORECONF)" != "YES"; then \
|
||||
for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \
|
||||
toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool.patch; \
|
||||
$(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES" \
|
||||
-a "$$($$(PKG)_AUTORECONF)" != "YES"; then \
|
||||
for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \
|
||||
ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | \
|
||||
sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \
|
||||
if test $$$${ltmain_version} = '1.5'; then \
|
||||
toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v1.5.patch; \
|
||||
elif test $$$${ltmain_version} = "2.2"; then\
|
||||
toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v2.2.patch; \
|
||||
fi \
|
||||
done \
|
||||
fi
|
||||
endef
|
||||
@@ -158,9 +164,14 @@ endif
|
||||
define AUTORECONF_HOOK
|
||||
@$(call MESSAGE,"Autoreconfiguring")
|
||||
$(Q)cd $$($$(PKG)_SRCDIR) && $(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT)
|
||||
$(Q)if test "$($$(PKG)_LIBTOOL_PATCH)" = "YES"; then \
|
||||
$(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES"; then \
|
||||
for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \
|
||||
toolchain/patch-kernel.sh $${i%/*} package buildroot-libtool.patch; \
|
||||
ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | sed 's/\([0-9].[0-9]*\).*/\1/'`; \
|
||||
if test $$$${ltmain_version} = "1.5"; then \
|
||||
toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v1.5.patch; \
|
||||
elif test $$$${ltmain_version} = "2.2"; then\
|
||||
toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v2.2.patch; \
|
||||
fi \
|
||||
done \
|
||||
fi
|
||||
endef
|
||||
|
||||
Reference in New Issue
Block a user