[vlc-devel] [PATCH] contrib: use a variable for tar

Rafaël Carré funman at videolan.org
Sat Nov 26 21:48:02 CET 2011


we'll use it to force our extras/tools build to be used
---
 contrib/src/main.mak |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index db16e50..a296526 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -192,6 +192,7 @@ endif
 #
 # Common helpers
 #
+TAR?=tar
 HOSTCONF := --prefix="$(PREFIX)"
 HOSTCONF += --build="$(BUILD)" --host="$(HOST)" --target="$(HOST)"
 HOSTCONF += --program-prefix=""
@@ -236,9 +237,9 @@ checksum = \
 		"$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS"
 CHECK_SHA512 = $(call checksum,$(SHA512SUM),SHA512)
 UNPACK = $(RM) -R $@ \
-	$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xvzf $(f)) \
-	$(foreach f,$(filter %.tar.bz2,$^), && tar xvjf $(f)) \
-	$(foreach f,$(filter %.tar.xz,$^), && tar xvJf $(f)) \
+	$(foreach f,$(filter %.tar.gz %.tgz,$^), && $(TAR) xvzf $(f)) \
+	$(foreach f,$(filter %.tar.bz2,$^), && $(TAR) xvjf $(f)) \
+	$(foreach f,$(filter %.tar.xz,$^), && $(TAR) xvJf $(f)) \
 	$(foreach f,$(filter %.zip,$^), && unzip $(f))
 UNPACK_DIR = $(basename $(basename $(notdir $<)))
 APPLY = (cd $(UNPACK_DIR) && patch -p1) <
@@ -305,7 +306,7 @@ package: install
 		rm -Rf man sbin etc lib/lua lib/sidplay
 	cp $(SRC)/change_prefix.sh tmp/$(notdir $(PREFIX))/
 	cd tmp/$(notdir $(PREFIX)) && ./change_prefix.sh $(PREFIX) @@CONTRIB_PREFIX@@
-	(cd tmp && tar c $(notdir $(PREFIX))/) | bzip2 -c > ../vlc-contrib-$(HOST)-$(DATE).tar.bz2
+	(cd tmp && $(TAR) c $(notdir $(PREFIX))/) | bzip2 -c > ../vlc-contrib-$(HOST)-$(DATE).tar.bz2
 
 list:
 	@echo All packages:
-- 
1.7.7.1



More information about the vlc-devel mailing list