[vlc-devel] [PATCH v2 10/13] contrib: add UNPACK1 command to UNPACK and remove one directory level

Steve Lhomme robux4 at ycbcr.xyz
Tue Jul 7 08:29:31 CEST 2020


This is necessary for some targets that use more directory levels than usual.
---
 contrib/src/main.mak | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 6cf9037c92d..d5ddd3aad78 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -377,6 +377,10 @@ UNPACK = $(RM) -R $@ \
 	$(foreach f,$(filter %.tar.bz2,$^), && tar xvjfo $(f)) \
 	$(foreach f,$(filter %.tar.xz,$^), && tar xvJfo $(f)) \
 	$(foreach f,$(filter %.zip,$^), && unzip $(f))
+UNPACK1 = $(RM) -Rf $@ $(UNPACK_DIR) && mkdir -p $(UNPACK_DIR) \
+	$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xvzf $(f) --strip-components=1 -C $(UNPACK_DIR)) \
+	$(foreach f,$(filter %.tar.bz2,$^), && tar xvjf $(f) --strip-components=1 -C $(UNPACK_DIR)) \
+	$(foreach f,$(filter %.tar.xz,$^), && tar xvJf $(f) --strip-components=1 -C $(UNPACK_DIR))
 UNPACK_DIR = $(patsubst %.tar,%,$(basename $(notdir $<)))
 APPLY = (cd $(UNPACK_DIR) && patch -fp1) <
 pkg_static = (cd $(UNPACK_DIR) && $(SRC_BUILT)/pkg-static.sh $(1))
-- 
2.26.2



More information about the vlc-devel mailing list