Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/
Date: Mon, 11 Mar 2019 03:07:17
Message-Id: 1552273611.f9910ada4e1c2e2701a5fbf6d22305ebdfcb2bdf.gyakovlev@gentoo
1 commit: f9910ada4e1c2e2701a5fbf6d22305ebdfcb2bdf
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 11 03:06:31 2019 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 11 03:06:51 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9910ada
7
8 media-video/mpv: drop old
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.12
11 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
12
13 media-video/mpv/Manifest | 1 -
14 media-video/mpv/mpv-0.28.2.ebuild | 366 --------------------------------------
15 media-video/mpv/mpv-0.29.1.ebuild | 362 -------------------------------------
16 3 files changed, 729 deletions(-)
17
18 diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest
19 index a5ac9642e75..dcb75529845 100644
20 --- a/media-video/mpv/Manifest
21 +++ b/media-video/mpv/Manifest
22 @@ -1,6 +1,5 @@
23 DIST mpv-0.27.2-patches-r0.tar.xz 6564 BLAKE2B c02efea40e0b19d60eaa49520988464fbf4c9221108cbf19021934dc0cb0a975dab148ec1ea03753d81b8035173e3e5bd74b262ab5675d9fc5dce4a0f75ea37c SHA512 d1c955c32082338f5c7f1cd8268471ca0ac6dcd817c5fe39fb82f0e8bd3babf6f2f954d4ce52e9be786e5527df75cc6f4f3de8106a3517c8a1d8e39be1b4ebbd
24 DIST mpv-0.27.2.tar.gz 2957191 BLAKE2B 35e316e5a30869ae44ff229e99ae11a88e2f7d55b55946bfb752d5ed2d8212885c0c2abb59c9ff6d23a72daee47d80f44511313d67ee6fb265e6681ba4b89ee1 SHA512 bf74a150b3732b8c233362e0902c54f85fbea9ca1765a2a8f946a6eecd9b37a72ede36a36d0dd98a770539c4f81fe24c8ce26be9db7cd6eddd8514a8f82d9cda
25 -DIST mpv-0.28.2.tar.gz 2982558 BLAKE2B 5faef4122d456916f43bd603192fc72dee1ad16fa3c842d54a2e53dc8f9db416545549a86af62481fe211dc088821ab13b832c09f82572b36167dd3a73d57f62 SHA512 e6206e8c65dca084e2cfa73ab09278b7113cdfd90b89877d1f75a1068c6379a093ea3955a023857357683edce1aba8c12ee441fd195d887af4d939fc7b66cef4
26 DIST mpv-0.29.1.tar.gz 3059503 BLAKE2B 231e7c184d441c126c6b6b7199810552981816e5afd59bce4b423c7b4f3739b540f26a4de947cb3cf87a31a7d3ce03a11a6d1247158250afde596f490321a537 SHA512 ec57c9ceaaf2915ee237dd5a1c5ea5d22725d8611e28a9b998e5bb0d8ab5bdf3631d0267fc7b54da31cb1eaa145ef35841e68846bd41c3b9e1024902e92fd086
27 DIST waf-1.9.8 100685 BLAKE2B b335115b7ba5af4f8f49fc4da7967fa20e0633bfc7de7ad28fdb58dfcf7ae9c7833d053d298280e26e94b18af70a66fc13d08adf1fc7f9ad9b81e70d95cc74fc SHA512 e7493767f65deeb38aa162adef22adf60ebbd038410e9cdf4fe6f0de8c43395dbbba14962aa2c3855e1277136085fc22ad12ebfb8ac4e76f16358296039b8ea2
28 DIST waf-2.0.9 103104 BLAKE2B c7e996aa49662da3ff941d076fc7e2dd23e867ade92a3b2ae07560b76d63a69e495184a1f9c76be5c51977ddb1713f9247f62e672033ecb988ac559e3a47e546 SHA512 0755170ded115b03e78a2096f197cd9fff62b5036db764153d26ce426f182ea7d7b8231cfa1a10b4a564a8480428502f3691851df66e7b83c7bca8e5fe26de7d
29
30 diff --git a/media-video/mpv/mpv-0.28.2.ebuild b/media-video/mpv/mpv-0.28.2.ebuild
31 deleted file mode 100644
32 index feb5199d743..00000000000
33 --- a/media-video/mpv/mpv-0.28.2.ebuild
34 +++ /dev/null
35 @@ -1,366 +0,0 @@
36 -# Copyright 1999-2018 Gentoo Authors
37 -# Distributed under the terms of the GNU General Public License v2
38 -
39 -EAPI=6
40 -
41 -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
42 -PYTHON_REQ_USE='threads(+)'
43 -
44 -WAF_PV=1.9.8
45 -
46 -inherit eapi7-ver flag-o-matic gnome2-utils pax-utils python-r1 toolchain-funcs waf-utils xdg-utils
47 -
48 -DESCRIPTION="Media player based on MPlayer and mplayer2"
49 -HOMEPAGE="https://mpv.io/"
50 -
51 -if [[ ${PV} != *9999* ]]; then
52 - SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
53 - KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux"
54 - DOCS=( RELEASE_NOTES )
55 -else
56 - EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
57 - inherit git-r3
58 - DOCS=(); SRC_URI=""
59 -fi
60 -SRC_URI+=" https://waf.io/waf-${WAF_PV}"
61 -DOCS+=( README.md DOCS/{client-api,interface}-changes.rst )
62 -
63 -# See Copyright in sources and Gentoo bug 506946. Waf is BSD, libmpv is ISC.
64 -LICENSE="LGPL-2.1+ GPL-2+ BSD ISC samba? ( GPL-3+ )"
65 -SLOT="0"
66 -IUSE="+alsa aqua archive bluray cdda +cli coreaudio cplugins cuda doc drm dvb
67 - dvd +egl encode gbm +iconv jack javascript jpeg lcms +libass libav libcaca
68 - libmpv +lua luajit openal +opengl oss pulseaudio raspberry-pi rubberband
69 - samba sdl selinux test tools +uchardet v4l vaapi vdpau vulkan wayland +X
70 - +xv zlib zsh-completion"
71 -
72 -REQUIRED_USE="
73 - || ( cli libmpv )
74 - aqua? ( opengl )
75 - cuda? ( !libav opengl )
76 - egl? ( || ( gbm X wayland ) )
77 - gbm? ( drm egl opengl )
78 - lcms? ( opengl )
79 - luajit? ( lua )
80 - opengl? ( || ( aqua egl X raspberry-pi !cli ) )
81 - raspberry-pi? ( opengl )
82 - test? ( opengl )
83 - tools? ( cli )
84 - uchardet? ( iconv )
85 - v4l? ( || ( alsa oss ) )
86 - vaapi? ( || ( gbm X wayland ) )
87 - vdpau? ( X )
88 - vulkan? ( || ( X wayland ) )
89 - wayland? ( egl )
90 - X? ( egl? ( opengl ) )
91 - xv? ( X )
92 - zsh-completion? ( cli )
93 - ${PYTHON_REQUIRED_USE}
94 -"
95 -
96 -COMMON_DEPEND="
97 - !libav? ( >=media-video/ffmpeg-4.0:0=[encode?,threads,vaapi?,vdpau?] )
98 - libav? ( ~media-video/libav-9999:0=[encode?,threads,vaapi?,vdpau?] )
99 - alsa? ( >=media-libs/alsa-lib-1.0.18 )
100 - archive? ( >=app-arch/libarchive-3.0.0:= )
101 - bluray? ( >=media-libs/libbluray-0.3.0:= )
102 - cdda? ( dev-libs/libcdio-paranoia )
103 - drm? ( x11-libs/libdrm )
104 - dvd? (
105 - >=media-libs/libdvdnav-4.2.0
106 - >=media-libs/libdvdread-4.1.0
107 - )
108 - egl? ( media-libs/mesa[egl,gbm(-)?,wayland(-)?] )
109 - iconv? (
110 - virtual/libiconv
111 - uchardet? ( app-i18n/uchardet )
112 - )
113 - jack? ( virtual/jack )
114 - javascript? ( >=dev-lang/mujs-1.0.0 )
115 - jpeg? ( virtual/jpeg:0 )
116 - lcms? ( >=media-libs/lcms-2.6:2 )
117 - libass? (
118 - >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz]
119 - virtual/ttf-fonts
120 - )
121 - libcaca? ( >=media-libs/libcaca-0.99_beta18 )
122 - lua? (
123 - !luajit? ( <dev-lang/lua-5.3:= )
124 - luajit? ( dev-lang/luajit:2 )
125 - )
126 - openal? ( >=media-libs/openal-1.13 )
127 - pulseaudio? ( media-sound/pulseaudio )
128 - raspberry-pi? ( >=media-libs/raspberrypi-userland-0_pre20160305-r1 )
129 - rubberband? ( >=media-libs/rubberband-1.8.0 )
130 - samba? ( net-fs/samba )
131 - sdl? ( media-libs/libsdl2[sound,threads,video] )
132 - v4l? ( media-libs/libv4l )
133 - vaapi? ( x11-libs/libva:=[drm?,X?,wayland?] )
134 - vdpau? ( x11-libs/libvdpau )
135 - vulkan? (
136 - media-libs/shaderc
137 - media-libs/vulkan-loader[X?,wayland?]
138 - )
139 - wayland? (
140 - >=dev-libs/wayland-1.6.0
141 - >=x11-libs/libxkbcommon-0.3.0
142 - dev-libs/wayland-protocols
143 - )
144 - X? (
145 - x11-libs/libX11
146 - x11-libs/libXScrnSaver
147 - x11-libs/libXext
148 - x11-libs/libXinerama
149 - x11-libs/libXrandr
150 - opengl? (
151 - x11-libs/libXdamage
152 - virtual/opengl
153 - )
154 - xv? ( x11-libs/libXv )
155 - )
156 - zlib? ( sys-libs/zlib )
157 -"
158 -DEPEND="${COMMON_DEPEND}
159 - ${PYTHON_DEPS}
160 - dev-python/docutils
161 - virtual/pkgconfig
162 - doc? ( dev-python/rst2pdf )
163 - dvb? ( virtual/linuxtv-dvb-headers )
164 - test? ( >=dev-util/cmocka-1.0.0 )
165 - v4l? ( virtual/os-headers )
166 - zsh-completion? ( dev-lang/perl )
167 -"
168 -RDEPEND="${COMMON_DEPEND}
169 - cuda? ( x11-drivers/nvidia-drivers[X] )
170 - selinux? ( sec-policy/selinux-mplayer )
171 - tools? ( ${PYTHON_DEPS} )
172 -"
173 -
174 -PATCHES=(
175 - "${FILESDIR}/${PN}-0.19.0-make-ffmpeg-version-check-non-fatal.patch"
176 - "${FILESDIR}/${PN}-0.25.0-fix-float-comparisons-in-tests.patch"
177 - "${FILESDIR}/${PN}-0.27.0-add-missing-link-flags-for-rpi.patch"
178 -)
179 -
180 -src_prepare() {
181 - cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
182 - chmod +x "${S}"/waf || die
183 - default_src_prepare
184 -}
185 -
186 -src_configure() {
187 - python_setup
188 - tc-export CC PKG_CONFIG AR
189 -
190 - if use raspberry-pi; then
191 - append-cflags -I"${SYSROOT%/}${EPREFIX}/opt/vc/include"
192 - append-ldflags -L"${SYSROOT%/}${EPREFIX}/opt/vc/lib"
193 - fi
194 -
195 - # Prevent access violations from zsh completion generation.
196 - # See Gentoo bug 656086.
197 - use zsh-completion && addpredict /dev/dri
198 -
199 - local mywafargs=(
200 - --confdir="${EPREFIX}/etc/${PN}"
201 - --docdir="${EPREFIX}/usr/share/doc/${PF}"
202 - --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
203 -
204 - $(usex cli '' '--disable-cplayer')
205 - $(use_enable libmpv libmpv-shared)
206 -
207 - --disable-libmpv-static
208 - --disable-static-build
209 - # See deep down below for build-date.
210 - --disable-optimize # Don't add '-O2' to CFLAGS.
211 - --disable-debug-build # Don't add '-g' to CFLAGS.
212 - --enable-html-build
213 -
214 - $(use_enable doc pdf-build)
215 - $(use_enable cplugins)
216 - $(use_enable zsh-completion zsh-comp)
217 - $(use_enable test)
218 -
219 - --disable-android
220 - $(use_enable iconv)
221 - $(use_enable samba libsmbclient)
222 - $(use_enable lua)
223 - $(usex luajit '--lua=luajit' '')
224 - $(use_enable javascript)
225 - $(use_enable libass)
226 - $(use_enable libass libass-osd)
227 - $(use_enable zlib)
228 - $(use_enable encode encoding)
229 - $(use_enable bluray libbluray)
230 - $(use_enable dvd dvdread)
231 - $(use_enable dvd dvdnav)
232 - $(use_enable cdda)
233 - $(use_enable uchardet)
234 - $(use_enable rubberband)
235 - $(use_enable lcms lcms2)
236 - --disable-vapoursynth # Only available in overlays.
237 - --disable-vapoursynth-lazy
238 - $(use_enable archive libarchive)
239 -
240 - --enable-libavdevice
241 -
242 - # Audio outputs:
243 - $(use_enable sdl sdl2) # Listed under audio, but also includes video.
244 - --disable-sdl1
245 - $(use_enable oss oss-audio)
246 - --disable-rsound # Only available in overlays.
247 - --disable-sndio # Only available in overlays.
248 - $(use_enable pulseaudio pulse)
249 - $(use_enable jack)
250 - $(use_enable openal)
251 - --disable-opensles
252 - $(use_enable alsa)
253 - $(use_enable coreaudio)
254 -
255 - # Video outputs:
256 - $(use_enable aqua cocoa)
257 - $(use_enable drm)
258 - $(use_enable gbm)
259 - $(use_enable wayland wayland-scanner)
260 - $(use_enable wayland wayland-protocols)
261 - $(use_enable wayland)
262 - $(use_enable X x11)
263 - $(use_enable xv)
264 - $(usex opengl "$(use_enable aqua gl-cocoa)" '--disable-gl-cocoa')
265 - $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11')
266 - $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
267 - $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm')
268 - $(usex opengl "$(use_enable wayland gl-wayland)" '--disable-gl-wayland')
269 - $(use_enable vdpau)
270 - $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
271 - $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl.
272 - $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11')
273 - $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland')
274 - $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm')
275 - $(use_enable libcaca caca)
276 - $(use_enable jpeg)
277 - $(use_enable vulkan shaderc)
278 - $(use_enable raspberry-pi rpi)
279 - $(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl')
280 - --disable-mali-fbdev # Only available in overlays.
281 - $(usex opengl '' '--disable-gl')
282 - $(use_enable vulkan)
283 -
284 - # HWaccels:
285 - # Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.
286 - $(use_enable cuda cuda-hwaccel)
287 -
288 - # TV features:
289 - $(use_enable v4l tv)
290 - $(use_enable v4l tv-v4l2)
291 - $(use_enable v4l libv4l2)
292 - $(use_enable v4l audio-input)
293 - $(use_enable dvb dvbin)
294 -
295 - # Miscellaneous features:
296 - --disable-apple-remote # Needs testing first. See Gentoo bug 577332.
297 - )
298 -
299 - if use vaapi && use X; then
300 - mywafargs+=(
301 - $(use_enable opengl vaapi-glx)
302 - $(use_enable egl vaapi-x-egl)
303 - )
304 - fi
305 -
306 - # Create reproducible non-live builds.
307 - [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)
308 -
309 - waf-utils_src_configure "${mywafargs[@]}"
310 -}
311 -
312 -src_install() {
313 - waf-utils_src_install
314 -
315 - if use lua; then
316 - insinto /usr/share/${PN}
317 - doins -r TOOLS/lua
318 - fi
319 -
320 - if use cli && use luajit; then
321 - pax-mark -m "${ED}"usr/bin/${PN}
322 - fi
323 -
324 - if use tools; then
325 - dobin TOOLS/{mpv_identify.sh,umpv}
326 - newbin TOOLS/idet.sh mpv_idet.sh
327 - python_replicate_script "${ED}"usr/bin/umpv
328 - fi
329 -}
330 -
331 -pkg_postinst() {
332 - local rv softvol_0_18_1=0 osc_0_21_0=0 txtsubs_0_24_0=0 opengl_0_25_0=0
333 -
334 - for rv in ${REPLACING_VERSIONS}; do
335 - ver_test ${rv} -lt 0.18.1 && softvol_0_18_1=1
336 - ver_test ${rv} -lt 0.21.0 && osc_0_21_0=1
337 - ver_test ${rv} -lt 0.24.0 && txtsubs_0_24_0=1
338 - ver_test ${rv} -lt 0.25.0 && ! use opengl && opengl_0_25_0=1
339 - done
340 -
341 - if [[ ${softvol_0_18_1} -eq 1 ]]; then
342 - elog "Since version 0.18.1 the software volume control is always enabled."
343 - elog "This means that volume controls don't change the system volume,"
344 - elog "e.g. per-application volume with PulseAudio."
345 - elog "If you want to restore the previous behaviour, please refer to"
346 - elog
347 - elog "https://wiki.gentoo.org/wiki/Mpv#Volume_in_0.18.1"
348 - elog
349 - fi
350 -
351 - if [[ ${osc_0_21_0} -eq 1 ]]; then
352 - elog "In version 0.21.0 the default OSC layout was changed."
353 - elog "If you want to restore the previous layout, please refer to"
354 - elog
355 - elog "https://wiki.gentoo.org/wiki/Mpv#OSC_in_0.21.0"
356 - elog
357 - fi
358 -
359 - if [[ ${txtsubs_0_24_0} -eq 1 ]]; then
360 - elog "Since version 0.24.0 subtitles with .txt extension aren't autoloaded."
361 - elog "If you want to restore the previous behaviour, please refer to"
362 - elog
363 - elog "https://wiki.gentoo.org/wiki/Mpv#Subtitles_with_.txt_extension_in_0.24.0"
364 - elog
365 - fi
366 -
367 - if [[ ${opengl_0_25_0} -eq 1 ]]; then
368 - elog "Since version 0.25.0 the 'opengl' USE flag is mapped to"
369 - elog "the 'opengl' video output and no longer explicitly requires"
370 - elog "X11 or Mac OS Aqua. Consider enabling the 'opengl' USE flag."
371 - fi
372 -
373 - if use cli && ! has_version 'app-shells/mpv-bash-completion'; then
374 - elog "If you want to have command-line completion via bash-completion,"
375 - elog "please install app-shells/mpv-bash-completion."
376 - fi
377 -
378 - if use cli && [[ -n ${REPLACING_VERSIONS} ]] &&
379 - has_version 'app-shells/mpv-bash-completion'; then
380 - elog "If command-line completion doesn't work after mpv update,"
381 - elog "please rebuild app-shells/mpv-bash-completion."
382 - fi
383 -
384 - gnome2_icon_cache_update
385 - xdg_desktop_database_update
386 -}
387 -
388 -pkg_postrm() {
389 - gnome2_icon_cache_update
390 - xdg_desktop_database_update
391 -}
392 -
393 -src_test() {
394 - cd "${S}"/build/test || die
395 - local test
396 - for test in *; do
397 - if [[ -x ${test} ]]; then
398 - ./"${test}" || die "Test suite failed"
399 - fi
400 - done
401 -}
402
403 diff --git a/media-video/mpv/mpv-0.29.1.ebuild b/media-video/mpv/mpv-0.29.1.ebuild
404 deleted file mode 100644
405 index 9607105c7d3..00000000000
406 --- a/media-video/mpv/mpv-0.29.1.ebuild
407 +++ /dev/null
408 @@ -1,362 +0,0 @@
409 -# Copyright 1999-2018 Gentoo Authors
410 -# Distributed under the terms of the GNU General Public License v2
411 -
412 -EAPI=6
413 -
414 -PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6,3_7} )
415 -PYTHON_REQ_USE='threads(+)'
416 -
417 -WAF_PV=2.0.9
418 -
419 -inherit eapi7-ver flag-o-matic gnome2-utils pax-utils python-r1 toolchain-funcs waf-utils xdg-utils
420 -
421 -DESCRIPTION="Media player based on MPlayer and mplayer2"
422 -HOMEPAGE="https://mpv.io/"
423 -
424 -if [[ ${PV} != *9999* ]]; then
425 - SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
426 - KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux"
427 - DOCS=( RELEASE_NOTES )
428 -else
429 - EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
430 - inherit git-r3
431 - DOCS=(); SRC_URI=""
432 -fi
433 -SRC_URI+=" https://waf.io/waf-${WAF_PV}"
434 -DOCS+=( README.md DOCS/{client-api,interface}-changes.rst )
435 -
436 -# See Copyright in sources and Gentoo bug 506946. Waf is BSD, libmpv is ISC.
437 -LICENSE="LGPL-2.1+ GPL-2+ BSD ISC samba? ( GPL-3+ )"
438 -SLOT="0"
439 -IUSE="+alsa aqua archive bluray cdda +cli coreaudio cplugins cuda doc drm dvb
440 - dvd +egl gbm +iconv jack javascript jpeg lcms +libass libcaca libmpv +lua
441 - luajit openal +opengl oss pulseaudio raspberry-pi rubberband samba sdl
442 - selinux test tools +uchardet v4l vaapi vdpau vulkan wayland +X +xv zlib
443 - zsh-completion"
444 -
445 -REQUIRED_USE="
446 - || ( cli libmpv )
447 - aqua? ( opengl )
448 - cuda? ( opengl )
449 - egl? ( || ( gbm X wayland ) )
450 - gbm? ( drm egl opengl )
451 - lcms? ( opengl )
452 - luajit? ( lua )
453 - opengl? ( || ( aqua egl X raspberry-pi !cli ) )
454 - raspberry-pi? ( opengl )
455 - test? ( opengl )
456 - tools? ( cli )
457 - uchardet? ( iconv )
458 - v4l? ( || ( alsa oss ) )
459 - vaapi? ( || ( gbm X wayland ) )
460 - vdpau? ( X )
461 - vulkan? ( || ( X wayland ) )
462 - wayland? ( egl )
463 - X? ( egl? ( opengl ) )
464 - xv? ( X )
465 - zsh-completion? ( cli )
466 - ${PYTHON_REQUIRED_USE}
467 -"
468 -
469 -COMMON_DEPEND="
470 - >=media-video/ffmpeg-4.0:0=[encode,threads,vaapi?,vdpau?]
471 - alsa? ( >=media-libs/alsa-lib-1.0.18 )
472 - archive? ( >=app-arch/libarchive-3.0.0:= )
473 - bluray? ( >=media-libs/libbluray-0.3.0:= )
474 - cdda? ( dev-libs/libcdio-paranoia )
475 - drm? ( x11-libs/libdrm )
476 - dvd? (
477 - >=media-libs/libdvdnav-4.2.0
478 - >=media-libs/libdvdread-4.1.0
479 - )
480 - egl? ( media-libs/mesa[egl,gbm(-)?,wayland(-)?] )
481 - iconv? (
482 - virtual/libiconv
483 - uchardet? ( app-i18n/uchardet )
484 - )
485 - jack? ( virtual/jack )
486 - javascript? ( >=dev-lang/mujs-1.0.0 )
487 - jpeg? ( virtual/jpeg:0 )
488 - lcms? ( >=media-libs/lcms-2.6:2 )
489 - libass? (
490 - >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz]
491 - virtual/ttf-fonts
492 - )
493 - libcaca? ( >=media-libs/libcaca-0.99_beta18 )
494 - lua? (
495 - !luajit? ( <dev-lang/lua-5.3:= )
496 - luajit? ( dev-lang/luajit:2 )
497 - )
498 - openal? ( >=media-libs/openal-1.13 )
499 - pulseaudio? ( media-sound/pulseaudio )
500 - raspberry-pi? ( >=media-libs/raspberrypi-userland-0_pre20160305-r1 )
501 - rubberband? ( >=media-libs/rubberband-1.8.0 )
502 - samba? ( net-fs/samba )
503 - sdl? ( media-libs/libsdl2[sound,threads,video] )
504 - v4l? ( media-libs/libv4l )
505 - vaapi? ( x11-libs/libva:=[drm?,X?,wayland?] )
506 - vdpau? ( x11-libs/libvdpau )
507 - vulkan? (
508 - media-libs/shaderc
509 - media-libs/vulkan-loader[X?,wayland?]
510 - )
511 - wayland? (
512 - >=dev-libs/wayland-1.6.0
513 - >=dev-libs/wayland-protocols-1.14
514 - >=x11-libs/libxkbcommon-0.3.0
515 - )
516 - X? (
517 - x11-libs/libX11
518 - x11-libs/libXScrnSaver
519 - x11-libs/libXext
520 - x11-libs/libXinerama
521 - x11-libs/libXrandr
522 - opengl? (
523 - x11-libs/libXdamage
524 - virtual/opengl
525 - )
526 - xv? ( x11-libs/libXv )
527 - )
528 - zlib? ( sys-libs/zlib )
529 -"
530 -DEPEND="${COMMON_DEPEND}
531 - ${PYTHON_DEPS}
532 - dev-python/docutils
533 - virtual/pkgconfig
534 - cuda? ( >=media-libs/nv-codec-headers-8.1.24.1 )
535 - doc? ( dev-python/rst2pdf )
536 - dvb? ( virtual/linuxtv-dvb-headers )
537 - test? ( >=dev-util/cmocka-1.0.0 )
538 - v4l? ( virtual/os-headers )
539 - zsh-completion? ( dev-lang/perl )
540 -"
541 -RDEPEND="${COMMON_DEPEND}
542 - cuda? ( x11-drivers/nvidia-drivers[X] )
543 - selinux? ( sec-policy/selinux-mplayer )
544 - tools? ( ${PYTHON_DEPS} )
545 -"
546 -
547 -PATCHES=(
548 - "${FILESDIR}/${PN}-0.29.0-make-ffmpeg-version-check-non-fatal.patch"
549 -)
550 -
551 -src_prepare() {
552 - cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
553 - chmod +x "${S}"/waf || die
554 - default_src_prepare
555 -}
556 -
557 -src_configure() {
558 - python_setup
559 - tc-export CC PKG_CONFIG AR
560 -
561 - if use raspberry-pi; then
562 - append-cflags -I"${SYSROOT%/}${EPREFIX}/opt/vc/include"
563 - append-ldflags -L"${SYSROOT%/}${EPREFIX}/opt/vc/lib"
564 - fi
565 -
566 - # Prevent access violations from zsh completion generation.
567 - # See Gentoo bug 656086.
568 - use zsh-completion && addpredict /dev/dri
569 -
570 - local mywafargs=(
571 - --confdir="${EPREFIX}/etc/${PN}"
572 - --docdir="${EPREFIX}/usr/share/doc/${PF}"
573 - --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
574 -
575 - $(usex cli '' '--disable-cplayer')
576 - $(use_enable libmpv libmpv-shared)
577 -
578 - --disable-libmpv-static
579 - --disable-static-build
580 - # See deep down below for build-date.
581 - --disable-optimize # Don't add '-O2' to CFLAGS.
582 - --disable-debug-build # Don't add '-g' to CFLAGS.
583 - --enable-html-build
584 -
585 - $(use_enable doc pdf-build)
586 - $(use_enable cplugins)
587 - $(use_enable zsh-completion zsh-comp)
588 - $(use_enable test)
589 -
590 - --disable-android
591 - $(use_enable iconv)
592 - $(use_enable samba libsmbclient)
593 - $(use_enable lua)
594 - $(usex luajit '--lua=luajit' '')
595 - $(use_enable javascript)
596 - $(use_enable libass)
597 - $(use_enable libass libass-osd)
598 - $(use_enable zlib)
599 - $(use_enable bluray libbluray)
600 - $(use_enable dvd dvdread)
601 - $(use_enable dvd dvdnav)
602 - $(use_enable cdda)
603 - $(use_enable uchardet)
604 - $(use_enable rubberband)
605 - $(use_enable lcms lcms2)
606 - --disable-vapoursynth # Only available in overlays.
607 - --disable-vapoursynth-lazy
608 - $(use_enable archive libarchive)
609 -
610 - --enable-libavdevice
611 -
612 - # Audio outputs:
613 - $(use_enable sdl sdl2) # Listed under audio, but also includes video.
614 - $(use_enable oss oss-audio)
615 - --disable-rsound # Only available in overlays.
616 - --disable-sndio # Only available in overlays.
617 - $(use_enable pulseaudio pulse)
618 - $(use_enable jack)
619 - $(use_enable openal)
620 - --disable-opensles
621 - $(use_enable alsa)
622 - $(use_enable coreaudio)
623 -
624 - # Video outputs:
625 - $(use_enable aqua cocoa)
626 - $(use_enable drm)
627 - $(use_enable gbm)
628 - $(use_enable wayland wayland-scanner)
629 - $(use_enable wayland wayland-protocols)
630 - $(use_enable wayland)
631 - $(use_enable X x11)
632 - $(use_enable xv)
633 - $(usex opengl "$(use_enable aqua gl-cocoa)" '--disable-gl-cocoa')
634 - $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11')
635 - $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
636 - $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm')
637 - $(usex opengl "$(use_enable wayland gl-wayland)" '--disable-gl-wayland')
638 - $(use_enable vdpau)
639 - $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
640 - $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl.
641 - $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11')
642 - $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland')
643 - $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm')
644 - $(use_enable libcaca caca)
645 - $(use_enable jpeg)
646 - $(use_enable vulkan shaderc)
647 - $(use_enable raspberry-pi rpi)
648 - $(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl')
649 - --disable-mali-fbdev # Only available in overlays.
650 - $(usex opengl '' '--disable-gl')
651 - $(use_enable vulkan)
652 -
653 - # HWaccels:
654 - # Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.
655 - $(use_enable cuda cuda-hwaccel)
656 -
657 - # TV features:
658 - $(use_enable v4l tv)
659 - $(use_enable v4l tv-v4l2)
660 - $(use_enable v4l libv4l2)
661 - $(use_enable v4l audio-input)
662 - $(use_enable dvb dvbin)
663 -
664 - # Miscellaneous features:
665 - --disable-apple-remote # Needs testing first. See Gentoo bug 577332.
666 - )
667 -
668 - if use vaapi && use X; then
669 - mywafargs+=(
670 - $(use_enable opengl vaapi-glx)
671 - $(use_enable egl vaapi-x-egl)
672 - )
673 - fi
674 -
675 - # Create reproducible non-live builds.
676 - [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)
677 -
678 - waf-utils_src_configure "${mywafargs[@]}"
679 -}
680 -
681 -src_install() {
682 - waf-utils_src_install
683 -
684 - if use lua; then
685 - insinto /usr/share/${PN}
686 - doins -r TOOLS/lua
687 - fi
688 -
689 - if use cli && use luajit; then
690 - pax-mark -m "${ED}"usr/bin/${PN}
691 - fi
692 -
693 - if use tools; then
694 - dobin TOOLS/{mpv_identify.sh,umpv}
695 - newbin TOOLS/idet.sh mpv_idet.sh
696 - python_replicate_script "${ED}"usr/bin/umpv
697 - fi
698 -}
699 -
700 -pkg_postinst() {
701 - local rv softvol_0_18_1=0 osc_0_21_0=0 txtsubs_0_24_0=0 opengl_0_25_0=0
702 -
703 - for rv in ${REPLACING_VERSIONS}; do
704 - ver_test ${rv} -lt 0.18.1 && softvol_0_18_1=1
705 - ver_test ${rv} -lt 0.21.0 && osc_0_21_0=1
706 - ver_test ${rv} -lt 0.24.0 && txtsubs_0_24_0=1
707 - ver_test ${rv} -lt 0.25.0 && ! use opengl && opengl_0_25_0=1
708 - done
709 -
710 - if [[ ${softvol_0_18_1} -eq 1 ]]; then
711 - elog "Since version 0.18.1 the software volume control is always enabled."
712 - elog "This means that volume controls don't change the system volume,"
713 - elog "e.g. per-application volume with PulseAudio."
714 - elog "If you want to restore the previous behaviour, please refer to"
715 - elog
716 - elog "https://wiki.gentoo.org/wiki/Mpv#Volume_in_0.18.1"
717 - elog
718 - fi
719 -
720 - if [[ ${osc_0_21_0} -eq 1 ]]; then
721 - elog "In version 0.21.0 the default OSC layout was changed."
722 - elog "If you want to restore the previous layout, please refer to"
723 - elog
724 - elog "https://wiki.gentoo.org/wiki/Mpv#OSC_in_0.21.0"
725 - elog
726 - fi
727 -
728 - if [[ ${txtsubs_0_24_0} -eq 1 ]]; then
729 - elog "Since version 0.24.0 subtitles with .txt extension aren't autoloaded."
730 - elog "If you want to restore the previous behaviour, please refer to"
731 - elog
732 - elog "https://wiki.gentoo.org/wiki/Mpv#Subtitles_with_.txt_extension_in_0.24.0"
733 - elog
734 - fi
735 -
736 - if [[ ${opengl_0_25_0} -eq 1 ]]; then
737 - elog "Since version 0.25.0 the 'opengl' USE flag is mapped to"
738 - elog "the 'opengl' video output and no longer explicitly requires"
739 - elog "X11 or Mac OS Aqua. Consider enabling the 'opengl' USE flag."
740 - fi
741 -
742 - if use cli && ! has_version 'app-shells/mpv-bash-completion'; then
743 - elog "If you want to have command-line completion via bash-completion,"
744 - elog "please install app-shells/mpv-bash-completion."
745 - fi
746 -
747 - if use cli && [[ -n ${REPLACING_VERSIONS} ]] &&
748 - has_version 'app-shells/mpv-bash-completion'; then
749 - elog "If command-line completion doesn't work after mpv update,"
750 - elog "please rebuild app-shells/mpv-bash-completion."
751 - fi
752 -
753 - gnome2_icon_cache_update
754 - xdg_desktop_database_update
755 -}
756 -
757 -pkg_postrm() {
758 - gnome2_icon_cache_update
759 - xdg_desktop_database_update
760 -}
761 -
762 -src_test() {
763 - cd "${S}"/build/test || die
764 - local test
765 - for test in *; do
766 - if [[ -x ${test} ]]; then
767 - ./"${test}" || die "Test suite failed"
768 - fi
769 - done
770 -}