Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/
Date: Sat, 26 Oct 2019 19:21:00
Message-Id: 1572117652.770c3f9aaa0764a76c734f2bc67b33f418ff8cb6.zlogene@gentoo
1 commit: 770c3f9aaa0764a76c734f2bc67b33f418ff8cb6
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 26 19:19:00 2019 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 26 19:20:52 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=770c3f9a
7
8 media-video/mpv: Version bump (v0.30.0)
9
10 Package-Manager: Portage-2.3.76, Repoman-2.3.16
11 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
12
13 media-video/mpv/Manifest | 1 +
14 media-video/mpv/metadata.xml | 2 +
15 media-video/mpv/mpv-0.30.0.ebuild | 366 ++++++++++++++++++++++++++++++++++++++
16 3 files changed, 369 insertions(+)
17
18 diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest
19 index 21bdfcd5bd6..c67e827fa53 100644
20 --- a/media-video/mpv/Manifest
21 +++ b/media-video/mpv/Manifest
22 @@ -1,2 +1,3 @@
23 DIST mpv-0.29.1.tar.gz 3059503 BLAKE2B 231e7c184d441c126c6b6b7199810552981816e5afd59bce4b423c7b4f3739b540f26a4de947cb3cf87a31a7d3ce03a11a6d1247158250afde596f490321a537 SHA512 ec57c9ceaaf2915ee237dd5a1c5ea5d22725d8611e28a9b998e5bb0d8ab5bdf3631d0267fc7b54da31cb1eaa145ef35841e68846bd41c3b9e1024902e92fd086
24 +DIST mpv-0.30.0.tar.gz 3085141 BLAKE2B 314f6830f91e7dc11d3627688415c7535ef0ae462378d2c29cf036d5b851c55025ea5e9d5b0aa3f07ac6ec8c87350be65c882932bd908eab7c4f40b3840bf1a3 SHA512 2b3cc626575b5e56308f5f9ecf926957a36c861c85f700a4a3ede72cf7f7ea08729d20f810693117e21aeeff649f08718e73ead7d117521bf88d746708a72c66
25 DIST waf-2.0.9 103104 BLAKE2B c7e996aa49662da3ff941d076fc7e2dd23e867ade92a3b2ae07560b76d63a69e495184a1f9c76be5c51977ddb1713f9247f62e672033ecb988ac559e3a47e546 SHA512 0755170ded115b03e78a2096f197cd9fff62b5036db764153d26ce426f182ea7d7b8231cfa1a10b4a564a8480428502f3691851df66e7b83c7bca8e5fe26de7d
26
27 diff --git a/media-video/mpv/metadata.xml b/media-video/mpv/metadata.xml
28 index 61ab5a1fe43..f3befa90279 100644
29 --- a/media-video/mpv/metadata.xml
30 +++ b/media-video/mpv/metadata.xml
31 @@ -13,6 +13,7 @@
32 <flag name="cuda">Enable hardware video decoding via Nvidia CUDA</flag>
33 <flag name="drm">Enable Kernel Mode Setting / Direct Rendering Manager based video output</flag>
34 <flag name="egl">Enable support for various EGL-based video outputs / backends</flag>
35 + <flag name="gamepad">Enable gamepad input support</flag>
36 <flag name="gbm">Enable Graphics Buffer Manager based EGL video backend</flag>
37 <flag name="jpeg">Enable support for saving screenshots in JPEG format</flag>
38 <flag name="libass">Enable OSD (On Screen Display) and subtitles support via <pkg>media-libs/libass</pkg></flag>
39 @@ -27,6 +28,7 @@
40 <flag name="tools">Install extra tools: mpv_identify.sh, mpv_idet.sh, and umpv</flag>
41 <flag name="uchardet">Enable subtitles charset discovery via <pkg>app-i18n/uchardet</pkg></flag>
42 <flag name="vulkan">Enable support for various Vulkan-based video backends</flag>
43 + <flag name="zimg">Enable libzimg support (for vf_fingerprint)</flag>
44 </use>
45 <upstream>
46 <remote-id type="github">mpv-player/mpv</remote-id>
47
48 diff --git a/media-video/mpv/mpv-0.30.0.ebuild b/media-video/mpv/mpv-0.30.0.ebuild
49 new file mode 100644
50 index 00000000000..575ea9a56da
51 --- /dev/null
52 +++ b/media-video/mpv/mpv-0.30.0.ebuild
53 @@ -0,0 +1,366 @@
54 +# Copyright 1999-2019 Gentoo Authors
55 +# Distributed under the terms of the GNU General Public License v2
56 +
57 +EAPI=6
58 +
59 +PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
60 +PYTHON_REQ_USE='threads(+)'
61 +
62 +WAF_PV=2.0.9
63 +
64 +inherit eapi7-ver flag-o-matic gnome2-utils pax-utils python-r1 toolchain-funcs waf-utils xdg-utils
65 +
66 +DESCRIPTION="Media player based on MPlayer and mplayer2"
67 +HOMEPAGE="https://mpv.io/"
68 +
69 +if [[ ${PV} != *9999* ]]; then
70 + SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
71 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux"
72 + DOCS=( RELEASE_NOTES )
73 +else
74 + EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
75 + inherit git-r3
76 + DOCS=(); SRC_URI=""
77 +fi
78 +SRC_URI+=" https://waf.io/waf-${WAF_PV}"
79 +DOCS+=( README.md DOCS/{client-api,interface}-changes.rst )
80 +
81 +# See Copyright in sources and Gentoo bug 506946. Waf is BSD, libmpv is ISC.
82 +LICENSE="LGPL-2.1+ GPL-2+ BSD ISC samba? ( GPL-3+ )"
83 +SLOT="0"
84 +IUSE="+alsa aqua archive bluray cdda +cli coreaudio cplugins cuda debug doc drm dvb
85 + dvd +egl gamepad gbm +iconv jack javascript jpeg lcms +libass libcaca libmpv +lua
86 + luajit openal +opengl oss pulseaudio raspberry-pi rubberband samba sdl
87 + selinux test tools +uchardet v4l vaapi vdpau vulkan wayland +X +xv zlib zimg"
88 +
89 +REQUIRED_USE="
90 + || ( cli libmpv )
91 + aqua? ( opengl )
92 + cuda? ( opengl )
93 + egl? ( || ( gbm X wayland ) )
94 + gamepad? ( sdl )
95 + gbm? ( drm egl opengl )
96 + lcms? ( opengl )
97 + luajit? ( lua )
98 + opengl? ( || ( aqua egl X raspberry-pi !cli ) )
99 + raspberry-pi? ( opengl )
100 + test? ( opengl )
101 + tools? ( cli )
102 + uchardet? ( iconv )
103 + v4l? ( || ( alsa oss ) )
104 + vaapi? ( || ( gbm X wayland ) )
105 + vdpau? ( X )
106 + vulkan? ( || ( X wayland ) )
107 + wayland? ( egl )
108 + X? ( egl? ( opengl ) )
109 + xv? ( X )
110 + ${PYTHON_REQUIRED_USE}
111 +"
112 +
113 +RESTRICT="!test? ( test )"
114 +
115 +COMMON_DEPEND="
116 + >=media-video/ffmpeg-4.0:0=[encode,threads,vaapi?,vdpau?]
117 + alsa? ( >=media-libs/alsa-lib-1.0.18 )
118 + archive? ( >=app-arch/libarchive-3.0.0:= )
119 + bluray? ( >=media-libs/libbluray-0.3.0:= )
120 + cdda? ( dev-libs/libcdio-paranoia )
121 + drm? ( x11-libs/libdrm )
122 + dvd? (
123 + >=media-libs/libdvdnav-4.2.0:=
124 + >=media-libs/libdvdread-4.1.0:=
125 + )
126 + egl? ( media-libs/mesa[egl,gbm(-)?,wayland(-)?] )
127 + gamepad? ( media-libs/libsdl2 )
128 + iconv? (
129 + virtual/libiconv
130 + uchardet? ( app-i18n/uchardet )
131 + )
132 + jack? ( virtual/jack )
133 + javascript? ( >=dev-lang/mujs-1.0.0 )
134 + jpeg? ( virtual/jpeg:0 )
135 + lcms? ( >=media-libs/lcms-2.6:2 )
136 + libass? (
137 + >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz]
138 + virtual/ttf-fonts
139 + )
140 + libcaca? ( >=media-libs/libcaca-0.99_beta18 )
141 + lua? (
142 + !luajit? ( <dev-lang/lua-5.3:= )
143 + luajit? ( dev-lang/luajit:2 )
144 + )
145 + openal? ( >=media-libs/openal-1.13 )
146 + pulseaudio? ( media-sound/pulseaudio )
147 + raspberry-pi? ( >=media-libs/raspberrypi-userland-0_pre20160305-r1 )
148 + rubberband? ( >=media-libs/rubberband-1.8.0 )
149 + samba? ( net-fs/samba )
150 + sdl? ( media-libs/libsdl2[sound,threads,video] )
151 + v4l? ( media-libs/libv4l )
152 + vaapi? ( x11-libs/libva:=[drm?,X?,wayland?] )
153 + vdpau? ( x11-libs/libvdpau )
154 + vulkan? (
155 + media-libs/shaderc
156 + media-libs/vulkan-loader[X?,wayland?]
157 + )
158 + wayland? (
159 + >=dev-libs/wayland-1.6.0
160 + >=dev-libs/wayland-protocols-1.14
161 + >=x11-libs/libxkbcommon-0.3.0
162 + )
163 + X? (
164 + x11-libs/libX11
165 + x11-libs/libXScrnSaver
166 + x11-libs/libXext
167 + x11-libs/libXinerama
168 + x11-libs/libXrandr
169 + opengl? (
170 + x11-libs/libXdamage
171 + virtual/opengl
172 + )
173 + xv? ( x11-libs/libXv )
174 + )
175 + zlib? ( sys-libs/zlib )
176 + zimg? ( >=media-libs/zimg-2.9.2 )
177 +"
178 +DEPEND="${COMMON_DEPEND}
179 + ${PYTHON_DEPS}
180 + virtual/pkgconfig
181 + cuda? ( >=media-libs/nv-codec-headers-8.1.24.1 )
182 + doc? ( dev-python/docutils
183 + dev-python/rst2pdf )
184 + dvb? ( virtual/linuxtv-dvb-headers )
185 + test? ( >=dev-util/cmocka-1.0.0 )
186 + v4l? ( virtual/os-headers )
187 +"
188 +RDEPEND="${COMMON_DEPEND}
189 + cuda? ( x11-drivers/nvidia-drivers[X] )
190 + selinux? ( sec-policy/selinux-mplayer )
191 + tools? ( ${PYTHON_DEPS} )
192 +"
193 +
194 +src_prepare() {
195 + cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
196 + chmod +x "${S}"/waf || die
197 + default
198 +}
199 +
200 +src_configure() {
201 + python_setup
202 + tc-export CC PKG_CONFIG AR
203 +
204 + if use raspberry-pi; then
205 + append-cflags -I"${SYSROOT%/}${EPREFIX}/opt/vc/include"
206 + append-ldflags -L"${SYSROOT%/}${EPREFIX}/opt/vc/lib"
207 + fi
208 +
209 + local mywafargs=(
210 + --confdir="${EPREFIX}/etc/${PN}"
211 + --docdir="${EPREFIX}/usr/share/doc/${PF}"
212 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
213 +
214 + $(usex cli '' '--disable-cplayer')
215 + $(use_enable libmpv libmpv-shared)
216 +
217 + --disable-libmpv-static
218 + --disable-static-build
219 + # See deep down below for build-date.
220 + --disable-optimize # Don't add '-O2' to CFLAGS.
221 + $(use_enable debug debug-build)
222 +
223 + $(use_enable doc html-build)
224 + $(use_enable doc pdf-build)
225 + $(use_enable doc manpage build)
226 + $(use_enable cplugins)
227 + $(use_enable test)
228 +
229 + $(use_enable iconv)
230 + $(use_enable samba libsmbclient)
231 + $(use_enable lua)
232 + $(usex luajit '--lua=luajit' '')
233 + $(use_enable javascript)
234 + $(use_enable libass)
235 + $(use_enable libass libass-osd)
236 + $(use_enable zlib)
237 + $(use_enable bluray libbluray)
238 + $(use_enable dvd dvdnav)
239 + $(use_enable cdda)
240 + $(use_enable uchardet)
241 + $(use_enable rubberband)
242 + $(use_enable lcms lcms2)
243 + --disable-vapoursynth # Only available in overlays.
244 + $(use_enable archive libarchive)
245 +
246 + --enable-libavdevice
247 +
248 + # Audio outputs:
249 + $(use_enable sdl sdl2) # Listed under audio, but also includes video.
250 + $(use_enable oss oss-audio)
251 + --disable-rsound # Only available in overlays.
252 + --disable-sndio # Only available in overlays.
253 + $(use_enable pulseaudio pulse)
254 + $(use_enable jack)
255 + $(use_enable openal)
256 + --disable-opensles
257 + $(use_enable alsa)
258 + $(use_enable coreaudio)
259 +
260 + # Video outputs:
261 + $(use_enable aqua cocoa)
262 + $(use_enable drm)
263 + $(use_enable gbm)
264 + $(use_enable wayland wayland-scanner)
265 + $(use_enable wayland wayland-protocols)
266 + $(use_enable wayland)
267 + $(use_enable X x11)
268 + $(use_enable xv)
269 + $(usex opengl "$(use_enable aqua gl-cocoa)" '--disable-gl-cocoa')
270 + $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11')
271 + $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
272 + $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm')
273 + $(usex opengl "$(use_enable wayland gl-wayland)" '--disable-gl-wayland')
274 + $(use_enable vdpau)
275 + $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
276 + $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl.
277 + $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11')
278 + $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland')
279 + $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm')
280 + $(use_enable libcaca caca)
281 + $(use_enable jpeg)
282 + $(use_enable vulkan shaderc)
283 + $(use_enable raspberry-pi rpi)
284 + $(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl')
285 + $(usex opengl '' '--disable-gl')
286 + $(use_enable vulkan)
287 + $(use_enable gamepad sdl2-gamepad)
288 +
289 + # HWaccels:
290 + # Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.
291 + $(use_enable cuda cuda-hwaccel)
292 +
293 + # TV features:
294 + $(use_enable v4l tv)
295 + $(use_enable dvb dvbin)
296 +
297 + # Miscellaneous features:
298 + --disable-apple-remote # Needs testing first. See Gentoo bug 577332.
299 + $(use_enable zimg)
300 + )
301 +
302 + if use vaapi && use X; then
303 + mywafargs+=(
304 + $(use_enable opengl vaapi-glx)
305 + $(use_enable egl vaapi-x-egl)
306 + )
307 + fi
308 +
309 + # Not for us
310 + mywafargs+=(
311 + --disable-android
312 + --disable-egl-android
313 + --disable-uwp
314 + --disable-audiounit
315 + --disable-wasapi
316 + --disable-ios-gl
317 + --disable-apple-remote
318 + --disable-macos-touchbar
319 + --disable-macos-cocoa-cb
320 + )
321 +
322 + # Create reproducible non-live builds.
323 + [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)
324 +
325 + waf-utils_src_configure "${mywafargs[@]}"
326 +}
327 +
328 +src_install() {
329 + waf-utils_src_install
330 +
331 + if use lua; then
332 + insinto /usr/share/${PN}
333 + doins -r TOOLS/lua
334 + fi
335 +
336 + if use cli && use luajit; then
337 + pax-mark -m "${ED}"usr/bin/${PN}
338 + fi
339 +
340 + if use tools; then
341 + dobin TOOLS/{mpv_identify.sh,umpv}
342 + newbin TOOLS/idet.sh mpv_idet.sh
343 + python_replicate_script "${ED}"usr/bin/umpv
344 + fi
345 +}
346 +
347 +pkg_postinst() {
348 + local rv softvol_0_18_1=0 osc_0_21_0=0 txtsubs_0_24_0=0 opengl_0_25_0=0
349 +
350 + for rv in ${REPLACING_VERSIONS}; do
351 + ver_test ${rv} -lt 0.18.1 && softvol_0_18_1=1
352 + ver_test ${rv} -lt 0.21.0 && osc_0_21_0=1
353 + ver_test ${rv} -lt 0.24.0 && txtsubs_0_24_0=1
354 + ver_test ${rv} -lt 0.25.0 && ! use opengl && opengl_0_25_0=1
355 + done
356 +
357 + if [[ ${softvol_0_18_1} -eq 1 ]]; then
358 + elog "Since version 0.18.1 the software volume control is always enabled."
359 + elog "This means that volume controls don't change the system volume,"
360 + elog "e.g. per-application volume with PulseAudio."
361 + elog "If you want to restore the previous behaviour, please refer to"
362 + elog
363 + elog "https://wiki.gentoo.org/wiki/Mpv#Volume_in_0.18.1"
364 + elog
365 + fi
366 +
367 + if [[ ${osc_0_21_0} -eq 1 ]]; then
368 + elog "In version 0.21.0 the default OSC layout was changed."
369 + elog "If you want to restore the previous layout, please refer to"
370 + elog
371 + elog "https://wiki.gentoo.org/wiki/Mpv#OSC_in_0.21.0"
372 + elog
373 + fi
374 +
375 + if [[ ${txtsubs_0_24_0} -eq 1 ]]; then
376 + elog "Since version 0.24.0 subtitles with .txt extension aren't autoloaded."
377 + elog "If you want to restore the previous behaviour, please refer to"
378 + elog
379 + elog "https://wiki.gentoo.org/wiki/Mpv#Subtitles_with_.txt_extension_in_0.24.0"
380 + elog
381 + fi
382 +
383 + if [[ ${opengl_0_25_0} -eq 1 ]]; then
384 + elog "Since version 0.25.0 the 'opengl' USE flag is mapped to"
385 + elog "the 'opengl' video output and no longer explicitly requires"
386 + elog "X11 or Mac OS Aqua. Consider enabling the 'opengl' USE flag."
387 + fi
388 +
389 + if use cli && ! has_version 'app-shells/mpv-bash-completion'; then
390 + elog "If you want to have command-line completion via bash-completion,"
391 + elog "please install app-shells/mpv-bash-completion."
392 + fi
393 +
394 + if use cli && [[ -n ${REPLACING_VERSIONS} ]] &&
395 + has_version 'app-shells/mpv-bash-completion'; then
396 + elog "If command-line completion doesn't work after mpv update,"
397 + elog "please rebuild app-shells/mpv-bash-completion."
398 + fi
399 +
400 + elog "If you want URL support, please install net-misc/youtube-dl."
401 +
402 + gnome2_icon_cache_update
403 + xdg_desktop_database_update
404 +}
405 +
406 +pkg_postrm() {
407 + gnome2_icon_cache_update
408 + xdg_desktop_database_update
409 +}
410 +
411 +src_test() {
412 + cd "${S}"/build/test || die
413 + local test
414 + for test in *; do
415 + if [[ -x ${test} ]]; then
416 + ./"${test}" || die "Test suite failed"
417 + fi
418 + done
419 +}