summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:14 +0000
commit5a3b54c78ce63d899f76dbb3db72e4894b40bd53 (patch)
tree50693d13eeefc4d683bdf5417f0861b0ef274a0c /ci
parentAdding debian version 0.37.0-1. (diff)
downloadmpv-5a3b54c78ce63d899f76dbb3db72e4894b40bd53.tar.xz
mpv-5a3b54c78ce63d899f76dbb3db72e4894b40bd53.zip
Merging upstream version 0.38.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xci/build-freebsd.sh6
-rwxr-xr-xci/build-linux-old.sh18
-rwxr-xr-xci/build-macos.sh5
-rwxr-xr-xci/build-mingw64.sh48
-rwxr-xr-xci/build-msys2.sh13
-rwxr-xr-xci/build-openbsd.sh22
-rwxr-xr-xci/build-tumbleweed.sh2
-rwxr-xr-xci/lint-commit-msg.py10
8 files changed, 88 insertions, 36 deletions
diff --git a/ci/build-freebsd.sh b/ci/build-freebsd.sh
index bc68a25..e272ef6 100755
--- a/ci/build-freebsd.sh
+++ b/ci/build-freebsd.sh
@@ -5,10 +5,11 @@ export CFLAGS="$CFLAGS -isystem/usr/local/include"
export CXXFLAGS="$CXXFLAGS -isystem/usr/local/include"
export LDFLAGS="$LDFLAGS -L/usr/local/lib"
+# TODO: readd -Ddvbin=enabled
+
meson setup build \
--werror \
- -Dlibplacebo:werror=false \
- -Dc_args="-Wno-error=deprecated -Wno-error=deprecated-declarations" \
+ -Dc_args="-Wno-error=deprecated -Wno-error=deprecated-declarations -march=native" \
-Diconv=disabled \
-Dlibmpv=true \
-Dlua=enabled \
@@ -19,7 +20,6 @@ meson setup build \
-Dvdpau=enabled \
-Dvulkan=enabled \
-Doss-audio=enabled \
- $(pkg info -q v4l_compat && echo -Ddvbin=enabled) \
$(pkg info -q libdvdnav && echo -Ddvdnav=enabled) \
$(pkg info -q libcdio-paranoia && echo -Dcdda=enabled) \
$(pkg info -q pipewire && echo -Dpipewire=enabled) \
diff --git a/ci/build-linux-old.sh b/ci/build-linux-old.sh
new file mode 100755
index 0000000..d9cd9ee
--- /dev/null
+++ b/ci/build-linux-old.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -e
+
+# clone exactly the oldest libplacebo we want to support
+rm -rf subprojects
+mkdir -p subprojects
+git clone https://code.videolan.org/videolan/libplacebo.git \
+ --recurse-submodules --shallow-submodules \
+ --depth=1 --branch v6.338 subprojects/libplacebo \
+
+meson setup build \
+ -Dlibplacebo:vulkan=disabled \
+ -Dlibmpv=true \
+ -Dlua=enabled \
+ -Dtests=true
+
+meson compile -C build
+./build/mpv -v --no-config
diff --git a/ci/build-macos.sh b/ci/build-macos.sh
index 14b3a1b..d11befa 100755
--- a/ci/build-macos.sh
+++ b/ci/build-macos.sh
@@ -12,10 +12,13 @@ fi
PKG_CONFIG_PATH="${FFMPEG_SYSROOT}/lib/pkgconfig/" CC="${CC}" CXX="${CXX}" \
meson setup build \
+ --werror \
-Dprefix="${MPV_INSTALL_PREFIX}" \
+ -D{c_args,objc_args}="-Wno-error=deprecated -Wno-error=deprecated-declarations" \
-D{libmpv,tests}=true \
-D{gl,iconv,lcms2,lua,jpeg,plain-gl,zlib}=enabled \
- -D{cocoa,coreaudio,gl-cocoa,macos-cocoa-cb,macos-touchbar,videotoolbox-gl}=enabled
+ -D{cocoa,coreaudio,gl-cocoa,videotoolbox-gl,videotoolbox-pl}=enabled \
+ -D{swift-build,macos-cocoa-cb,macos-media-player,macos-touchbar,vulkan}=enabled
meson compile -C build -j4
meson install -C build
diff --git a/ci/build-mingw64.sh b/ci/build-mingw64.sh
index adca649..ae64473 100755
--- a/ci/build-mingw64.sh
+++ b/ci/build-mingw64.sh
@@ -6,10 +6,11 @@ ln -snf . "$prefix_dir/usr"
ln -snf . "$prefix_dir/local"
wget="wget -nc --progress=bar:force"
-gitclone="git clone --depth=1 --recursive"
+gitclone="git clone --depth=1 --recursive --shallow-submodules"
# -posix is Ubuntu's variant with pthreads support
export CC=$TARGET-gcc-posix
+export AS=$TARGET-gcc-posix
export CXX=$TARGET-g++-posix
export AR=$TARGET-ar
export NM=$TARGET-nm
@@ -50,9 +51,11 @@ EOF
# CMake
cmake_args=(
-Wno-dev
+ -DCMAKE_SYSTEM_PROCESSOR="${fam}"
-DCMAKE_SYSTEM_NAME=Windows
-DCMAKE_FIND_ROOT_PATH="$PKG_CONFIG_SYSROOT_DIR"
-DCMAKE_RC_COMPILER="${TARGET}-windres"
+ -DCMAKE_ASM_COMPILER="$AS"
-DCMAKE_BUILD_TYPE=Release
)
@@ -110,7 +113,7 @@ _iconv () {
_iconv_mark=lib/libiconv.dll.a
_zlib () {
- local ver=1.3
+ local ver=1.3.1
gettar "https://zlib.net/fossils/zlib-${ver}.tar.gz"
pushd zlib-${ver}
make -fwin32/Makefile.gcc clean
@@ -121,6 +124,16 @@ _zlib () {
}
_zlib_mark=lib/libz.dll.a
+_dav1d () {
+ [ -d dav1d ] || $gitclone https://code.videolan.org/videolan/dav1d.git
+ builddir dav1d
+ meson setup .. --cross-file "$prefix_dir/crossfile" \
+ -Denable_{tools,tests}=false
+ makeplusinstall
+ popd
+}
+_dav1d_mark=lib/libdav1d.dll.a
+
_ffmpeg () {
[ -d ffmpeg ] || $gitclone https://github.com/FFmpeg/FFmpeg.git ffmpeg
builddir ffmpeg
@@ -129,7 +142,7 @@ _ffmpeg () {
--enable-cross-compile --cross-prefix=$TARGET- --arch=${TARGET%%-*}
--cc="$CC" --cxx="$CXX" $commonflags
--disable-{doc,programs,muxers,encoders}
- --enable-encoder=mjpeg,png
+ --enable-muxer=spdif --enable-encoder=mjpeg,png --enable-libdav1d
)
pkg-config vulkan && args+=(--enable-vulkan --enable-libshaderc)
../configure "${args[@]}"
@@ -161,8 +174,16 @@ _spirv_cross () {
}
_spirv_cross_mark=lib/libspirv-cross-c-shared.dll.a
+_nv_headers () {
+ [ -d nv-codec-headers ] || $gitclone https://github.com/FFmpeg/nv-codec-headers
+ pushd nv-codec-headers
+ makeplusinstall
+ popd
+}
+_nv_headers_mark=include/ffnvcodec/dynlink_loader.h
+
_vulkan_headers () {
- [ -d Vulkan-Headers ] || $gitclone https://github.com/KhronosGroup/Vulkan-Headers -b v1.3.266
+ [ -d Vulkan-Headers ] || $gitclone https://github.com/KhronosGroup/Vulkan-Headers
builddir Vulkan-Headers
cmake .. "${cmake_args[@]}"
makeplusinstall
@@ -171,10 +192,10 @@ _vulkan_headers () {
_vulkan_headers_mark=include/vulkan/vulkan.h
_vulkan_loader () {
- [ -d Vulkan-Loader ] || $gitclone https://github.com/KhronosGroup/Vulkan-Loader -b v1.3.266
+ [ -d Vulkan-Loader ] || $gitclone https://github.com/KhronosGroup/Vulkan-Loader
builddir Vulkan-Loader
cmake .. "${cmake_args[@]}" \
- -DENABLE_WERROR=OFF
+ -DENABLE_WERROR=OFF -DUSE_GAS=ON
makeplusinstall
popd
}
@@ -191,7 +212,7 @@ _libplacebo () {
_libplacebo_mark=lib/libplacebo.dll.a
_freetype () {
- local ver=2.13.1
+ local ver=2.13.2
gettar "https://mirror.netcologne.de/savannah/freetype/freetype-${ver}.tar.xz"
builddir freetype-${ver}
meson setup .. --cross-file "$prefix_dir/crossfile"
@@ -212,7 +233,7 @@ _fribidi () {
_fribidi_mark=lib/libfribidi.dll.a
_harfbuzz () {
- local ver=8.1.1
+ local ver=8.3.0
gettar "https://github.com/harfbuzz/harfbuzz/releases/download/${ver}/harfbuzz-${ver}.tar.xz"
builddir harfbuzz-${ver}
meson setup .. --cross-file "$prefix_dir/crossfile" \
@@ -246,7 +267,7 @@ _luajit () {
}
_luajit_mark=lib/libluajit-5.1.a
-for x in iconv zlib shaderc spirv-cross; do
+for x in iconv zlib shaderc spirv-cross nv-headers dav1d; do
build_if_missing $x
done
if [[ "$TARGET" != "i686-"* ]]; then
@@ -269,7 +290,6 @@ rm -rf $build
meson setup $build --cross-file "$prefix_dir/crossfile" \
--werror \
- -Dlibplacebo:werror=false \
-Dc_args="-Wno-error=deprecated -Wno-error=deprecated-declarations" \
--buildtype debugoptimized \
-Dlibmpv=true -Dlua=luajit \
@@ -280,7 +300,7 @@ meson compile -C $build
if [ "$2" = pack ]; then
mkdir -p artifact/tmp
echo "Copying:"
- cp -pv $build/player/mpv.com $build/mpv.exe artifact/
+ cp -pv $build/mpv.com $build/mpv.exe artifact/
# copy everything we can get our hands on
cp -p "$prefix_dir/bin/"*.dll artifact/tmp/
shopt -s nullglob
@@ -292,9 +312,11 @@ if [ "$2" = pack ]; then
dlls=(
libgcc_*.dll lib{ssp,stdc++,winpthread}-[0-9]*.dll # compiler runtime
av*.dll sw*.dll lib{ass,freetype,fribidi,harfbuzz,iconv,placebo}-[0-9]*.dll
- lib{shaderc_shared,spirv-cross-c-shared}.dll zlib1.dll
- # note: vulkan-1.dll is not here since drivers provide it
+ lib{shaderc_shared,spirv-cross-c-shared,dav1d}.dll zlib1.dll
)
+ if [[ -f vulkan-1.dll ]]; then
+ dlls+=(vulkan-1.dll)
+ fi
mv -v "${dlls[@]}" ..
popd
diff --git a/ci/build-msys2.sh b/ci/build-msys2.sh
index d3e1ce9..1a0e022 100755
--- a/ci/build-msys2.sh
+++ b/ci/build-msys2.sh
@@ -1,19 +1,7 @@
#!/bin/sh -e
-mkdir subprojects
-cat > subprojects/libplacebo.wrap <<EOF
-[wrap-git]
-url = https://code.videolan.org/videolan/libplacebo.git
-revision = v6.338.1
-depth = 1
-clone-recursive = true
-EOF
-
meson setup build \
--werror \
- -Dlibplacebo:werror=false \
- -Dlibplacebo:demos=false \
- -Dlibplacebo:default_library=static \
-Dc_args="-Wno-error=deprecated -Wno-error=deprecated-declarations" \
-D cdda=enabled \
-D d3d-hwaccel=enabled \
@@ -35,5 +23,4 @@ meson setup build \
-D uchardet=enabled \
-D vapoursynth=enabled
meson compile -C build
-cp ./build/player/mpv.com ./build
./build/mpv.com -v --no-config
diff --git a/ci/build-openbsd.sh b/ci/build-openbsd.sh
new file mode 100755
index 0000000..8e9125c
--- /dev/null
+++ b/ci/build-openbsd.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+set -e
+
+# libplacebo on openBSD is too old; use a subproject
+rm -rf subprojects
+mkdir -p subprojects
+git clone https://code.videolan.org/videolan/libplacebo.git \
+ --recurse-submodules --shallow-submodules \
+ --depth=1 --recurse-submodules subprojects/libplacebo
+
+meson setup build \
+ -Dlibmpv=true \
+ -Dlua=enabled \
+ -Dopenal=enabled \
+ -Dpulse=enabled \
+ -Dtests=true \
+ -Dvulkan=enabled \
+ -Ddvdnav=enabled \
+ -Dcdda=enabled
+
+meson compile -C build
+./build/mpv -v --no-config
diff --git a/ci/build-tumbleweed.sh b/ci/build-tumbleweed.sh
index 03e8d1a..069372a 100755
--- a/ci/build-tumbleweed.sh
+++ b/ci/build-tumbleweed.sh
@@ -3,7 +3,6 @@ set -e
meson setup build \
--werror \
- -Dlibplacebo:werror=false \
-Dc_args="-Wno-error=deprecated -Wno-error=deprecated-declarations" \
-Db_sanitize=address,undefined \
-Dcdda=enabled \
@@ -13,7 +12,6 @@ meson setup build \
-Dlibmpv=true \
-Dmanpage-build=enabled \
-Dpipewire=enabled \
- -Dshaderc=enabled \
-Dtests=true \
-Dvulkan=enabled
meson compile -C build
diff --git a/ci/lint-commit-msg.py b/ci/lint-commit-msg.py
index 4198ed4..10c7d18 100755
--- a/ci/lint-commit-msg.py
+++ b/ci/lint-commit-msg.py
@@ -1,12 +1,13 @@
#!/usr/bin/env python3
import os, sys, json, subprocess, re
+from typing import Dict, Tuple, Callable, Optional
def call(cmd) -> str:
sys.stdout.flush()
ret = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, text=True)
return ret.stdout
-lint_rules = {}
+lint_rules: Dict[str, Tuple[Callable, str]] = {}
def lint_rule(description: str):
def f(func):
@@ -14,7 +15,7 @@ def lint_rule(description: str):
lint_rules[func.__name__] = (func, description)
return f
-def get_commit_range() -> str:
+def get_commit_range() -> Optional[str]:
if len(sys.argv) > 1:
return sys.argv[1]
# https://github.com/actions/runner/issues/342#issuecomment-590670059
@@ -28,6 +29,7 @@ def get_commit_range() -> str:
return event["before"] + "..." + event["after"]
elif event_name == "pull_request":
return event["pull_request"]["base"]["sha"] + ".." + event["pull_request"]["head"]["sha"]
+ return None
def do_lint(commit_range: str) -> bool:
commits = call(["git", "log", "--pretty=format:%h %s", commit_range]).splitlines()
@@ -56,7 +58,7 @@ def do_lint(commit_range: str) -> bool:
################################################################################
-NO_PREFIX_WHITELIST = r"^Revert \"(.*)\"|^Release [0-9]|^Update VERSION$"
+NO_PREFIX_WHITELIST = r"^Revert \"(.*)\"|^Reapply \"(.*)\"|^Release [0-9]|^Update VERSION$"
@lint_rule("Subject line must contain a prefix identifying the sub system")
def subsystem_prefix(body):
@@ -98,7 +100,7 @@ def no_merge(body):
@lint_rule("Subject line should be shorter than 72 characters")
def line_too_long(body):
- revert = re.search(r"^Revert \"(.*)\"", body[0])
+ revert = re.search(r"^Revert \"(.*)\"|^Reapply \"(.*)\"", body[0])
return True if revert else len(body[0]) <= 72
@lint_rule("Prefix should not include C file extensions (use `vo_gpu: ...` not `vo_gpu.c: ...`)")