[vlc-commits] [Git][videolan/vlc][master] 19 commits: CI: Update all docker images to support zstd

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Jul 9 14:57:57 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
19f46e56 by Matthias Dressel at 2026-07-09T14:20:06+00:00
CI: Update all docker images to support zstd

- - - - -
98efd7a1 by Matthias Dressel at 2026-07-09T14:20:06+00:00
extras/tools: Fix tar compilation

This has been broken since ee9ea36529e70199d5c81894e1e8dae6b7cd4446.

The first instruction in the recipe is `cd $<`.
"'$<' The name of the first prerequisite." [1]

Ref: videolan/vlc!5356
[1] https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html

- - - - -
b8f52c7e by Matthias Dressel at 2026-07-09T14:20:06+00:00
extras/tools: bootstrap: Build zstd

When installing the library on macOS there is a race condition around
creating the `build/lib` directory which causes the install to sometimes
fail.
Fortunately, `bsdtar` calls the `zstd` binary directly so we don't
actually need to build the library.

- - - - -
69bfc78c by Matthias Dressel at 2026-07-09T14:20:06+00:00
extras/tools: bootstrap: Check zstd version

zstd 1.2.0 introduced `--threads`

[1] https://github.com/facebook/zstd/releases/tag/v1.2.0

- - - - -
12a74ad1 by Matthias Dressel at 2026-07-09T14:20:06+00:00
extras/tools: bootstrap: Check for zstd support in tar

Checking for the typical error messages from GNU tar and bsdtar.

- - - - -
e0a6f726 by Matthias Dressel at 2026-07-09T14:20:06+00:00
extras/tools: bootstrap: Check tar for compression auto-detection

This checks both auto-compress in create mode based on archive suffix
and auto-detection in extract mode based on file magic.

I believe it's reasonable to assume that, if it works for gzip, it works
for all compression schemes.

GNU tar has supported auto-detecting since 1.15 [1] and auto-compress
since 1.20 [2].
bsdtar has supported auto-detecting since before their initial git
commit [3] and auto-compress since 3.1.0 [4].

[1] https://cgit.git.savannah.gnu.org/cgit/tar.git/commit/?id=4674867a23ed4b42b0a84102331d369f6fc7e467
[2] https://cgit.git.savannah.gnu.org/cgit/tar.git/commit/?id=620a136e74f211c2fb98b45fe44261d5d775f6a9
[3] https://github.com/libarchive/libarchive/blob/8f776fd9f7b07842fdb5801af7128808860cbe35/tar/bsdtar.1#L413
[4] https://github.com/libarchive/libarchive/commit/d06fc9e5e4a47d022188d4b10202873c5d995b6e

- - - - -
08ff8fe4 by Matthias Dressel at 2026-07-09T14:20:06+00:00
CI: Add build tools on macOS/iOS to PATH

Required for `zstd` on macOS.

- - - - -
3b3952ce by Matthias Dressel at 2026-07-09T14:20:06+00:00
contrib: Add ability to unpack zstd compressed tarballs

- - - - -
598edcb9 by Matthias Dressel at 2026-07-09T14:20:06+00:00
extras/tools: Add ability to unpack zstd compressed tarballs

- - - - -
ff378249 by Matthias Dressel at 2026-07-09T14:20:06+00:00
contrib: Simplify extracting compressed tarballs

Both bsdtar (MacOS) and GNU tar[1] automatically detect compression
schemes through magic bytes.

bsdtar even goes as far as saying "In extract or list modes, this option
is ignored." in the man page.

[1] https://www.gnu.org/software/tar/manual/html_node/gzip.html

- - - - -
d050ed73 by Matthias Dressel at 2026-07-09T14:20:06+00:00
extras/tools: Simplify extracting compressed tarballs

Both bsdtar (MacOS) and GNU tar[1] automatically detect compression
schemes through magic bytes.

bsdtar even goes as far as saying "In extract or list modes, this option
is ignored." in the man page.

[1] https://www.gnu.org/software/tar/manual/html_node/gzip.html

- - - - -
5347d1fa by Matthias Dressel at 2026-07-09T14:20:06+00:00
contrib: Use tar's native change directory feature

