[vlc-devel] [PATCH v3 7/9] contrib: use UNPACK in targets using --strip-components=1

Steve Lhomme robux4 at ycbcr.xyz
Fri Jul 10 10:25:19 CEST 2020


They don't actually need some special treatment. They extract properly in the
expected folder given their tarball name.
---
 contrib/src/bitstream/rules.mak    | 4 +---
 contrib/src/ffmpeg/rules.mak       | 4 +---
 contrib/src/fxc2/rules.mak         | 4 +---
 contrib/src/glslang/rules.mak      | 4 +---
 contrib/src/medialibrary/rules.mak | 4 +---
 contrib/src/x264/rules.mak         | 4 +---
 6 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/contrib/src/bitstream/rules.mak b/contrib/src/bitstream/rules.mak
index 0310f8a25bc..36a184d603d 100644
--- a/contrib/src/bitstream/rules.mak
+++ b/contrib/src/bitstream/rules.mak
@@ -12,9 +12,7 @@ $(TARBALLS)/bitstream-$(BITSTREAM_VERSION).tar.xz:
 	touch $@
 
 bitstream: bitstream-$(BITSTREAM_VERSION).tar.xz .sum-bitstream
-	rm -rf $@-$(BITSTREAM_VERSION) $@
-	mkdir -p $@-$(BITSTREAM_VERSION)
-	tar xvf "$<" --strip-components=1 -C $@-$(BITSTREAM_VERSION)
+	$(UNPACK)
 	$(MOVE)
 
 .bitstream: bitstream
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index a61adfbb3bc..be625e44784 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -229,9 +229,7 @@ $(TARBALLS)/ffmpeg-$(FFMPEG_BASENAME).tar.xz:
 	touch $@
 
 ffmpeg: ffmpeg-$(FFMPEG_BASENAME).tar.xz .sum-ffmpeg
-	rm -Rf $@ $@-$(FFMPEG_BASENAME)
-	mkdir -p $@-$(FFMPEG_BASENAME)
-	tar xvJfo "$<" --strip-components=1 -C $@-$(FFMPEG_BASENAME)
+	$(UNPACK)
 ifdef USE_FFMPEG
 	$(APPLY) $(SRC)/ffmpeg/armv7_fixup.patch
 	$(APPLY) $(SRC)/ffmpeg/dxva_vc1_crash.patch
diff --git a/contrib/src/fxc2/rules.mak b/contrib/src/fxc2/rules.mak
index 2e48d76df2f..800a8fad587 100644
--- a/contrib/src/fxc2/rules.mak
+++ b/contrib/src/fxc2/rules.mak
@@ -14,9 +14,7 @@ $(TARBALLS)/fxc2-$(FXC2_VERSION).tar.xz:
 	touch $@
 
 fxc2: fxc2-$(FXC2_VERSION).tar.xz .sum-fxc2
-	rm -rf $@-$(FXC2_VERSION) $@
-	mkdir -p $@-$(FXC2_VERSION)
-	tar xvf "$<" --strip-components=1 -C $@-$(FXC2_VERSION)
+	$(UNPACK)
 	$(APPLY) $(SRC)/fxc2/0001-make-Vn-argument-as-optional-and-provide-default-var.patch
 	$(APPLY) $(SRC)/fxc2/0002-accept-windows-style-flags-and-splitted-argument-val.patch
 	$(APPLY) $(SRC)/fxc2/0004-Revert-Fix-narrowing-conversion-from-int-to-BYTE.patch
diff --git a/contrib/src/glslang/rules.mak b/contrib/src/glslang/rules.mak
index 565f8c075d9..32c680b9f07 100644
--- a/contrib/src/glslang/rules.mak
+++ b/contrib/src/glslang/rules.mak
@@ -17,9 +17,7 @@ $(TARBALLS)/glslang-$(GLSLANG_BASENAME).tar.xz:
 	touch $@
 
 glslang: glslang-$(GLSLANG_BASENAME).tar.xz .sum-glslang
-	rm -Rf $@ $@-$(GLSLANG_BASENAME)
-	mkdir -p $@-$(GLSLANG_BASENAME)
-	tar xvJf "$<" --strip-components=1 -C $@-$(GLSLANG_BASENAME)
+	$(UNPACK)
 	$(APPLY) $(SRC)/glslang/glslang-win32.patch
 	$(APPLY) $(SRC)/glslang/remove-broken-code.patch
 	$(MOVE)
diff --git a/contrib/src/medialibrary/rules.mak b/contrib/src/medialibrary/rules.mak
index 1d958318417..ff6d7c40d51 100644
--- a/contrib/src/medialibrary/rules.mak
+++ b/contrib/src/medialibrary/rules.mak
@@ -17,9 +17,7 @@ $(TARBALLS)/medialibrary-$(MEDIALIBRARY_VERSION).tar.xz:
 	touch $@
 
 medialibrary: medialibrary-$(MEDIALIBRARY_VERSION).tar.xz .sum-medialibrary
-	rm -rf $@-$(MEDIALIBRARY_VERSION) $@
-	mkdir -p $@-$(MEDIALIBRARY_VERSION)
-	tar xvf "$<" --strip-components=1 -C $@-$(MEDIALIBRARY_VERSION)
+	$(UNPACK)
 	$(call pkg_static, "medialibrary.pc.in")
 	$(UPDATE_AUTOCONFIG)
 	$(MOVE)
diff --git a/contrib/src/x264/rules.mak b/contrib/src/x264/rules.mak
index 75afe661f56..d69f7508c5c 100644
--- a/contrib/src/x264/rules.mak
+++ b/contrib/src/x264/rules.mak
@@ -69,9 +69,7 @@ $(TARBALLS)/$(X264_BASENAME):
 .sum-x264: $(X264_BASENAME)
 
 x264 x26410b: %: $(X264_BASENAME) .sum-%
-	rm -Rf $(UNPACK_DIR)
-	mkdir -p $(UNPACK_DIR)
-	tar xvjfo "$<" --strip-components=1 -C $(UNPACK_DIR)
+	$(UNPACK)
 	$(UPDATE_AUTOCONFIG)
 	$(APPLY) $(SRC)/x264/x264-winstore.patch
 	$(MOVE)
-- 
2.26.2



More information about the vlc-devel mailing list