The static archives are linked into the shared libmpv.so, but neither
ffmpeg (configure static build) nor alsa-lib (autotools static build)
force -fPIC in that case. Linking then fails with a TPOFF32 relocation
error from libasound. Pass --enable-pic to ffmpeg and -fPIC to alsa-lib.
Meson on a Debian/Ubuntu host defaults libdir to the multiarch path
lib/x86_64-linux-gnu/, so the static archives and .pc files never land in
the expected <prefix>/lib that the later builds look in. Force libdir=lib
for every vendored dependency build.
Add a native x86_64 Linux build (ci/build-libmpv-linux.sh,
build-linux.yml). Every dependency is static and linked into a single
libmpv.so; only glibc/pthread/dl/m and the system zlib remain external.
The Linux-only additions are the font stack (fontconfig -> expat, where
macOS/Windows use CoreText/DirectWrite) and alsa audio output; gl is the
plain render-API support (no X11/Wayland context, since jlibmpv supplies
the GL context via JOGL).
For consistency, ship a single native per platform and no public headers
(jlibmpv loads the library via JNA and never compiles against it). Remove
the accidental header/import-library copies from the Windows build and the
phantom header copy from the macOS build.
mpv enables Objective-C for the macOS audio/video output backends via
add_languages('objc'); the cross file needs the objc binary defined or
meson setup fails.
ffmpeg auto-detects the CPU architecture from uname -m, which is
aarch64 on the macOS runner, and then compiles Arm assembly for the
x86_64 slice. Pass --arch explicitly so the cross build uses the
correct SIMD code paths.
meson names the shared library libmpv.2.dylib on macOS, not
libmpv-2.dylib as on Windows. Fix the collect step in the build script
and the lipo inputs in the workflow.
harfbuzz 12.2.0's option is utilities, not utils; enable coretext as the
system font provider. libass gets coretext (fontconfig would drag the
arm64-only brew package into the x86_64 slice) and asm disabled for
determinism. freetype disables all optional third-party providers except
the universal system zlib. libplacebo disables optional xxhash for the
same reason.
The local array declaration for ffmpeg configure args mis-parsed on the
macOS runner's bash 3.2; pass the args as a plain array. Use
videotoolbox-gl instead of videotoolbox-pl: the pl variant requires
vulkan in mpv v0.41.0's meson.build, while the gl variant only needs the
gl-cocoa feature which is enabled.
GitHub's macOS runners are all arm64 now, so the two parallel per-arch
jobs are obsolete: one macos-15 runner builds the arm64 slice natively
and the x86_64 slice via clang --target=x86_64-apple-darwin, then lipo
merges both into the universal libmpv.dylib. The build script is now
parameterized by ARCH, installs every meson dependency into its own
macos_prefix-<arch> (meson's macOS default prefix is /opt/homebrew),
uses release buildtype for the static deps, and disables harfbuzz icu
(the brew icu4c on the runner is arm64-only and must not leak into the
x86_64 slice).
pip installs are blocked by PEP 668 on the macOS runners, so install meson
via brew. Enable cocoa and gl-cocoa: on macOS the OpenGL render API
backend of libmpv requires them (system frameworks only). Build no zlib
ourselves - macOS ships it in the system like iconv. Use PKG_CONFIG_PATH
additively instead of overriding PKG_CONFIG_LIBDIR so system pkg-config
files (icu-uc, ...) stay visible.
Vendor ci/build-libmpv-macos.sh, which builds every dependency statically
for the native runner architecture and links them into a single
self-contained libmpv dylib (coreaudio output, videotoolbox hardware
decode, OpenGL render API; no vulkan/cocoa player). build-macos.yml runs
it on macos-14 (x86_64) and macos-15 (arm64) in parallel and a merge job
combines the two dylibs into one universal libmpv.dylib with lipo, matching
the file name jlibmpv expects on macOS.
The release build type emits DWARF .debug_* sections even for the MinGW
cross build, inflating libmpv-2.dll to ~169 MB. Strip them with
TARGET-strip --strip-all so only code/data remain. Also hand upload-artifact
the folder directly instead of a pre-zipped file, so the artifact is a
single-level archive rather than a zip containing a zip.
Vendored ci/build-libmpv-mingw64.sh builds every dependency statically and
links the single libmpv-2.dll against those archives with a static CRT, so
the artifact depends only on Windows system DLLs. Dependency versions are
pinned to the latest stable tag on the mpv v0.41.0 release date. Vulkan,
shaderc and SPIRV-Cross are dropped (jlibmpv renders through an external
OpenGL context). The workflow no longer needs a Rust toolchain.