summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorDaniel Laird <danieljlaird@hotmail.com>2008-09-19 13:37:14 +0000
committerDaniel Laird <danieljlaird@hotmail.com>2008-09-19 13:37:14 +0000
commit4ab8aa443baf16e2a15844d8edfad2a198025a16 (patch)
tree48d8a3a778af15eeaf2e1470a7e13363f28a50f5 /package
parent0b8ba16bc4d937c1d0f48c110a6f89233d07eece (diff)
downloadbuildroot-novena-4ab8aa443baf16e2a15844d8edfad2a198025a16.tar.gz
buildroot-novena-4ab8aa443baf16e2a15844d8edfad2a198025a16.zip
Makefile.autotools.in: Extended to cope with more bad packages
1. I added a HOOK_POST_EXTRACT previously so that I could cope with the bad libxml2 package. This required me to remove some dead patches (.rej) files after I extracted the package, the issue is that the EXTRACT target runs patch-kernel.sh to patch the ltmain.sh. It then finds some.rej files and bombs out. I have altered the sequence so that the HOOK_POST_EXTRACT target runs before the make target that patches libtool to deal with this. 2.) I have added a $(PKG)_LIBTOOL_PATCH variable. This is defaulted to YES however if you override it in the package makefile to NO then the ltmain.sh file will not be patched automatically but only if you have added your own patches. This is necessary for freetype 2.3.7 as it cannot use the buildroot-libtool patch. I am using this patch for building a set of packages, however it is not a complete set of packages so await feedback of issues (if any) Daniel Laird
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)