summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/Makefile.autotools.in23
1 files changed, 19 insertions, 4 deletions
diff --git a/package/Makefile.autotools.in b/package/Makefile.autotools.in
index 29b482b66..5f2246e84 100644
--- a/package/Makefile.autotools.in
+++ b/package/Makefile.autotools.in
@@ -30,6 +30,8 @@
# list of (package) targets that must be built before foo
# FOO_AUTORECONF [YES/NO, default NO]
# run <autoreconf> before <configure>
+# FOO_LIBTOOL_PATCH [YES/NO, default YES]
+# Do you want the standard buildroot patch applied to ltmain.sh? (libtool)
# FOO_CONF_ENV [default empty]
# environment passed to the <configure> script
# FOO_CONF_OPT [default empty]
@@ -153,10 +155,17 @@ $(BUILD_DIR)/%/.stamp_extracted:
$(TAR) --strip-components=1 -C $(@D) $(TAR_OPTIONS) -
# some packages have messed up permissions inside
$(Q)chmod -R ug+rw $(@D)
+ $(Q)touch $@
+
+# Fix libtool support if required by the package
+$(BUILD_DIR)/%/.stamp_libtool_patch:
+ $(call MESSAGE,"Patching libtool")
# if the package uses libtool, patch it for cross-compiling in buildroot
+ $(Q)if test "$($(PKG)_LIBTOOL_PATCH)" = "YES"; then \
for i in `find $(@D) -name ltmain.sh`; do \
toolchain/patch-kernel.sh $${i%/*} package buildroot-libtool.patch; \
- done
+ done \
+ fi
$(Q)touch $@
# Patch
@@ -193,9 +202,11 @@ $(BUILD_DIR)/%/.stamp_autoconfigured:
$(call MESSAGE,"Running autoreconf")
$(Q)cd $(@D)/$($(PKG)_SUBDIR) && $(AUTORECONF)
# if the package uses libtool, patch it for cross-compiling in buildroot
+ if test "$($(PKG)_LIBTOOL_PATCH)" = "YES"; then \
$(Q)for i in `find $(@D)/$($(PKG)_SUBDIR) -name ltmain.sh`; do \
toolchain/patch-kernel.sh $${i%/*} package buildroot-libtool.patch; \
- done
+ done \
+ fi
$(Q)touch $@
# Configuring
@@ -287,6 +298,7 @@ $(2)_SITE ?= \
http://$$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/$(1)
$(2)_DEPENDENCIES ?=
$(2)_AUTORECONF ?= NO
+$(2)_LIBTOOL_PATCH ?= YES
$(2)_CONF_ENV ?=
$(2)_CONF_OPT ?=
$(2)_MAKE_ENV ?=
@@ -309,6 +321,7 @@ $(2)_TARGET_INSTALL_STAGING = $$($(2)_DIR)/.stamp_staging_installed
$(2)_TARGET_BUILD = $$($(2)_DIR)/.stamp_built
$(2)_TARGET_CONFIGURE = $$($(2)_DIR)/.stamp_configured
$(2)_TARGET_AUTORECONF = $$($(2)_DIR)/.stamp_autoconfigured
+$(2)_TARGET_LIBTOOL_PATCH = $$($(2)_DIR)/.stamp_libtool_patch
$(2)_TARGET_PATCH = $$($(2)_DIR)/.stamp_patched
$(2)_TARGET_EXTRACT = $$($(2)_DIR)/.stamp_extracted
$(2)_TARGET_SOURCE = $$($(2)_DIR)/.stamp_downloaded
@@ -357,7 +370,8 @@ $(1)-patch: $(1)-extract $$($(2)_TARGET_PATCH)
$(1)-extract: $(1)-depends \
$$($(2)_TARGET_EXTRACT) \
- $$($(2)_HOOK_POST_EXTRACT)
+ $$($(2)_HOOK_POST_EXTRACT) \
+ $$($(2)_TARGET_LIBTOOL_PATCH)
$(1)-depends: $(1)-source $$($(2)_DEPENDENCIES)
@@ -377,6 +391,7 @@ $$($(2)_TARGET_INSTALL_TARGET): PKG=$(2)
$$($(2)_TARGET_INSTALL_STAGING): PKG=$(2)
$$($(2)_TARGET_BUILD): PKG=$(2)
$$($(2)_TARGET_CONFIGURE): PKG=$(2)
+$$($(2)_TARGET_LIBTOOL_PATCH): PKG=$(2)
$$($(2)_TARGET_AUTORECONF): PKG=$(2)
$$($(2)_TARGET_PATCH): PKG=$(2)
$$($(2)_TARGET_EXTRACT): PKG=$(2)
@@ -385,7 +400,7 @@ $$($(2)_TARGET_UNINSTALL): PKG=$(2)
$$($(2)_TARGET_CLEAN): PKG=$(2)
$$($(2)_TARGET_DIRCLEAN): PKG=$(2)
$$($(2)_HOOK_POST_EXTRACT): PKG=$(2)
-$$($(2)_HOOK_POST_CONFIGURE): PKG=$(2)
+$$($(2)_HOOK_POST_CONFIGURE): PKG=$(2)
$$($(2)_HOOK_POST_BUILD): PKG=$(2)
$$($(2)_HOOK_POST_INSTALL): PKG=$(2)