Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/
Date: Thu, 11 Oct 2018 10:21:48
Message-Id: 1539253297.d655a0a4929079e3d9b1684edfe17ffc86376ccf.mgorny@gentoo
1 commit: d655a0a4929079e3d9b1684edfe17ffc86376ccf
2 Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
3 AuthorDate: Sun Oct 7 17:14:24 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 11 10:21:37 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d655a0a4
7
8 media-video/mpv: verbump to 0.29.1
9
10 Signed-off-by: Ilya Tumaykin <itumaykin <AT> gmail.com>
11 Package-Manager: Portage-2.3.50, Repoman-2.3.11
12 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
13
14 media-video/mpv/Manifest | 1 +
15 media-video/mpv/mpv-0.29.1.ebuild | 362 ++++++++++++++++++++++++++++++++++++++
16 2 files changed, 363 insertions(+)
17
18 diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest
19 index ad264f4ceaf..d16ac55471e 100644
20 --- a/media-video/mpv/Manifest
21 +++ b/media-video/mpv/Manifest
22 @@ -2,5 +2,6 @@ DIST mpv-0.27.2-patches-r0.tar.xz 6564 BLAKE2B c02efea40e0b19d60eaa49520988464fb
23 DIST mpv-0.27.2.tar.gz 2957191 BLAKE2B 35e316e5a30869ae44ff229e99ae11a88e2f7d55b55946bfb752d5ed2d8212885c0c2abb59c9ff6d23a72daee47d80f44511313d67ee6fb265e6681ba4b89ee1 SHA512 bf74a150b3732b8c233362e0902c54f85fbea9ca1765a2a8f946a6eecd9b37a72ede36a36d0dd98a770539c4f81fe24c8ce26be9db7cd6eddd8514a8f82d9cda
24 DIST mpv-0.28.2.tar.gz 2982558 BLAKE2B 5faef4122d456916f43bd603192fc72dee1ad16fa3c842d54a2e53dc8f9db416545549a86af62481fe211dc088821ab13b832c09f82572b36167dd3a73d57f62 SHA512 e6206e8c65dca084e2cfa73ab09278b7113cdfd90b89877d1f75a1068c6379a093ea3955a023857357683edce1aba8c12ee441fd195d887af4d939fc7b66cef4
25 DIST mpv-0.29.0.tar.gz 3057997 BLAKE2B 6d72d0f4e10fd4a1b7af624c95dda69035ed3b500788ad84dc7837a62cd1debdd57ebef2fdac9795ccd0d29feef91af6e8aa942bb49ef996c1a4b00f6080af85 SHA512 77204218bd217ae1da4812b09e0509965a3ef102d3de5cd4360f007ccf3779e4cbde5cfd6adae9629ea39062bd365e847429bdf7f9a1ddebd0a67d267492b221
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.29.1.ebuild b/media-video/mpv/mpv-0.29.1.ebuild
31 new file mode 100644
32 index 00000000000..55c06fc8520
33 --- /dev/null
34 +++ b/media-video/mpv/mpv-0.29.1.ebuild
35 @@ -0,0 +1,362 @@
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,3_7} )
42 +PYTHON_REQ_USE='threads(+)'
43 +
44 +WAF_PV=2.0.9
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="~alpha ~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 gbm +iconv jack javascript jpeg lcms +libass libcaca libmpv +lua
68 + luajit openal +opengl oss pulseaudio raspberry-pi rubberband samba sdl
69 + selinux test tools +uchardet v4l vaapi vdpau vulkan wayland +X +xv zlib
70 + zsh-completion"
71 +
72 +REQUIRED_USE="
73 + || ( cli libmpv )
74 + aqua? ( opengl )
75 + cuda? ( 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 + >=media-video/ffmpeg-4.0:0=[encode,threads,vaapi?,vdpau?]
98 + alsa? ( >=media-libs/alsa-lib-1.0.18 )
99 + archive? ( >=app-arch/libarchive-3.0.0:= )
100 + bluray? ( >=media-libs/libbluray-0.3.0:= )
101 + cdda? ( dev-libs/libcdio-paranoia )
102 + drm? ( x11-libs/libdrm )
103 + dvd? (
104 + >=media-libs/libdvdnav-4.2.0
105 + >=media-libs/libdvdread-4.1.0
106 + )
107 + egl? ( media-libs/mesa[egl,gbm(-)?,wayland(-)?] )
108 + iconv? (
109 + virtual/libiconv
110 + uchardet? ( app-i18n/uchardet )
111 + )
112 + jack? ( virtual/jack )
113 + javascript? ( >=dev-lang/mujs-1.0.0 )
114 + jpeg? ( virtual/jpeg:0 )
115 + lcms? ( >=media-libs/lcms-2.6:2 )
116 + libass? (
117 + >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz]
118 + virtual/ttf-fonts
119 + )
120 + libcaca? ( >=media-libs/libcaca-0.99_beta18 )
121 + lua? (
122 + !luajit? ( <dev-lang/lua-5.3:= )
123 + luajit? ( dev-lang/luajit:2 )
124 + )
125 + openal? ( >=media-libs/openal-1.13 )
126 + pulseaudio? ( media-sound/pulseaudio )
127 + raspberry-pi? ( >=media-libs/raspberrypi-userland-0_pre20160305-r1 )
128 + rubberband? ( >=media-libs/rubberband-1.8.0 )
129 + samba? ( net-fs/samba )
130 + sdl? ( media-libs/libsdl2[sound,threads,video] )
131 + v4l? ( media-libs/libv4l )
132 + vaapi? ( x11-libs/libva:=[drm?,X?,wayland?] )
133 + vdpau? ( x11-libs/libvdpau )
134 + vulkan? (
135 + media-libs/shaderc
136 + media-libs/vulkan-loader[X?,wayland?]
137 + )
138 + wayland? (
139 + >=dev-libs/wayland-1.6.0
140 + >=dev-libs/wayland-protocols-1.14
141 + >=x11-libs/libxkbcommon-0.3.0
142 + )
143 + X? (
144 + x11-libs/libX11
145 + x11-libs/libXScrnSaver
146 + x11-libs/libXext
147 + x11-libs/libXinerama
148 + x11-libs/libXrandr
149 + opengl? (
150 + x11-libs/libXdamage
151 + virtual/opengl
152 + )
153 + xv? ( x11-libs/libXv )
154 + )
155 + zlib? ( sys-libs/zlib )
156 +"
157 +DEPEND="${COMMON_DEPEND}
158 + ${PYTHON_DEPS}
159 + dev-python/docutils
160 + virtual/pkgconfig
161 + cuda? ( >=media-libs/nv-codec-headers-8.1.24.1 )
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.29.0-make-ffmpeg-version-check-non-fatal.patch"
176 +)
177 +
178 +src_prepare() {
179 + cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
180 + chmod +x "${S}"/waf || die
181 + default_src_prepare
182 +}
183 +
184 +src_configure() {
185 + python_setup
186 + tc-export CC PKG_CONFIG AR
187 +
188 + if use raspberry-pi; then
189 + append-cflags -I"${SYSROOT%/}${EPREFIX}/opt/vc/include"
190 + append-ldflags -L"${SYSROOT%/}${EPREFIX}/opt/vc/lib"
191 + fi
192 +
193 + # Prevent access violations from zsh completion generation.
194 + # See Gentoo bug 656086.
195 + use zsh-completion && addpredict /dev/dri
196 +
197 + local mywafargs=(
198 + --confdir="${EPREFIX}/etc/${PN}"
199 + --docdir="${EPREFIX}/usr/share/doc/${PF}"
200 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
201 +
202 + $(usex cli '' '--disable-cplayer')
203 + $(use_enable libmpv libmpv-shared)
204 +
205 + --disable-libmpv-static
206 + --disable-static-build
207 + # See deep down below for build-date.
208 + --disable-optimize # Don't add '-O2' to CFLAGS.
209 + --disable-debug-build # Don't add '-g' to CFLAGS.
210 + --enable-html-build
211 +
212 + $(use_enable doc pdf-build)
213 + $(use_enable cplugins)
214 + $(use_enable zsh-completion zsh-comp)
215 + $(use_enable test)
216 +
217 + --disable-android
218 + $(use_enable iconv)
219 + $(use_enable samba libsmbclient)
220 + $(use_enable lua)
221 + $(usex luajit '--lua=luajit' '')
222 + $(use_enable javascript)
223 + $(use_enable libass)
224 + $(use_enable libass libass-osd)
225 + $(use_enable zlib)
226 + $(use_enable bluray libbluray)
227 + $(use_enable dvd dvdread)
228 + $(use_enable dvd dvdnav)
229 + $(use_enable cdda)
230 + $(use_enable uchardet)
231 + $(use_enable rubberband)
232 + $(use_enable lcms lcms2)
233 + --disable-vapoursynth # Only available in overlays.
234 + --disable-vapoursynth-lazy
235 + $(use_enable archive libarchive)
236 +
237 + --enable-libavdevice
238 +
239 + # Audio outputs:
240 + $(use_enable sdl sdl2) # Listed under audio, but also includes video.
241 + $(use_enable oss oss-audio)
242 + --disable-rsound # Only available in overlays.
243 + --disable-sndio # Only available in overlays.
244 + $(use_enable pulseaudio pulse)
245 + $(use_enable jack)
246 + $(use_enable openal)
247 + --disable-opensles
248 + $(use_enable alsa)
249 + $(use_enable coreaudio)
250 +
251 + # Video outputs:
252 + $(use_enable aqua cocoa)
253 + $(use_enable drm)
254 + $(use_enable gbm)
255 + $(use_enable wayland wayland-scanner)
256 + $(use_enable wayland wayland-protocols)
257 + $(use_enable wayland)
258 + $(use_enable X x11)
259 + $(use_enable xv)
260 + $(usex opengl "$(use_enable aqua gl-cocoa)" '--disable-gl-cocoa')
261 + $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11')
262 + $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
263 + $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm')
264 + $(usex opengl "$(use_enable wayland gl-wayland)" '--disable-gl-wayland')
265 + $(use_enable vdpau)
266 + $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
267 + $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl.
268 + $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11')
269 + $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland')
270 + $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm')
271 + $(use_enable libcaca caca)
272 + $(use_enable jpeg)
273 + $(use_enable vulkan shaderc)
274 + $(use_enable raspberry-pi rpi)
275 + $(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl')
276 + --disable-mali-fbdev # Only available in overlays.
277 + $(usex opengl '' '--disable-gl')
278 + $(use_enable vulkan)
279 +
280 + # HWaccels:
281 + # Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.
282 + $(use_enable cuda cuda-hwaccel)
283 +
284 + # TV features:
285 + $(use_enable v4l tv)
286 + $(use_enable v4l tv-v4l2)
287 + $(use_enable v4l libv4l2)
288 + $(use_enable v4l audio-input)
289 + $(use_enable dvb dvbin)
290 +
291 + # Miscellaneous features:
292 + --disable-apple-remote # Needs testing first. See Gentoo bug 577332.
293 + )
294 +
295 + if use vaapi && use X; then
296 + mywafargs+=(
297 + $(use_enable opengl vaapi-glx)
298 + $(use_enable egl vaapi-x-egl)
299 + )
300 + fi
301 +
302 + # Create reproducible non-live builds.
303 + [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)
304 +
305 + waf-utils_src_configure "${mywafargs[@]}"
306 +}
307 +
308 +src_install() {
309 + waf-utils_src_install
310 +
311 + if use lua; then
312 + insinto /usr/share/${PN}
313 + doins -r TOOLS/lua
314 + fi
315 +
316 + if use cli && use luajit; then
317 + pax-mark -m "${ED}"usr/bin/${PN}
318 + fi
319 +
320 + if use tools; then
321 + dobin TOOLS/{mpv_identify.sh,umpv}
322 + newbin TOOLS/idet.sh mpv_idet.sh
323 + python_replicate_script "${ED}"usr/bin/umpv
324 + fi
325 +}
326 +
327 +pkg_postinst() {
328 + local rv softvol_0_18_1=0 osc_0_21_0=0 txtsubs_0_24_0=0 opengl_0_25_0=0
329 +
330 + for rv in ${REPLACING_VERSIONS}; do
331 + ver_test ${rv} -lt 0.18.1 && softvol_0_18_1=1
332 + ver_test ${rv} -lt 0.21.0 && osc_0_21_0=1
333 + ver_test ${rv} -lt 0.24.0 && txtsubs_0_24_0=1
334 + ver_test ${rv} -lt 0.25.0 && ! use opengl && opengl_0_25_0=1
335 + done
336 +
337 + if [[ ${softvol_0_18_1} -eq 1 ]]; then
338 + elog "Since version 0.18.1 the software volume control is always enabled."
339 + elog "This means that volume controls don't change the system volume,"
340 + elog "e.g. per-application volume with PulseAudio."
341 + elog "If you want to restore the previous behaviour, please refer to"
342 + elog
343 + elog "https://wiki.gentoo.org/wiki/Mpv#Volume_in_0.18.1"
344 + elog
345 + fi
346 +
347 + if [[ ${osc_0_21_0} -eq 1 ]]; then
348 + elog "In version 0.21.0 the default OSC layout was changed."
349 + elog "If you want to restore the previous layout, please refer to"
350 + elog
351 + elog "https://wiki.gentoo.org/wiki/Mpv#OSC_in_0.21.0"
352 + elog
353 + fi
354 +
355 + if [[ ${txtsubs_0_24_0} -eq 1 ]]; then
356 + elog "Since version 0.24.0 subtitles with .txt extension aren't autoloaded."
357 + elog "If you want to restore the previous behaviour, please refer to"
358 + elog
359 + elog "https://wiki.gentoo.org/wiki/Mpv#Subtitles_with_.txt_extension_in_0.24.0"
360 + elog
361 + fi
362 +
363 + if [[ ${opengl_0_25_0} -eq 1 ]]; then
364 + elog "Since version 0.25.0 the 'opengl' USE flag is mapped to"
365 + elog "the 'opengl' video output and no longer explicitly requires"
366 + elog "X11 or Mac OS Aqua. Consider enabling the 'opengl' USE flag."
367 + fi
368 +
369 + if use cli && ! has_version 'app-shells/mpv-bash-completion'; then
370 + elog "If you want to have command-line completion via bash-completion,"
371 + elog "please install app-shells/mpv-bash-completion."
372 + fi
373 +
374 + if use cli && [[ -n ${REPLACING_VERSIONS} ]] &&
375 + has_version 'app-shells/mpv-bash-completion'; then
376 + elog "If command-line completion doesn't work after mpv update,"
377 + elog "please rebuild app-shells/mpv-bash-completion."
378 + fi
379 +
380 + gnome2_icon_cache_update
381 + xdg_desktop_database_update
382 +}
383 +
384 +pkg_postrm() {
385 + gnome2_icon_cache_update
386 + xdg_desktop_database_update
387 +}
388 +
389 +src_test() {
390 + cd "${S}"/build/test || die
391 + local test
392 + for test in *; do
393 + if [[ -x ${test} ]]; then
394 + ./"${test}" || die "Test suite failed"
395 + fi
396 + done
397 +}