summaryrefslogtreecommitdiffstats
path: root/mpv/PKGBUILD
blob: e31f9107dfec73e7f318fba58358027e4f6e9c8d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Maintainer: Justin Gassner <justin.gassner@mailbox.org>

_pkgname=mpv
pkgname=$_pkgname-jxir
epoch=1
pkgver=0.30.0.r162.g78cf974375
pkgrel=1
pkgdesc='a free, open source, and cross-platform media player'
arch=('x86_64')
license=('GPL')
url='https://mpv.io'
depends=('ffmpeg' 'libarchive' 'libxinerama' 'libxrandr' 'libxss' 'lua52')
makedepends=('git' 'mesa' 'python-docutils')
optdepends=('youtube-dl: for video-sharing websites playback')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=('git+https://github.com/mpv-player/mpv')
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgname"
  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g;'
}

prepare() {
  cd "$srcdir/$_pkgname"
  ./bootstrap.py
}

build() {
  cd "$srcdir/$_pkgname"
  ./waf configure \
    --prefix=/usr \
    --confdir=/etc/mpv \
    --disable-debug-build \
    --enable-manpage-build \
    --disable-android \
    --disable-javascript \
    --disable-libbluray \
    --disable-uchardet \
    --disable-rubberband \
    --disable-zimg \
    --disable-lcms2 \
    --disable-vapoursynth \
    --disable-libavdevice \
    --lua=52arch \
    --disable-oss-audio \
    --disable-rsound \
    --disable-pulse \
    --disable-jack \
    --disable-opensles \
    --disable-coreaudio \
    --disable-audiounit \
    --disable-wasapi \
    --disable-cocoa \
    --disable-drm \
    --disable-drmprime \
    --disable-gbm \
    --disable-wayland-scanner \
    --disable-wayland-protocols \
    --disable-wayland \
    --disable-xv \
    --disable-vdpau \
    --enable-vaapi \
    --disable-caca \
    --disable-jpeg \
    --disable-direct3d \
    --disable-shaderc \
    --disable-spirv-cross \
    --disable-rpi \
    --disable-ios-gl \
    --disable-libplacebo \
    --disable-vulkan \
    --disable-videotoolbox-gl \
    --disable-d3d-hwaccel \
    --disable-d3d9-hwaccel \
    --disable-gl-dxinterop-d3d9 \
    --disable-cuda-hwaccel \
    --disable-apple-remote \
    --disable-macos-touchbar
  ./waf build
}

package() {
  cd "$srcdir/$_pkgname"
  ./waf install --destdir="$pkgdir"
  rm -rf "$pkgdir/usr/share/applications/"
  rm -rf "$pkgdir/usr/share/doc/mpv/mplayer-input.conf"
  rm -rf "$pkgdir/usr/share/doc/mpv/restore-old-bindings.conf"
  rm -rf "$pkgdir/usr/share/icons/"
}