Saves spawning a subshell.

- - - - -
04a63aaf by Matthias Dressel at 2026-07-09T14:20:06+00:00
contrib: Create zstd compressed tarballs instead of bzip2

zstd is much faster and compresses smaller.

zstd level 12 is a good compromise between speed and size. [1]

Piping to `zstd` seems to be the most portable way to pass parameters to
the compression tool.

[1] https://www.arp242.net/cmp-compress.html

- - - - -
256fb162 by Matthias Dressel at 2026-07-09T14:20:06+00:00
contrib: rust: Add ability to unpack zstd compressed tarballs

- - - - -
e32bc136 by Matthias Dressel at 2026-07-09T14:20:06+00:00
contrib: rust: Simplify extracting compressed tarballs

- - - - -
75652755 by Matthias Dressel at 2026-07-09T14:20:06+00:00
contrib: rust: Create zstd compressed tarballs instead of bzip2

zstd is much faster and compresses smaller.

zstd level 12 is a good compromise between speed and size. [1]

Piping to `zstd` seems to be the most portable way to pass parameters to
the compression tool.

[1] https://www.arp242.net/cmp-compress.html

- - - - -
0db4148a by Matthias Dressel at 2026-07-09T14:20:06+00:00
contrib: rust: Sanitize cargo-vendor-archive.sh

Fix all warnings from shellcheck.

- - - - -
d7ebf2aa by Matthias Dressel at 2026-07-09T14:20:06+00:00
contrib: rust: cargo-vendor-archive.sh: Create zstd compressed tarballs

- - - - -
8715c6fd by Matthias Dressel at 2026-07-09T14:20:06+00:00
contrib: rav1e: Switch to zstd compressed vendor tarballs

- - - - -


10 changed files:

- contrib/cargo-vendor-archive.sh
- contrib/src/main-rust.mak
- contrib/src/main.mak
- contrib/src/rav1e/rules.mak
- extras/ci/gitlab-ci.yml
- extras/package/snap/snapcraft.yaml
- extras/tools/SHA512SUMS
- extras/tools/bootstrap
- extras/tools/packages.mak
- extras/tools/tools.mak


Changes:

=====================================
contrib/cargo-vendor-archive.sh
=====================================
@@ -11,7 +11,7 @@ Fetch and archive all dependencies from a Rust archive using 'cargo vendor'.
 EOF
 }
 
-if [ "x$1" = "x" ]; then
+if [ "$#" -lt 1 ]; then
     usage
     exit 1
 fi
@@ -20,25 +20,25 @@ fi
 CARGO=cargo
 
 # Extract archive into a tmp dir
-TMP_DIR=.tmp-$(basename $1)
-rm -rf ${TMP_DIR}
-mkdir ${TMP_DIR}
+TMP_DIR=.tmp-$(basename "$1")
+rm -rf "${TMP_DIR}"
+mkdir "${TMP_DIR}"
 
