summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD322
1 files changed, 170 insertions, 152 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a6f9d700553..e6aacadeacb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@
# update the dependencies based on dynamic libraries when packaging..
pkgname=mpv-ahjolinna-git
_gitname=mpv
-pkgver=0.29.1.r352.gb5b0350371
+pkgver=0.32.0.r484.g152b0e2a8c
pkgrel=1
pkgdesc="MPV using ahjolinna's personal pre-made conf build"
arch=('x86_64')
@@ -17,15 +17,14 @@ url='http://mpv.io'
_undetected_depends=('desktop-file-utils' 'hicolor-icon-theme' 'xdg-utils')
depends=(
# official repositories:
-'lcms2' 'libcdio-paranoia' 'libgl' 'libxss'
+'lcms2' 'libcdio-paranoia' 'libgl' 'libxss' 'mujs'
'libxinerama' 'libxv' 'libxkbcommon' 'libva'
'wayland' 'libcaca' 'libplacebo' 'desktop-file-utils'
- 'hicolor-icon-theme' 'xdg-utils' 'lua52' 'libdvdnav' 'rsound'
-'libxrandr' 'jack' 'rubberband' 'uchardet' 'libarchive' 'smbclient'
-'zlib' 'sndio' 'openal' 'vulkan-icd-loader' 'shaderc' "${_undetected_depends[@]}"
-
-# AUR:
-'ffmpeg-full-git' 'mujs' 'vapoursynth-git'
+ 'hicolor-icon-theme' 'xdg-utils' 'lua52'
+ 'libdvdnav' 'rsound' 'libxrandr' 'jack' 'rubberband'
+ 'uchardet' 'libarchive' 'zlib'
+ 'sndio' 'openal' 'vulkan-icd-loader' 'shaderc' 'vapoursynth' "${_undetected_depends[@]}"
+ 'ffmpeg'
)
optdepends=('youtube-dl: Another way to view youtuve videos with mpv'
@@ -42,16 +41,15 @@ makedepends=('vulkan-headers' 'mesa' 'python-docutils'
'ladspa' 'x265' 'openal' 'jack' 'unzip'
'samba' 'acpitool' 'inxi' 'git' 'vapoursynth'
'libvdpau' 'libva' 'streamlink' 'cuda'
- 'ffnvcodec-headers' 'youtube-dl' 'ffnvcodec-headers')
+ 'ffnvcodec-headers' 'ffnvcodec-headers')
optdepends+=('cuda: for CUVID hardware-acceleration for NVIDIA users')
provides=('mpv' 'mpv-git')
conflicts=('mpv' 'mpv-vapoursynth' 'mpv-ahjolinna-build-git' 'mpv-build-git' 'mpv-ahjolinna' )
options=('!emptydirs')
-source=('git+https://github.com/mpv-player/mpv'
+source=(git+https://github.com/mpv-player/mpv
'git+https://github.com/ahjolinna/mpv-conf'
- 'find-deps.py'
- 'mpv-hq.desktop'
+ 'mpv-hq.desktop'
'mpv-lq.desktop'
'mpv-mq.desktop'
'mpv-MVtools.desktop'
@@ -60,7 +58,6 @@ source=('git+https://github.com/mpv-player/mpv'
sha256sums=('SKIP'
'SKIP'
- 'ce974e160347202e0dc63f6a7a5a89e52d2cc1db2d000c661fddb9dc1d007c02'
'ddd18dbccdaa4513586cb97299e88564e3289940f25d7ebe762c4482fbad3809'
'e02f7b07653ea4ce9745b9f699954f5a4eafd416ada5a5d032c7dd7294921f90'
'8cf41f23572417836084209fce343f779e72dea9688dc84e23e8eb913d002d5f'
@@ -69,169 +66,190 @@ sha256sums=('SKIP'
'b703510f6e1f36d3f00008c282c7fef52057aa5703b412a7b750fb05c3a6a2e5')
pkgver() {
- cd "${srcdir}/$_gitname"
+ cd "$srcdir/$_gitname"
local _version="$(git tag | sort -Vr | head -n1 | sed 's/^v//')"
- local _revision="$(git rev-list v${_version}..HEAD --count)"
+ local _revision="$(git rev-list v"$_version"..HEAD --count)"
local _shorthash="$(git rev-parse --short HEAD)"
-
+
printf "%s.r%s.g%s" "$_version" "$_revision" "$_shorthash"
}
prepare() {
- cd "${srcdir}/$_gitname"
+ cd "$srcdir/$_gitname"
msg2 "Running bootstrap. Please wait..."
./bootstrap.py
-}
+}
build() {
- cd "${srcdir}/$_gitname"
- ./waf configure \
- --color='yes' \
- --prefix='/usr' \
- --progress \
- --confdir='/etc/mpv' \
- \
- --disable-lgpl \
- --enable-libmpv-shared \
- --disable-libmpv-static \
- --disable-static-build \
- --disable-debug-build \
- \
- --enable-manpage-build \
- --disable-html-build \
- --disable-pdf-build \
- \
- --enable-cplugins \
- --enable-zsh-comp \
- --disable-test \
- --disable-clang-database \
- \
- --disable-android \
- --disable-uwp \
- --disable-win32-internal-pthreads \
- --enable-iconv \
- --enable-libsmbclient \
- --enable-lua \
- --enable-javascript \
- --enable-libass \
- --enable-libass-osd \
- --enable-zlib \
- --enable-libbluray \
- --enable-dvdread \
- --enable-dvdnav \
- --enable-cdda \
- --enable-uchardet \
- --enable-rubberband \
- --enable-lcms2 \
- --enable-vapoursynth \
- --enable-vapoursynth-lazy \
- --enable-libarchive \
- --enable-libavdevice \
- --lua='52arch' \
- \
- --enable-sdl2 \
- --enable-oss-audio \
- --enable-rsound \
- --enable-sndio \
- --enable-pulse \
- --enable-jack \
- --enable-openal \
- --disable-opensles \
- --enable-alsa \
- --disable-coreaudio \
- --disable-audiounit \
- --disable-wasapi \
- \
- --disable-cocoa \
- --enable-drm \
- --enable-drmprime \
- --enable-gbm \
- --enable-wayland-scanner \
- --enable-wayland-protocols \
- --enable-wayland \
- --enable-x11 \
- --enable-xv \
- --disable-gl-cocoa \
- --enable-gl-x11 \
- --enable-egl-x11 \
- --enable-egl-drm \
- --enable-gl-wayland \
- --disable-gl-win32 \
- --disable-gl-dxinterop \
- --disable-egl-angle \
- --disable-egl-angle-lib \
- --disable-egl-angle-win32 \
- --enable-vdpau \
- --enable-vdpau-gl-x11 \
- --enable-vaapi \
- --enable-vaapi-x11 \
- --enable-vaapi-wayland \
- --enable-vaapi-drm \
- --enable-vaapi-glx \
- --enable-vaapi-x-egl \
- --enable-caca \
- --enable-jpeg \
- --disable-direct3d \
- --enable-shaderc \
- --disable-d3d11 \
- --disable-rpi \
- --disable-ios-gl \
- --enable-plain-gl \
- --disable-mali-fbdev \
- --enable-gl \
- --enable-vulkan \
- \
- --disable-videotoolbox-gl \
- --disable-d3d-hwaccel \
- --disable-d3d9-hwaccel \
- --disable-gl-dxinterop-d3d9 \
- \
- --enable-tv \
- --enable-tv-v4l2 \
- --enable-libv4l2 \
- --enable-audio-input \
- --enable-dvbin \
- \
- --disable-apple-remote \
- --disable-macos-touchbar \
- --disable-macos-cocoa-cb
-
- ./waf build
+ local _common_opts=(
+ '--color=yes'
+ '--prefix=/usr'
+ '--progress'
+ '--confdir=/etc/mpv'
+
+ '--disable-lgpl'
+ '--enable-libmpv-shared'
+ '--disable-libmpv-static'
+ '--disable-static-build'
+ '--disable-build-date'
+ '--disable-debug-build'
+ '--enable-manpage-build'
+ '--disable-html-build'
+ '--disable-pdf-build'
+ '--enable-cplugins'
+ '--disable-clang-database'
+
+ '--disable-android'
+ '--disable-tvos'
+ '--disable-egl-android'
+ '--disable-swift'
+ '--disable-uwp'
+ '--disable-win32-internal-pthreads'
+ '--enable-iconv'
+ '--enable-lua'
+ '--enable-javascript'
+ '--enable-zlib'
+ '--enable-libbluray'
+ '--enable-dvdnav'
+ '--enable-cdda'
+ '--enable-uchardet'
+ '--enable-rubberband'
+ '--enable-zimg'
+ '--enable-lcms2'
+ '--enable-vapoursynth'
+ '--enable-libarchive'
+ '--enable-dvbin'
+ '--enable-sdl2'
+ '--enable-sdl2-gamepad'
+ '--enable-libavdevice'
+ '--disable-ffmpeg-strict-abi'
+ '--lua=52arch'
+
+ '--enable-sdl2-audio'
+ '--enable-pulse'
+ '--enable-jack'
+ '--enable-openal'
+ '--disable-opensles'
+ '--enable-alsa'
+ '--disable-coreaudio'
+ '--disable-audiounit'
+ '--disable-wasapi'
+
+ '--enable-sdl2-video'
+ '--disable-cocoa'
+ '--enable-drm'
+ '--enable-gbm'
+ '--enable-wayland-scanner'
+ '--enable-wayland-protocols'
+ '--enable-wayland'
+ '--enable-x11'
+ '--enable-xv'
+ '--disable-gl-cocoa'
+ '--enable-gl-x11'
+ '--enable-egl'
+ '--enable-egl-x11'
+ '--enable-egl-drm'
+ '--enable-gl-wayland'
+ '--disable-gl-win32'
+ '--disable-gl-dxinterop'
+ '--disable-egl-angle'
+ '--disable-egl-angle-lib'
+ '--disable-egl-angle-win32'
+ '--enable-vdpau'
+ '--enable-vdpau-gl-x11'
+ '--enable-vaapi'
+ '--enable-vaapi-x11'
+ '--enable-vaapi-wayland'
+ '--enable-vaapi-drm'
+ '--enable-vaapi-x-egl'
+ '--enable-caca'
+ '--enable-jpeg'
+ '--disable-direct3d'
+ '--enable-shaderc'
+ '--enable-spirv-cross'
+ '--disable-d3d11'
+ '--disable-rpi'
+ '--disable-ios-gl'
+ '--enable-plain-gl'
+ '--enable-gl'
+ '--enable-libplacebo'
+ '--enable-vulkan'
+
+ '--disable-videotoolbox-gl'
+ '--disable-d3d-hwaccel'
+ '--disable-d3d9-hwaccel'
+ '--disable-gl-dxinterop-d3d9'
+ '--enable-cuda-hwaccel'
+ '--enable-cuda-interop'
+ '--disable-rpi-mmal'
+
+ '--disable-macos-touchbar'
+ '--disable-macos-10-11-features'
+ '--disable-macos-10-12-2-features'
+ '--disable-macos-10-14-features'
+ '--disable-macos-media-player'
+ '--disable-macos-cocoa-cb')
+
+ cd "$srcdir/$_gitname"
+ # build without tests on the mpv binary (goes to package)
+ ./waf configure --disable-tests "${_common_opts[@]}"
+ ./waf build
+
+ # build with tests on the mpv binary (for tests only)
+ printf '%s\n' ' -> Building the test files (with tests)...'
+ export WAFLOCK='.lock-waf_linux_build-tests'
+ ./waf distclean configure --enable-tests "${_common_opts[@]}"
+ ./waf build
+
+}
+
+check() {
+ cd mpv
+
+ local _test
+ export LD_LIBRARY_PATH="$srcdir/mpv/build-tests"
+
+ while read -r -d '' _test
+ do
+ printf '%s\n' "Running test '$_test'..."
+ build-tests/mpv --unittest="$_test"
+ done < <(build-tests/mpv --unittest='help' |
+ awk 'FNR == 1 { next } !/all-simple|img_format|repack(|_zimg)/ { printf "%s\0", $1 }')
}
+
+
+
package() {
cd "$srcdir/$_gitname"
- ./waf install --destdir="${pkgdir}"
+
+
+ export WAFLOCK='.lock-waf_linux_build'
+ ./waf install --destdir="$pkgdir"
# install the .desktop files
- install -Dm644 "${srcdir}/mpv-lq.desktop" "${pkgdir}/usr/share/applications/mpv-lq.desktop"
- install -Dm644 "${srcdir}/mpv-mq.desktop" "${pkgdir}/usr/share/applications/mpv-mq.desktop"
- install -Dm644 "${srcdir}/mpv-hq.desktop" "${pkgdir}/usr/share/applications/mpv-hq.desktop"
- install -Dm644 "${srcdir}/mpv-MVtools.desktop" "${pkgdir}/usr/share/applications/mpv-MVtools.desktop"
- install -Dm644 "${srcdir}/mpv-CUDA.desktop" "${pkgdir}/usr/share/applications/mpv-CUDA.desktop"
- install -Dm644 "${srcdir}/mpv-SVP.desktop" "${pkgdir}/usr/share/applications/mpv-SVP.desktop"
+ install -Dm644 "$srcdir/mpv-lq.desktop" "$pkgdir/usr/share/applications/mpv-lq.desktop"
+ install -Dm644 "$srcdir/mpv-mq.desktop" "$pkgdir/usr/share/applications/mpv-mq.desktop"
+ install -Dm644 "$srcdir/mpv-hq.desktop" "$pkgdir/usr/share/applications/mpv-hq.desktop"
+ install -Dm644 "$srcdir/mpv-MVtools.desktop" "$pkgdir/usr/share/applications/mpv-MVtools.desktop"
+ install -Dm644 "$srcdir/mpv-CUDA.desktop" "$pkgdir/usr/share/applications/mpv-CUDA.desktop"
+ install -Dm644 "$srcdir/mpv-SVP.desktop" "$pkgdir/usr/share/applications/mpv-SVP.desktop"
# install BT.709 ICC profiles (https://github.com/mpv-player/mpv/issues/534#issuecomment-35823203)
- cd ${srcdir}/mpv-conf/PKGBUILD
+ cd "$srcdir"/mpv-conf/PKGBUILD
unzip BT.709_Profiles.zip
- install -Dm755 "BT.709_Profiles/BT.709.gamma.1.95.icc" "${pkgdir}/usr/share/color/icc/BT.709_Profiles/BT.709.gamma.1.95.icc"
- install -Dm755 "BT.709_Profiles/BT.709.gamma.1.95.icc" "${pkgdir}/usr/share/color/icc/BT.709_Profiles/BT.709.icc"
- install -Dm755 "BT.709_Profiles/BT.709.gamma.1.95.icc" "${pkgdir}/usr/share/color/icc/BT.709_Profiles/BT.709.linear.icc"
+ install -Dm755 "BT.709_Profiles/BT.709.gamma.1.95.icc" "$pkgdir/usr/share/color/icc/BT.709_Profiles/BT.709.gamma.1.95.icc"
+ install -Dm755 "BT.709_Profiles/BT.709.gamma.1.95.icc" "$pkgdir/usr/share/color/icc/BT.709_Profiles/BT.709.icc"
+ install -Dm755 "BT.709_Profiles/BT.709.gamma.1.95.icc" "$pkgdir/usr/share/color/icc/BT.709_Profiles/BT.709.linear.icc"
#install ahjolinna "config-build" files
- cp -R ${srcdir}/mpv-conf/mpv/etc/* ${pkgdir}/etc/mpv
- install -d "${pkgdir}/etc/mpv/"
-
-cp $srcdir/$_gitname/etc/encoding-profiles.conf ${pkgdir}/etc/mpv
+ cp -R "$srcdir"/mpv-conf/mpv/etc/* "$pkgdir"/etc/mpv
+ install -d "$pkgdir/etc/mpv/"
- # Update dependencies automatically based on dynamic libraries
- _detected_depends=($("$srcdir"/find-deps.py "$pkgdir"/usr/{bin/mpv,lib/libmpv.so}))
+cp "$srcdir/$_gitname"/etc/encoding-profiles.conf "$pkgdir"/etc/mpv
- msg 'Auto-detected dependencies:'
- echo "${_detected_depends[@]}" | fold -s -w 79 | sed 's/^/ /'
- depends=("${_detected_depends[@]}" "${_undetected_depends[@]}")
-}
+ }