summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 98a70a7ca85ee479b090ec07ef4d9be65ecf55c5 (plain)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# Maintainer:

# NOTE:
# To enable CUDA support you need a ffmpeg build that has been
# compiled with CUDA (ffmpeg-full-git).
# CUDA is x86_64 only and so it will not be available in i686 builds.

# AUR dependencies
# ----------------
# i686: rsound sndio uchardet
# x86_64: all from i686 and ffmpeg-full-git

pkgname=mpv-semifull-git
pkgver=0.25.0.r216.g33cfb71ed
pkgrel=1
pkgdesc='A free, open source, and cross-platform media player [With most librarys excluding CUDA and INTEL for 
now...]'
arch=('i686' 'x86_64')
license=('GPL')
url='http://mpv.io/'
depends=(
  'lcms2' 'libgl' 'libxss' 'libxinerama' 'libxv' 'libxkbcommon' 'wayland'
  'desktop-file-utils' 'hicolor-icon-theme' 'xdg-utils' 'lua52' 'libdvdnav'
  'libxrandr' 'jack' 'vapoursynth' 'libarchive' 'uchardet' 'rsound' 'sndio'
)
depends_i686=(
  'libcdio-paranoia' 'libcaca' 'smbclient' 'rubberband' 'libass'
  'libbluray' 'sdl2' 'openal' 'ffmpeg'
)
depends_x86_64=('ffmpeg-git')
optdepends=('youtube-dl: for video-sharing websites playback')
makedepends=('git' 'mesa' 'python-docutils' 'ladspa')
provides=('mpv')
conflicts=('mpv' 'mpv-git')
options=('!emptydirs')
source=("$pkgname"::'git+https://github.com/mpv-player/mpv.git')
sha256sums=('SKIP')

pkgver() {
	cd "${srcdir}/${pkgname}"
	
	local _version="$(git tag | sort -Vr | head -n1 | sed 's/^v//')"
	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"
}

build() {
	cd "${srcdir}/${pkgname}"
	
	# Add CUDA to the build if architecture is x86_64
# 	if [ "$CARCH" = "x86_64" ] 
# 	then
# 	    _cuda="--enable-cuda-hwaccel"
# 	else
	    _cuda="--disable-cuda-hwaccel"
# 	fi
	
	msg2 "Running bootstrap. Please wait..."
	./bootstrap.py
	
	./waf configure \
	            --color=yes \
	            --prefix=/usr \
	            --confdir=/etc/mpv \
	            --progress \
	            --jobs=`echo $MAKEFLAGS | tr -d "j" | tr -d "-"` \
	            \
	            --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-win32-internal-pthreads \
	            --enable-iconv \
	            --enable-termios \
	            --enable-shm \
	            --enable-libsmbclient \
	            --enable-lua \
	            --enable-libass \
	            --enable-libass-osd \
	            --enable-encoding \
	            --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 \
	            --disable-sdl1 \
	            --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-gbm \
	            --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 \
	            --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 \
	            --disable-android \
	            --disable-rpi \
	            --disable-ios-gl \
	            --enable-plain-gl \
	            --disable-mali-fbdev \
	            --enable-gl \
	            \
	            --enable-vaapi-hwaccel \
	            --enable-vdpau-hwaccel \
	            --disable-d3d-hwaccel \
	            "$_cuda" \
	            \
	            --enable-tv \
	            --enable-tv-v4l2 \
	            --enable-libv4l2 \
	            --enable-audio-input \
	            --enable-dvbin \
	            --disable-apple-remote
	
	./waf build
}

package() {
	cd "${srcdir}/${pkgname}"
	
	./waf install --destdir="$pkgdir"
	
	install -m644 DOCS/{encoding.rst,tech-overview.txt} \
	        "$pkgdir"/usr/share/doc/mpv
}