-tar xf "$1" -C ${TMP_DIR}
-cd ${TMP_DIR}/*
+tar xf "$1" -C "${TMP_DIR}"
+cd "${TMP_DIR}"/*
 
 # Fetch all dependencies
 eval ${CARGO} vendor --locked
 
 # Archive all dependencies
-name=$(basename `pwd`)-vendor
-tar -jcf "../../${name}.tar.bz2" vendor --transform "s,vendor,${name},"
+name=$(basename "$PWD")-vendor
+tar -c vendor --transform "s,vendor,${name}," | zstd --quiet --force --threads=0 -12 -o "../../${name}.tar.zst"
 cd ../..
-rm -rf ${TMP_DIR}
+rm -rf "${TMP_DIR}"
 
 echo ""
-echo "Please upload this package '${name}.tar.bz2' to our VideoLAN FTP,"
+echo "Please upload this package '${name}.tar.zst' to our VideoLAN FTP,"
 echo ""
 echo "and write the following checksum into the contrib/src/<project>/cargo-vendor-SHA512SUMS:"
 echo ""
-sha512sum ${name}.tar.bz2
+sha512sum "${name}.tar.zst"


=====================================
contrib/src/main-rust.mak
=====================================
@@ -114,7 +114,7 @@ download_vendor = \
                tar xzfo $(TARBALLS)/$(3) -C vendor-$(2)-build --strip-components=1 && \
                cd vendor-$(2)-build && \
                $(CARGO_NATIVE) vendor --locked $(patsubst %.tar,%,$(basename $(notdir $(1)))) && \
-               tar -jcf $(1) $(patsubst %.tar,%,$(basename $(notdir $(1)))) && \
+               tar -c $(patsubst %.tar,%,$(basename $(notdir $(1)))) | zstd --quiet --force --threads=0 -12 -o $(1) && \
                cd .. && \
                install vendor-$(2)-build/$(1) "$(TARBALLS)" && \
                $(RM) -R vendor-$(2)-build && \
@@ -123,7 +123,7 @@ download_vendor = \
                rm $@);
 
 .sum-vendor-%: $(SRC)/%/vendor-SHA512SUMS
-	$(foreach f,$(filter %.tar.bz2,$^), if test ! -f $(f).skip-hash; then \
+	$(foreach f,$(filter %.tar.bz2 %.tar.zst,$^), if test ! -f $(f).skip-hash; then \
 		$(call checksum,$(SHA512SUM),vendor-SHA512,.sum-vendor-); \
 	fi)
 	touch $@
@@ -134,8 +134,8 @@ download_vendor = \
 .%-vendor: $(SRC)/%-vendor/SHA512SUMS
 	$(RM) -R $(patsubst .%,%,$@)
 	-$(call checksum,$(SHA512SUM),SHA512,.) \
-		$(foreach f,$(filter %.tar.bz2,$^), && tar $(TAR_VERBOSE)xjfo $(f) && \
-		  mv $(patsubst %.tar.bz2,%,$(notdir $(f))) $(patsubst .%,%,$@))
+		$(foreach f,$(filter %.tar.bz2 %.tar.zst,$^), && tar $(TAR_VERBOSE)xfo $(f) && \
+		  mv $(patsubst %.tar,%,$(basename $(notdir $(f)))) $(patsubst .%,%,$@))
 	touch $@
 
 cargo_vendor_setup = \


=====================================
contrib/src/main.mak
=====================================
@@ -469,9 +469,7 @@ checksum = \
 		"$(SRC)/$(patsubst $(3)%,%,$@)/$(2)SUMS"
 CHECK_SHA512 = $(call checksum,$(SHA512SUM),SHA512,.sum-)
 UNPACK = $(RM) -R $@ \
-	$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar $(TAR_VERBOSE)xzfo $(f)) \
-	$(foreach f,$(filter %.tar.bz2,$^), && tar $(TAR_VERBOSE)xjfo $(f)) \
-	$(foreach f,$(filter %.tar.xz,$^), && tar $(TAR_VERBOSE)xJfo $(f)) \
+	$(foreach f,$(filter %.tar.gz %.tgz %.tar.bz2 %.tar.xz %.tar.zst,$^), && tar $(TAR_VERBOSE)xfo $(f)) \
 	$(foreach f,$(filter %.zip,$^), && unzip $(ZIP_QUIET) $(f) $(UNZIP_PARAMS))
 UNPACK_DIR = $(patsubst %.tar,%,$(basename $(notdir $<)))
 APPLY = (cd $(UNPACK_DIR) && patch -fp1) <
@@ -742,12 +740,12 @@ distclean: clean
 	$(RM) config.mak
 	unlink Makefile
 
-PREBUILT_URL=https://download.videolan.org/pub/videolan/contrib/$(HOST)/vlc-contrib-$(HOST)-latest.tar.bz2
+PREBUILT_URL=https://download.videolan.org/pub/videolan/contrib/$(HOST)/vlc-contrib-$(HOST)-latest.tar.zst
 
-vlc-contrib-$(HOST)-latest.tar.bz2:
+vlc-contrib-$(HOST)-latest.tar.zst:
 	$(call download,$(PREBUILT_URL))
 
-prebuilt: vlc-contrib-$(HOST)-latest.tar.bz2
+prebuilt: vlc-contrib-$(HOST)-latest.tar.zst
 	$(RM) -r $(PREFIX)
 	$(UNPACK)
 	mv $(HOST) $(PREFIX)
@@ -765,7 +763,7 @@ package: install
 ifneq ($(notdir $(PREFIX)),$(HOST))
 	(cd tmp && mv $(notdir $(PREFIX)) $(HOST))
 endif
-	(cd tmp && tar c $(HOST)/) | bzip2 -c > ../vlc-contrib-$(HOST)-$(DATE).tar.bz2
+	tar -c -C tmp $(HOST)/ | zstd --quiet --force --threads=0 -12 -o ../vlc-contrib-$(HOST)-$(DATE).tar.zst
 
 list:
 	@echo All packages:


=====================================
contrib/src/rav1e/rules.mak
=====================================
@@ -25,12 +25,12 @@ DEPS_rav1e = vendor-rav1e $(DEPS_vendor-rav1e) cargo-c $(DEPS_cargo-c)
 
 # vendor-rav1e
 
-$(TARBALLS)/rav1e-$(RAV1E_VERSION)-vendor.tar.bz2: .sum-rav1e
-	$(call download_vendor,rav1e-$(RAV1E_VERSION)-vendor.tar.bz2,rav1e,rav1e-$(RAV1E_VERSION).tar.gz)
+$(TARBALLS)/rav1e-$(RAV1E_VERSION)-vendor.tar.zst: .sum-rav1e
+	$(call download_vendor,rav1e-$(RAV1E_VERSION)-vendor.tar.zst,rav1e,rav1e-$(RAV1E_VERSION).tar.gz)
 
-.sum-vendor-rav1e: rav1e-$(RAV1E_VERSION)-vendor.tar.bz2
+.sum-vendor-rav1e: rav1e-$(RAV1E_VERSION)-vendor.tar.zst
 
-rav1e-vendor: rav1e-$(RAV1E_VERSION)-vendor.tar.bz2 .sum-vendor-rav1e
+rav1e-vendor: rav1e-$(RAV1E_VERSION)-vendor.tar.zst .sum-vendor-rav1e
 	$(UNPACK)
 	$(MOVE)
 


=====================================
extras/ci/gitlab-ci.yml
=====================================
@@ -5,13 +5,13 @@ default:
     before_script:
         - set -x
         - export VLC_CONTRIB_SHA="$(extras/ci/get-contrib-sha.sh ${CI_JOB_NAME##nightly-})"
-        - export VLC_PREBUILT_CONTRIBS_URL="https://artifacts.videolan.org/vlc/${CI_JOB_NAME##nightly-}/vlc-contrib-${TRIPLET}-${VLC_CONTRIB_SHA}.tar.bz2"
+        - export VLC_PREBUILT_CONTRIBS_URL="https://artifacts.videolan.org/vlc/${CI_JOB_NAME##nightly-}/vlc-contrib-${TRIPLET}-${VLC_CONTRIB_SHA}.tar.zst"
         - if ! extras/ci/check-url.sh "$VLC_PREBUILT_CONTRIBS_URL"; then unset VLC_PREBUILT_CONTRIBS_URL; fi
         - export BUILD_NIGHTLY="$(extras/ci/is-installer-needed.sh ${CI_JOB_NAME})"
     after_script:
         - export VLC_CONTRIB_SHA="$(extras/ci/get-contrib-sha.sh ${CI_JOB_NAME##nightly-})"
-        - mv contrib/vlc-contrib-*.tar.bz2 contrib/vlc-contrib-${TRIPLET}-${VLC_CONTRIB_SHA}.tar.bz2 2>/dev/null || true
-        - cd contrib && find . -maxdepth 1 -type f -name "vlc-contrib-*-${VLC_CONTRIB_SHA}.tar.bz2" -exec sh -c 'tar tf "$0" > /dev/null && shasum -a 512 "$0" | tee SHA512SUM' "{}" \;
+        - mv contrib/vlc-contrib-*.tar.zst contrib/vlc-contrib-${TRIPLET}-${VLC_CONTRIB_SHA}.tar.zst 2>/dev/null || true
+        - cd contrib && find . -maxdepth 1 -type f -name "vlc-contrib-*-${VLC_CONTRIB_SHA}.tar.zst" -exec sh -c 'tar tf "$0" > /dev/null && shasum -a 512 "$0" | tee SHA512SUM' "{}" \;
     interruptible: true
     # Most jobs use docker, so we can default to those tags.
     # macOS base template will overwrite this
@@ -22,13 +22,13 @@ default:
 variables:
     VLC_TEST_TIMEOUT: 60
     FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: "true"
-    VLC_WIN64_IMAGE: registry.videolan.org/vlc-debian-win64-posix:20260127163923
-    VLC_WIN_LLVM_MSVCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-msvcrt:20260331112916
-    VLC_WIN_LLVM_UCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-ucrt:20260331112916
-    VLC_DEBIAN_IMAGE: registry.videolan.org/vlc-debian-unstable:20260121072258
-    VLC_ANDROID_IMAGE: registry.videolan.org/vlc-debian-android:20260611083443
+    VLC_WIN64_IMAGE: registry.videolan.org/vlc-debian-win64-posix:20260611225331
+    VLC_WIN_LLVM_MSVCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-msvcrt:20260611225331
+    VLC_WIN_LLVM_UCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-ucrt:20260611225331
+    VLC_DEBIAN_IMAGE: registry.videolan.org/vlc-debian-unstable:20260611225331
+    VLC_ANDROID_IMAGE: registry.videolan.org/vlc-debian-android:20260611225331
     VLC_SNAP_IMAGE: registry.videolan.org/vlc-ubuntu-snap:20260611225331
-    VLC_RASPBIAN_IMAGE: registry.videolan.org/vlc-ubuntu-raspberry:20260120134731
+    VLC_RASPBIAN_IMAGE: registry.videolan.org/vlc-ubuntu-raspberry:20260611225331
     VLC_WASM_EMSCRIPTEN: registry.videolan.org/vlc-debian-wasm-emscripten:20260617104340
 
 .variables-debian: &variables-debian
@@ -139,7 +139,7 @@ variables:
         - if: '$CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_PATH == "videolan/vlc"'
     artifacts:
         paths:
-            - contrib/vlc-contrib-${TRIPLET}-*.tar.bz2
+            - contrib/vlc-contrib-${TRIPLET}-*.tar.zst
             - contrib/SHA512SUM
 
 #
@@ -511,6 +511,9 @@ raspbian-arm:
         ./extras/package/macosx/build.sh $EXTRA_BUILD_FLAGS $NIGHTLY_EXTRA_BUILD_FLAGS -a $HOST_ARCH -x
         # At least compile every targets
         make check TESTS=
+    after_script:
+      - export PATH="${CI_PROJECT_DIR}/extras/tools/build/bin:$PATH"
+      - !reference [.ccache-common-apple, after_script]
 
 macos-x86_64:
     extends: .macos-common
@@ -565,6 +568,9 @@ nightly-macos-arm64:
           EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} --package-contribs"
         fi
         ../extras/package/apple/build.sh --sdk=$SDKNAME --arch=$HOST_ARCH $EXTRA_BUILD_FLAGS $EXTRA_TARGET_FLAGS
+    after_script:
+      - export PATH="${CI_PROJECT_DIR}/extras/tools/build/bin:$PATH"
+      - !reference [default, after_script]
 
 ios-arm64:
     extends: .apple-os-common


=====================================
extras/package/snap/snapcraft.yaml
=====================================
@@ -77,7 +77,7 @@ parts:
       export PATH=$PWD/extras/tools/build/bin:${PATH}
       export LD_LIBRARY_PATH=$(pwd)/src/.libs/:$(pwd)/lib/.libs/:${LD_LIBRARY_PATH}
       export VLC_CONTRIB_SHA="$(extras/ci/get-contrib-sha.sh)"
-      export VLC_PREBUILT_CONTRIBS_URL="https://artifacts.videolan.org/vlc/snap/vlc-contrib-${CRAFT_ARCH_TRIPLET_BUILD_FOR}-${VLC_CONTRIB_SHA}.tar.bz2"
+      export VLC_PREBUILT_CONTRIBS_URL="https://artifacts.videolan.org/vlc/snap/vlc-contrib-${CRAFT_ARCH_TRIPLET_BUILD_FOR}-${VLC_CONTRIB_SHA}.tar.zst"
       if ! extras/ci/check-url.sh "$VLC_PREBUILT_CONTRIBS_URL"; then unset VLC_PREBUILT_CONTRIBS_URL; fi
       cd contrib && mkdir linux && cd linux
       ../bootstrap \
@@ -94,7 +94,7 @@ parts:
           #export prebuilt for CI jobs
           if [ -f "$CRAFT_PROJECT_DIR/snap-save-prebuilt" ]; then
               make package
-              mv ../vlc-contrib-*.tar.bz2 $CRAFT_PROJECT_DIR/contrib || true
+              mv ../vlc-contrib-*.tar.zst $CRAFT_PROJECT_DIR/contrib || true
           fi
       fi
       cd ../..


=====================================
extras/tools/SHA512SUMS
=====================================
@@ -19,3 +19,4 @@ d24849b93de58b20f518c071687e7bfa653a96600382f36c4cf7fc1047656458f75f093b911b786b
 855ebce5ff36753238a44f14c95be7afdc3990b085960345ca2caf1a2db884f7db74d406ce9eec2f4a52abb8a063d4ed000a36b317c9a353ef4e25e2cca9a3f4  gperf-3.1.tar.gz
 e67a96ae99b8d06576209e0c316dda62e480b010e8459266fd4cf7029019b4a77499acbbf07d8f43541f28dae9063030a5d0f1c71eb81f723fd1b9924f967302  config.guess-a2287c3041a3f2a204eb942e09c015eab00dc7dd
 dad55c53a201de050522ed47073a6318599e15312d79eef44e1de5f82288a9bd1550c909e08752d43dd2fe442782187987e12aa565bbad70fc1b82180b49ac67  config.sub-a2287c3041a3f2a204eb942e09c015eab00dc7dd
+b4de208f179b68d4c6454139ca60d66ed3ef3893a560d6159a056640f83d3ee67cdf6ffb88971cdba35449dba4b597eaa8b4ae908127ef7fd58c89f40bf9a705  zstd-1.5.7.tar.gz


=====================================
extras/tools/bootstrap
=====================================
@@ -25,6 +25,7 @@ MIN_M4=1.4.16
 MIN_MESON=1.10.0
 MIN_NASM=2.15
 MIN_NINJA=1.13.0
+MIN_ZSTD=1.2.0
 
 export LC_ALL=
 FOUND=
@@ -130,15 +131,60 @@ fi
 }
 
 check_tar() {
-if ! tar PcJ /dev/null >/dev/null 2>&1 && ! tar PcJf /dev/null /dev/null 2>&1
+if ! { check_tar_autocompress && check_tar_xz && check_tar_zstd ; }
 then
-    echo "tar doesn't support xz (J option)"
     NEEDED="$NEEDED tar"
 else
     FOUND="$FOUND tar"
 fi
 }
 
+check_tar_autocompress() {
+tmp="check_tar"
+ret=0
+echo "Hello Cone" > "$tmp"
+if ! ( tar -caf "$tmp.tar.gz" "$tmp" && tar xfo "$tmp.tar.gz" )
+then
+    echo "tar can't auto-detect compression"
+    ret=1
+fi
+rm -f "$tmp" "$tmp.tar.gz" 2>/dev/null
+return "$ret"
+}
+
+check_tar_xz() {
+if ! tar PcJ /dev/null >/dev/null 2>&1 && ! tar PcJf /dev/null /dev/null 2>&1
+then
+    echo "tar doesn't support xz (J option)"
+    return 1
+fi
+return 0
+}
+
+check_tar_zstd() {
+output="$(tar Pc --zstd /dev/null 2>&1 >/dev/null)"
+ret="$?"
+case "$output" in
+    *"unrecognized option"*|*"not supported"*)
+        echo "tar doesn't support zstd"
+        return 1
+        ;;
+    *"not found"*|*"Can't launch external program"*)
+        echo "tar is new enough but zstd not installed"
+        NEEDED="$NEEDED zstd"
+        return 0
+        ;;
+    *)
+        if [ "$ret" -gt 0 ]; then
+            echo "tar has some unspecific error with zstd"
+            return 1
+        else
+            return 0
+        fi
+        ;;
+esac
+}
+
 check_sed() {
 tmp="`pwd`/check_sed"
 trap "rm \"$tmp\" \"$tmp-e\" 2>/dev/null" EXIT
@@ -237,6 +283,7 @@ check help2man
 check meson $MIN_MESON
 check_ninja $MIN_NINJA
 check gperf
+check zstd $MIN_ZSTD
 
 DEPS_ONLY="help2man"
 


=====================================
extras/tools/packages.mak
=====================================
@@ -62,3 +62,6 @@ GPERF_URL=$(GNU)/gperf/gperf-$(GPERF_VERSION).tar.gz
 CONFIGGUESS_VERSION=a2287c3041a3f2a204eb942e09c015eab00dc7dd
 CONFIGSUB_VERSION=a2287c3041a3f2a204eb942e09c015eab00dc7dd
 CONFIGGUESS_URL=
+
+ZSTD_VERSION=1.5.7
+ZSTD_URL=https://github.com/facebook/zstd/releases/download/v$(ZSTD_VERSION)/zstd-$(ZSTD_VERSION).tar.gz


=====================================
extras/tools/tools.mak
=====================================
@@ -44,9 +44,7 @@ TAR_VERBOSE := v
 endif
 
 UNPACK = $(RM) -R $@ \
-    $(foreach f,$(filter %.tar.gz %.tgz,$^), && tar $(TAR_VERBOSE)xzfo $(f)) \
-    $(foreach f,$(filter %.tar.bz2,$^), && tar $(TAR_VERBOSE)xjfo $(f)) \
-    $(foreach f,$(filter %.tar.xz,$^), && tar $(TAR_VERBOSE)xJfo $(f)) \
+    $(foreach f,$(filter %.tar.gz %.tgz %.tar.bz2 %.tar.xz %.tar.zst,$^), && tar $(TAR_VERBOSE)xfo $(f)) \
     $(foreach f,$(filter %.zip,$^), && unzip $(f))
 
 UNPACK_DIR = $(patsubst %.tar,%,$(basename $(notdir $<)))
@@ -159,7 +157,7 @@ tar: tar-$(TAR_VERSION).tar.bz2
 	$(UNPACK)
 	$(MOVE)
 
-.buildtar: .xz tar
+.buildtar: tar .xz
 	cd $<; ./configure --prefix=$(PREFIX)
 	+$(MAKE) -C $<
 	+$(MAKE) -C $< install
@@ -190,6 +188,25 @@ CLEAN_PKG += xz
 DISTCLEAN_PKG += xz-$(XZ_VERSION).tar.bz2
 CLEAN_FILE += .buildxz
 
+# zstd
+
+zstd-$(ZSTD_VERSION).tar.gz:
+	$(call download_pkg,$(ZSTD_URL),zstd)
+
+.getzstd: zstd-$(ZSTD_VERSION).tar.gz
+zstd: zstd-$(ZSTD_VERSION).tar.gz
+	$(UNPACK)
+	$(MOVE)
+
+.buildzstd: zstd
+	+$(MAKE) -C $</programs
+	+$(MAKE) -C $</programs install prefix=$(PREFIX)
+	touch $@
+
+CLEAN_PKG += zstd
+DISTCLEAN_PKG += zstd-$(ZSTD_VERSION).tar.gz
+CLEAN_FILE += .buildzstd
+
 # config.guess
 
 config.guess: $(TOOLS)/config.guess-$(CONFIGGUESS_VERSION)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/de087ed64b154830baff688b302b0e2796206a44...8715c6fd8db923df82b460ae65d06d04e2dce51a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/de087ed64b154830baff688b302b0e2796206a44...8715c6fd8db923df82b460ae65d06d04e2dce51a
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list