blob: 7c1201bec77277bbf613f35590401cb190a2f04e (
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
|
# Copyright 2012-2015 Johannes Nixdorf <mixi@exherbo.org>
# Based in part upon 'mplayer2.exlib', which is
# Copyright 2011 Elias Pipping <pipping@exherbo.org>
# Copyright 2011 Alex Elsayed <eternaleye@gmail.com>
# Distributed under the terms of the GNU General Public License v2
# last checked revision: f59371de2170141fc28540d03c4e7ecc62844ebf
require freedesktop-desktop github [ user="mpv-player" tag="v${PV}" ] gtk-icon-cache waf \
lua [ multibuild=false whitelist="5.1 5.2" with_opt=true ]
export_exlib_phases src_prepare src_configure pkg_postrm pkg_postinst
if ever at_least 0.28; then
WAF_VER=1.9.8
else
WAF_VER=1.8.12
fi
SUMMARY="Video player based on MPlayer/mplayer2"
HOMEPAGE="https://mpv.io"
DOWNLOADS+=" https://waf.io/pub/release/waf-${WAF_VER}"
UPSTREAM_RELEASE_NOTES="https://github.com/mpv-player/mpv/releases"
LICENCES="GPL-2 GPL-3 LGPL-2.1"
SLOT="0"
# TODO(sardemff7): Drop dvd-menu option as there is no menu support in mpv
MYOPTIONS="
alsa
bluray [[ description = [ Adds support for video blurays ] ]]
cd [[ description = [ Adds support for audio CDs ] ]]
drm [[ description = [ Adds support for a video output directly to the framebuffer ] ]]
dvd
dvd-menu [[ description = [ Adds dvd menu support through libdvdnav ]
requires = [ dvd ] ]]
icc [[ description = [ Adds support for using ICC profiles through lcms2 ] ]]
lua [[ description = [ Adds lua scripting support and an onscreen controller ] ]]
opengl
pulseaudio
sndio [[ description = [ Adds support for sound output through sndio (OpenBSD sound API, also ported to Linux) ] ]]
va [[ description = [ Adds support for decoding and presenting video using the Video Acceleration API ]
requires = [ providers: ffmpeg ] ]]
vdpau [[ description = [ Adds support for presenting and decoding video using the VDPAU API (-vo=vdpau and -hwdec=vdpau) ]
requires = [ providers: ffmpeg ] ]]
wayland
X
zsh-completion [[ description = [ Generate and install a zsh completion file ] ]]
( providers: ffmpeg libav ) [[ number-selected = exactly-one ]]
( providers: ijg-jpeg jpeg-turbo ) [[ number-selected = exactly-one ]]
"
# disabled because i can't figure out waf
RESTRICT="test"
DEPENDENCIES="
build:
dev-lang/python:*
dev-python/docutils
virtual/pkg-config
X? ( x11-proto/xorgproto )
zsh-completion? ( dev-lang/perl:*[>=5.8] )
build+run:
media-libs/libass[fontconfig][>=0.12.1]
sys-libs/ncurses
sys-libs/zlib
alsa? ( sys-sound/alsa-lib[>=1.0.18] )
bluray? ( media-libs/libbluray[>=0.3.0] )
cd? (
dev-libs/libcdio
dev-libs/libcdio-paranoia
)
drm? ( x11-dri/libdrm )
dvd? ( media-libs/libdvdread[>=4.1.0] )
dvd-menu? ( media-libs/libdvdnav[>=4.2.0] )
icc? ( media-libs/lcms2[>=2.6] )
opengl? ( x11-dri/mesa[>=9.0.0][X?][wayland?] )
providers:ffmpeg? ( media/ffmpeg[>=3.3][va?][vdpau?] )
providers:ijg-jpeg? ( media-libs/jpeg:= )
providers:jpeg-turbo? ( media-libs/libjpeg-turbo )
providers:libav? ( media/libav[>=12] )
pulseaudio? ( media-sound/pulseaudio[>=1.0] )
sndio? ( sys-sound/sndio )
va? ( x11-libs/libva[>=1.4.0][X?][wayland?] )
vdpau? ( x11-libs/libvdpau[>=0.2] )
wayland? (
sys-libs/wayland[>=1.6.0]
x11-libs/libxkbcommon[>=0.3.0]
)
X? (
x11-libs/libX11[>=1.0.0]
x11-libs/libXScrnSaver[>=1.0.0]
x11-libs/libXext[>=1.0.0]
x11-libs/libXinerama[>=1.0.0]
x11-libs/libXrandr[>=1.2.0]
x11-libs/libXv
)
suggestion:
lua? ( net-misc/youtube-dl[>=2015.02.23.1] [[ description = [ Support to play videos from YouTube and other video sites ] ]] )
"
if ever at_least 0.28; then
DEPENDENCIES+="
build+run:
providers:ffmpeg? ( media/ffmpeg[>=4.0][va?][vdpau?] )
wayland? ( sys-libs/wayland-protocols )
"
fi
mpv_src_prepare() {
edo cp "${FETCHEDDIR}"/waf-${WAF_VER} waf
chmod +x waf
default
}
mpv_src_configure() {
local args=(
## paths
--prefix=/usr/$(exhost --target)
--confdir=/etc/${PN}
--datadir=/usr/share
--docdir=/usr/share/doc/${PNVR}
--htmldir=/usr/share/doc/${PNVR}/html
## doc
--enable-manpage-build
--disable-html-build
--disable-pdf-build
## misc
# Since upstream commit d0238711 this is disabled by default and will be deprecated at some
# point soon.
--enable-iconv
--enable-jpeg
--enable-libass
--enable-libass-osd
--enable-libmpv-shared
--disable-javascript
--disable-macos-touchbar
--disable-test
--disable-uchardet
--disable-vapoursynth
--disable-vapoursynth-lazy
$(option lua --lua=${LUA_ABIS/./}fbsd --disable-lua)
$(option_enable zsh-completion zsh-comp)
## sources
--enable-audio-input
--enable-dvbin
--enable-tv
--enable-tv-v4l2
--disable-libarchive
--disable-libsmbclient
--disable-libv4l2
$(option_enable bluray libbluray)
$(option_enable cd cdda)
$(option_enable dvd dvdread)
$(option_enable dvd-menu dvdnav)
$(option_enable providers:ffmpeg libavdevice)
## audio
--disable-rubberband
## audio out
--enable-oss-audio
--disable-audiounit
--disable-coreaudio
--disable-jack
--disable-openal
--disable-opensles
--disable-rsound
--disable-sdl2
--disable-sndio
--disable-wasapi
$(option_enable alsa)
$(option_enable pulseaudio pulse)
$(option_enable sndio)
## video
--disable-caca
$(option_enable icc lcms2)
## video out
$(option_enable drm)
$(if option drm; then
option_enable opengl egl-drm
option_enable va vaapi-drm
fi)
$(option_enable opengl gl)
$(option_enable opengl plain-gl)
$(option_enable wayland)
$(if option wayland; then
option_enable opengl gl-wayland
option_enable va vaapi-wayland
fi)
$(option_enable X x11)
$(option_enable X xv)
$(if option X; then
option_enable opengl gl-x11
option_enable opengl egl-x11
option_enable va vaapi-x11
if option opengl; then
option_enable va vaapi-glx
option_enable vdpau vdpau-gl-x11
fi
fi)
## platform
--disable-android
--disable-cocoa
--disable-direct3d
--disable-egl-angle
--disable-gl-cocoa
--disable-gl-win32
--disable-ios-gl
--disable-mali-fbdev
--disable-rpi
--disable-videotoolbox-gl
## hwaccel
--disable-cuda-hwaccel
--disable-d3d-hwaccel
--disable-d3d9-hwaccel
--disable-gl-dxinterop-d3d9
$(option_enable va vaapi)
$(option_enable vdpau)
)
if ever at_least 0.28; then
args+=(
## video out
--disable-crossc
--disable-shaderc
--disable-vulkan
$(option_enable drm drmprime)
$(option_enable wayland wayland-protocols)
$(option_enable wayland wayland-scanner)
## platform
--disable-d3d11
)
else
args+=(
## misc
--enable-shm
--enable-termios
## hwaccel
--disable-d3d-hwaccel-new
--disable-videotoolbox-hwaccel-new
--disable-videotoolbox-hwaccel-old
$(option_enable va vaapi-hwaccel)
$(option_enable vdpau vdpau-hwaccel)
)
fi
ewaf --jobs=1 configure \
"${args[@]}"
}
mpv_pkg_postrm() {
freedesktop-desktop_pkg_postrm
gtk-icon-cache_pkg_postrm
}
mpv_pkg_postinst() {
freedesktop-desktop_pkg_postinst
gtk-icon-cache_pkg_postinst
}
|