debian/mpv-fourier: new package
Mirror of arch/mpv-fourier into the Debian tree. Same source
pin (mpv 0.41.0), same 3 patches:
- 0001-meson-add-detection-logic-for-v4l2request-support.patch
- 0002-vo-hwdec-drmprime-add-separate-hwdecs-for-v4l2reques.patch
(Kwiboo + Langdale wiring for AV_HWDEVICE_TYPE_V4L2REQUEST
through drmprime VO hwdec — '--hwdec=v4l2request' actually
engages on dmabuf-wayland)
- 0001-vo_dmabuf_wayland-explicit-cache-sync-on-import-fd.patch
(iter1 of dmabuf-modifier-triage — explicit DMA_BUF_IOCTL_SYNC
on import fds; KWin-on-RK3566 dark-green chroma readback
regression fix on ohm. Root cause is the vb2_dma_resv RFC
upstream still pending.)
Depends on ffmpeg-v4l2-request-fourier (>= 2:8.1+rfourier) —
AV_HWDEVICE_TYPE_V4L2REQUEST only exists in Kwiboo's FFmpeg
fork; stock Debian ffmpeg doesn't have it.
Conflicts/Replaces stock mpv + libmpv2/libmpv1 — drop-in
replacement. Takes epoch 1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+134
@@ -0,0 +1,134 @@
|
||||
#!/bin/bash
|
||||
# Build mpv-fourier_<ver>_arm64.deb (mpv with v4l2request hwdec wiring +
|
||||
# vo_dmabuf_wayland cache-sync fix).
|
||||
#
|
||||
# Mirror of arch/mpv-fourier into the Debian tree. Same source pin
|
||||
# (mpv 0.41.0), same 3 patches, same meson options.
|
||||
#
|
||||
# Depends on ffmpeg-v4l2-request-fourier for the libavcodec backing
|
||||
# library — the v4l2request hwdec mpv now offers requires
|
||||
# AV_HWDEVICE_TYPE_V4L2REQUEST which only exists in Kwiboo's FFmpeg
|
||||
# fork, not in Debian stock ffmpeg.
|
||||
#
|
||||
# Conflicts: mpv — drop-in replacement. Pi 5 / CM5 hosts using stock
|
||||
# Firefox + VAAPI don't need this; the firefox-fourier / kdirect
|
||||
# bench-test paths do.
|
||||
#
|
||||
# Sibling Arch package: ../../arch/mpv-fourier/PKGBUILD
|
||||
# Sibling FFmpeg package: ../ffmpeg-v4l2-request-fourier/build-deb.sh
|
||||
# Upstream: https://github.com/mpv-player/mpv
|
||||
set -euo pipefail
|
||||
|
||||
MPV_VERSION=0.41.0
|
||||
PKGVER=1:${MPV_VERSION}+rfourier
|
||||
PKGREL=1
|
||||
MPV_TARBALL_SHA256=ee21092a5ee427353392360929dc64645c54479aefdb5babc5cfbb5fad626209
|
||||
|
||||
HERE=$(dirname "$(readlink -f "$0")")
|
||||
|
||||
# Reproducible build. 2026-05-18 23:00 UTC — Phase 8.13 close.
|
||||
export SOURCE_DATE_EPOCH=1779231600
|
||||
|
||||
work=$(mktemp -d)
|
||||
trap "rm -rf $work" EXIT
|
||||
|
||||
cd "$work"
|
||||
curl -sSLfo mpv.tar.gz \
|
||||
"https://github.com/mpv-player/mpv/archive/v${MPV_VERSION}/mpv-${MPV_VERSION}.tar.gz"
|
||||
echo "$MPV_TARBALL_SHA256 mpv.tar.gz" | sha256sum -c
|
||||
tar xzf mpv.tar.gz
|
||||
|
||||
cd "mpv-${MPV_VERSION}"
|
||||
|
||||
# Apply the 3 fourier patches.
|
||||
patch -p1 < "$HERE/0001-meson-add-detection-logic-for-v4l2request-support.patch"
|
||||
patch -p1 < "$HERE/0002-vo-hwdec-drmprime-add-separate-hwdecs-for-v4l2reques.patch"
|
||||
patch -p1 < "$HERE/0001-vo_dmabuf_wayland-explicit-cache-sync-on-import-fd.patch"
|
||||
|
||||
# Configure. Same shape as arch/mpv-fourier's meson options.
|
||||
meson setup build \
|
||||
--prefix=/usr \
|
||||
--libdir=lib/aarch64-linux-gnu \
|
||||
--buildtype=release \
|
||||
--auto-features=auto \
|
||||
-Dv4l2request=enabled \
|
||||
-Dlibmpv=true \
|
||||
-Dgl-x11=enabled \
|
||||
-Dcaca=disabled \
|
||||
-Dcdda=enabled \
|
||||
-Ddrm=enabled \
|
||||
-Ddvbin=enabled \
|
||||
-Ddvdnav=enabled \
|
||||
-Dlibarchive=enabled \
|
||||
-Dopenal=enabled \
|
||||
-Dsdl2-audio=enabled \
|
||||
-Dsdl2-video=enabled \
|
||||
-Dsdl2-gamepad=enabled
|
||||
|
||||
meson compile -C build -j"$(nproc)"
|
||||
|
||||
# Stage
|
||||
ROOT="$work/pkgroot"
|
||||
DESTDIR="$ROOT" meson install -C build
|
||||
|
||||
# Drop private linkage entries from the .pc (only matter for static linking).
|
||||
sed -i -e '/Requires.private/d' -e '/Libs.private/d' \
|
||||
"$ROOT/usr/lib/aarch64-linux-gnu/pkgconfig/mpv.pc"
|
||||
|
||||
# Docs
|
||||
mkdir -p "$ROOT/usr/share/doc/mpv-fourier" "$ROOT/DEBIAN"
|
||||
install -m 644 DOCS/encoding.rst "$ROOT/usr/share/doc/mpv-fourier/"
|
||||
install -m 644 DOCS/tech-overview.txt "$ROOT/usr/share/doc/mpv-fourier/"
|
||||
install -Dm644 "$HERE/debian/copyright" "$ROOT/usr/share/doc/mpv-fourier/copyright"
|
||||
install -Dm644 "$HERE/debian/changelog" "$ROOT/usr/share/doc/mpv-fourier/changelog.Debian"
|
||||
gzip -9 -n "$ROOT/usr/share/doc/mpv-fourier/changelog.Debian"
|
||||
|
||||
# TOOLS scripts
|
||||
mkdir -p "$ROOT/usr/share/mpv/scripts"
|
||||
install -m 644 TOOLS/umpv TOOLS/mpv_identify.sh TOOLS/stats-conv.py TOOLS/idet.sh \
|
||||
"$ROOT/usr/share/mpv/scripts/" 2>/dev/null || true
|
||||
[ -d TOOLS/lua ] && cp TOOLS/lua/* "$ROOT/usr/share/mpv/scripts/" 2>/dev/null || true
|
||||
|
||||
cat > "$ROOT/DEBIAN/control" <<EOF
|
||||
Package: mpv-fourier
|
||||
Version: ${PKGVER}-${PKGREL}
|
||||
Section: video
|
||||
Priority: optional
|
||||
Architecture: arm64
|
||||
Depends: ffmpeg-v4l2-request-fourier (>= 2:8.1+rfourier),
|
||||
libc6, libdrm2,
|
||||
libass9, libbluray2, libcdio19, libcdio-paranoia2,
|
||||
libdvdnav4, libdvdread8,
|
||||
libegl1, libgl1, libjpeg62-turbo | libjpeg62,
|
||||
libplacebo338 | libplacebo208,
|
||||
libpulse0, libsixel1, libluajit-5.1-2,
|
||||
libmujs3 | libmujs2 | libmujs1,
|
||||
libpipewire-0.3-0, librubberband2, libsdl2-2.0-0,
|
||||
libopenal1, libuchardet0, libvulkan1,
|
||||
libwayland-client0, libwayland-egl1, libwayland-cursor0,
|
||||
libxkbcommon0, libxext6, libxpresent1,
|
||||
libxrandr2, libxss1, libxv1, libx11-6,
|
||||
zlib1g
|
||||
Conflicts: mpv, libmpv2 | libmpv1
|
||||
Replaces: mpv, libmpv2, libmpv1
|
||||
Provides: mpv (= ${PKGVER}-${PKGREL}), libmpv.so.2
|
||||
Maintainer: Markus Fritsche <mfritsche@reauktion.de>
|
||||
Homepage: https://mpv.io/
|
||||
Description: mpv media player with V4L2-Request hwdec (fourier fork)
|
||||
mpv ${MPV_VERSION} patched with:
|
||||
- Kwiboo + Langdale v4l2request hwdec wiring (meson detection +
|
||||
vo_hwdec_drmprime separate hwdec instance for AV_HWDEVICE_TYPE_
|
||||
V4L2REQUEST) so '--hwdec=v4l2request' actually engages on
|
||||
dmabuf-wayland.
|
||||
- vo_dmabuf_wayland explicit DMA_BUF_IOCTL_SYNC on import fds
|
||||
(iter1 of dmabuf-modifier-triage) — workaround for missing
|
||||
implicit-fence on V4L2 stateless CAPTURE buffers. Fixes the
|
||||
KWin-on-RK3566 dark-green chroma readback regression on ohm.
|
||||
.
|
||||
Requires ffmpeg-v4l2-request-fourier as the backing libavcodec.
|
||||
Stock Debian ffmpeg does not provide AV_HWDEVICE_TYPE_V4L2REQUEST.
|
||||
EOF
|
||||
|
||||
DEB_OUT="mpv-fourier_${PKGVER//:/%3a}-${PKGREL}_arm64.deb"
|
||||
dpkg-deb --root-owner-group --build "$ROOT" "$HERE/$DEB_OUT"
|
||||
echo "built: $HERE/$DEB_OUT"
|
||||
Reference in New Issue
Block a user