Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/
Date: Fri, 02 Sep 2016 17:09:53
Message-Id: 1472836170.aa0bb33d3a62e87aebf6df6b4967108a26e0742b.monsieurp@gentoo
1 commit: aa0bb33d3a62e87aebf6df6b4967108a26e0742b
2 Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
3 AuthorDate: Sun Aug 28 04:52:53 2016 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 2 17:09:30 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa0bb33d
7
8 media-video/mpv: verbump to 0.20.0.
9
10 Package-Manager: portage-2.3.0
11
12 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
13
14 media-video/mpv/Manifest | 1 +
15 media-video/mpv/mpv-0.20.0.ebuild | 327 ++++++++++++++++++++++++++++++++++++++
16 2 files changed, 328 insertions(+)
17
18 diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest
19 index 589af92..34d71c7 100644
20 --- a/media-video/mpv/Manifest
21 +++ b/media-video/mpv/Manifest
22 @@ -2,6 +2,7 @@ DIST mpv-0.17.0-patches-06.tar.gz 14418 SHA256 a0fcf861ed50686f35556a9334581e1d7
23 DIST mpv-0.17.0.tar.gz 2882629 SHA256 602cd2b0f5fc7e43473234fbb96e3f7bbb6418f15eb8fa720d9433cce31eba6e SHA512 fb79738a16dbc12b60199a68836aca121a800958af4eaf6c2bdf1114bde36c156bafc232e814045a16fd738d2de1e2d8392bc98507961e5a73fa692e270dc7a2 WHIRLPOOL 704133b4033a5a2be8db92a4f1e52397d5b261a99a035d38e33b91d2c478e0e9bfcb2ba0e24ee03d37fffe693b275f50f7f1e453263a5afe61e8944f51eefa61
24 DIST mpv-0.18.0.tar.gz 2758960 SHA256 b656638d4f6bce2621baaacb60d8be384aa492fcd86dfd43996aaa2c16fee02b SHA512 5a899ea680b4da6d668a6e77a254e623bafef16f376ee46639e40f151da5a000de84b382f2b07f3a1e87b60fc8e524132767fdf243e36474966af11a88277437 WHIRLPOOL c491e61cb2d7f453cfc23605120048e81c2b7621b8d9591cad6415d3b550f55db6a6c8c6f90d27c7ce214ff89f92a9861d202b457c2de25c5b7de11d8d1d40af
25 DIST mpv-0.19.0.tar.gz 2770618 SHA256 3df5811942cd1d71f48eb4720092fdafec11885bf6dd6d1d3e6413f32e5d67e2 SHA512 11a1318e0bcf937635e8f83bba615998c7a89ceb0fb0829cef9f510c215d142b205b5c26c617e95d95dfcfc3fbd212cee58cab2dae0b8b8250a44e998d18380f WHIRLPOOL bb1c016a51bae0a512f3383f252cf661414d6375e31d8a08a3885f2450cd772e38d102f26ffecfc6fec1b469f64b33f027dcc5c0e7ca22f171c074e628310bd3
26 +DIST mpv-0.20.0.tar.gz 2775740 SHA256 fe6ec9d2ded5ce84b963f54b812d579d04f944f4a737f3ae639c4d5d9e842b56 SHA512 6b00bde2aa802cbc104a7c3e85dc0165010113f9942f881b023434f8ead04a2cb5486cd3dd32c14ea86c54ed9a2b976124bd007e8e40e3d8754c48bb33c4b512 WHIRLPOOL 336d12c3309ef099fa16331859b599beaa556acefa467b8a74761291faecdcb56f3f01137dd12ffbbc4a41c3f2e60212163deccc498d065c0d944ed9adc26f8a
27 DIST mpv-0.9.2.tar.gz 2701306 SHA256 c0148f55dbd17705f49bb496d0ce374419de62e1b17195d91409d7727cbd4751 SHA512 4f652a8e78d65b0ef44a06287b05250dfdfbce4cf5a6e21d3b446eedec268d83cf98afcc687272e2da2cfac9e9f69a303847dffdfd45cecdd4273b943ce50967 WHIRLPOOL 1512bacc2ce50e875770c76106a1bb2bc1d0cc5f6e2bdce91ff8c5cfc8bf13ffb48519858a5fa2a7d57880820dc12e5eb20f34ab71eca5d76ec303618da8f3fe
28 DIST waf-1.8.12 97567 SHA256 01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b SHA512 8e47112abb134f965f15a27a600b4453cad3075afb5dadc17f2f6dac33d80ec68b679ac0ebc5f8a0245cbd07ae9fc7b899e69afc1bd021cce74e7af2ab457939 WHIRLPOOL c36d37c2d8c08e4048b4800f511611af5cf534304fcb58388ca491ff308bfcbcdd959d153edfd6ff8c118404e7293d8b786e43b07486139bf915a82aa75d792b
29 DIST waf-1.8.4 96179 SHA256 f02035fa5d8814f33f19b2b20d43822ddef6bb39b955ca196c2a247a1f9ffaa8 SHA512 3a132d8b1cba0af0e3df046c0204c5df706fae4e0fac41cf74b53f6cdea6210ed798671c7a3cb3fee70573aacab16d4c0cc699cc4b7aa74c8a416346c5513f4c WHIRLPOOL fe8d7f42e5118a1f9490a0c9add1355c969185376b57d0bab024068dd6e7364632d862bf9432e1209165c5313ae843479ef334f4bd6285db05dfebff9a1b640e
30
31 diff --git a/media-video/mpv/mpv-0.20.0.ebuild b/media-video/mpv/mpv-0.20.0.ebuild
32 new file mode 100644
33 index 00000000..810eeb0
34 --- /dev/null
35 +++ b/media-video/mpv/mpv-0.20.0.ebuild
36 @@ -0,0 +1,327 @@
37 +# Copyright 1999-2016 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +# $Id$
40 +
41 +EAPI=6
42 +
43 +PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
44 +PYTHON_REQ_USE='threads(+)'
45 +
46 +WAF_PV=1.8.12
47 +
48 +inherit fdo-mime gnome2-utils pax-utils python-any-r1 toolchain-funcs versionator waf-utils
49 +
50 +DESCRIPTION="Media player based on MPlayer and mplayer2"
51 +HOMEPAGE="https://mpv.io/"
52 +
53 +if [[ ${PV} != *9999* ]]; then
54 + SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
55 + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux"
56 + DOCS=( RELEASE_NOTES )
57 +else
58 + EGIT_REPO_URI="git://github.com/mpv-player/mpv.git"
59 + inherit git-r3
60 +fi
61 +SRC_URI+=" https://waf.io/waf-${WAF_PV}"
62 +DOCS+=( README.md )
63 +
64 +# See Copyright in sources and Gentoo bug 506946. Waf is BSD, libmpv is ISC.
65 +LICENSE="GPL-2+ BSD ISC"
66 +SLOT="0"
67 +IUSE="aqua +alsa archive bluray cdda +cli coreaudio doc drm dvb dvd +egl +enca
68 + encode gbm +iconv jack jpeg lcms +libass libav libcaca libguess libmpv +lua
69 + luajit openal +opengl oss pulseaudio raspberry-pi rubberband samba -sdl
70 + selinux test +uchardet v4l vaapi vdpau vf-dlopen wayland +X xinerama
71 + +xscreensaver +xv zsh-completion"
72 +
73 +REQUIRED_USE="
74 + || ( cli libmpv )
75 + aqua? ( opengl )
76 + egl? ( || ( gbm X wayland ) )
77 + enca? ( iconv )
78 + gbm? ( drm egl )
79 + lcms? ( || ( opengl egl ) )
80 + libguess? ( iconv )
81 + luajit? ( lua )
82 + uchardet? ( iconv )
83 + v4l? ( || ( alsa oss ) )
84 + vaapi? ( || ( gbm X wayland ) )
85 + vdpau? ( X )
86 + wayland? ( egl )
87 + xinerama? ( X )
88 + xscreensaver? ( X )
89 + xv? ( X )
90 + zsh-completion? ( cli )
91 +"
92 +
93 +COMMON_DEPEND="
94 + !libav? ( >=media-video/ffmpeg-2.4:0=[encode?,threads,vaapi?,vdpau?] )
95 + libav? ( >=media-video/libav-11:0=[encode?,threads,vaapi?,vdpau?] )
96 + sys-libs/zlib
97 + alsa? ( >=media-libs/alsa-lib-1.0.18 )
98 + archive? ( >=app-arch/libarchive-3.0.0:= )
99 + bluray? ( >=media-libs/libbluray-0.3.0 )
100 + cdda? ( dev-libs/libcdio-paranoia )
101 + drm? ( x11-libs/libdrm )
102 + dvb? ( virtual/linuxtv-dvb-headers )
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 + enca? ( app-i18n/enca )
111 + libguess? ( >=app-i18n/libguess-1.0 )
112 + uchardet? ( dev-libs/uchardet )
113 + )
114 + jack? ( virtual/jack )
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 + opengl? ( !aqua? ( virtual/opengl ) )
128 + pulseaudio? ( media-sound/pulseaudio )
129 + raspberry-pi? (
130 + >=media-libs/raspberrypi-userland-0_pre20160305-r1
131 + media-libs/mesa[egl,gles2]
132 + )
133 + rubberband? ( >=media-libs/rubberband-1.8.0 )
134 + samba? ( net-fs/samba )
135 + sdl? ( media-libs/libsdl2[sound,threads,video,X?,wayland?] )
136 + v4l? ( media-libs/libv4l )
137 + vaapi? ( >=x11-libs/libva-1.4.0[drm?,X?,wayland?] )
138 + wayland? (
139 + >=dev-libs/wayland-1.6.0
140 + >=x11-libs/libxkbcommon-0.3.0
141 + )
142 + X? (
143 + x11-libs/libX11
144 + x11-libs/libXext
145 + >=x11-libs/libXrandr-1.2.0
146 + opengl? ( x11-libs/libXdamage )
147 + vdpau? ( >=x11-libs/libvdpau-0.2 )
148 + xinerama? ( x11-libs/libXinerama )
149 + xscreensaver? ( x11-libs/libXScrnSaver )
150 + xv? ( x11-libs/libXv )
151 + )
152 +"
153 +DEPEND="${COMMON_DEPEND}
154 + ${PYTHON_DEPS}
155 + dev-lang/perl
156 + dev-python/docutils
157 + virtual/pkgconfig
158 + doc? ( dev-python/rst2pdf )
159 + test? ( >=dev-util/cmocka-1.0.0 )
160 +"
161 +RDEPEND="${COMMON_DEPEND}
162 + selinux? ( sec-policy/selinux-mplayer )
163 +"
164 +
165 +PATCHES=( "${FILESDIR}/${PN}-0.19.0-make-ffmpeg-version-check-non-fatal.patch" )
166 +
167 +pkg_pretend() {
168 + if [[ ${MERGE_TYPE} != "binary" ]] && ! tc-has-tls && use vaapi && use egl; then
169 + die "Your compiler lacks C++11 TLS support. Use GCC>=4.8.0 or Clang>=3.3."
170 + fi
171 +}
172 +
173 +src_prepare() {
174 + cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
175 + chmod +x "${S}"/waf || die
176 + default_src_prepare
177 +}
178 +
179 +src_configure() {
180 + local mywafargs=(
181 + --confdir="${EPREFIX}/etc/${PN}"
182 + --docdir="${EPREFIX}/usr/share/doc/${PF}"
183 + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
184 +
185 + $(usex cli '' '--disable-cplayer')
186 + $(use_enable libmpv libmpv-shared)
187 +
188 + # See deep down below for build-date.
189 + --disable-libmpv-static
190 + --disable-static-build
191 + --disable-optimize # Don't add '-O2' to CFLAGS.
192 + --disable-debug-build # Don't add '-g' to CFLAGS.
193 + --enable-html-build
194 +
195 + $(use_enable doc pdf-build)
196 + $(use_enable vf-dlopen vf-dlopen-filters)
197 + $(use_enable zsh-completion zsh-comp)
198 + $(use_enable test)
199 +
200 + $(use_enable iconv)
201 + $(use_enable samba libsmbclient)
202 + $(use_enable lua)
203 + $(usex luajit '--lua=luajit' '')
204 + $(use_enable libass)
205 + $(use_enable libass libass-osd)
206 + $(use_enable encode encoding)
207 + $(use_enable bluray libbluray)
208 + $(use_enable dvd dvdread)
209 + $(use_enable dvd dvdnav)
210 + $(use_enable cdda)
211 + $(use_enable enca)
212 + $(use_enable libguess)
213 + $(use_enable uchardet)
214 + $(use_enable rubberband)
215 + $(use_enable lcms lcms2)
216 + --disable-vapoursynth # Only available in overlays.
217 + --disable-vapoursynth-lazy
218 + $(use_enable archive libarchive)
219 +
220 + --enable-libavdevice
221 +
222 + # Audio outputs:
223 + $(use_enable sdl sdl2) # Listed under audio, but also includes video.
224 + --disable-sdl1
225 + $(use_enable oss oss-audio)
226 + --disable-rsound # Only available in overlays.
227 + $(use_enable pulseaudio pulse)
228 + $(use_enable jack)
229 + $(use_enable openal)
230 + --disable-opensles
231 + $(use_enable alsa)
232 + $(use_enable coreaudio)
233 +
234 + # Video outputs:
235 + $(use_enable aqua cocoa)
236 + $(use_enable drm)
237 + $(use_enable gbm)
238 + $(use_enable wayland)
239 + $(use_enable X x11)
240 + $(use_enable xscreensaver xss)
241 + $(use_enable X xext)
242 + $(use_enable xv)
243 + $(use_enable xinerama)
244 + $(use_enable X xrandr)
245 + $(usex opengl "$(use_enable aqua gl-cocoa)" '--disable-gl-cocoa')
246 + $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11')
247 + $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
248 + $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm')
249 + $(use_enable wayland gl-wayland)
250 + $(use_enable vdpau)
251 + $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
252 + $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl.
253 + $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11')
254 + $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland')
255 + $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm')
256 + $(use_enable libcaca caca)
257 + $(use_enable jpeg)
258 + --disable-android
259 + $(use_enable raspberry-pi rpi)
260 + $(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl')
261 +
262 + # HWaccels:
263 + # Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.
264 + $(use_enable vaapi vaapi-hwaccel)
265 + # Automagic VDPAU HW acceleration. See Gentoo bug 558870.
266 +
267 + # TV features:
268 + $(use_enable v4l tv)
269 + $(use_enable v4l tv-v4l2)
270 + $(use_enable v4l libv4l2)
271 + $(use_enable v4l audio-input)
272 + $(use_enable dvb dvbin)
273 +
274 + # Miscellaneous features:
275 + --disable-apple-remote # Needs testing first. See Gentoo bug 577332.
276 + )
277 +
278 + if use vaapi && use X; then
279 + mywafargs+=(
280 + $(use_enable opengl vaapi-glx)
281 + $(use_enable egl vaapi-x-egl)
282 + )
283 + fi
284 +
285 + if ! use egl && ! use opengl && ! use raspberry-pi; then
286 + mywafargs+=(--disable-gl)
287 + fi
288 +
289 + # Create reproducible non-live builds.
290 + [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)
291 +
292 + waf-utils_src_configure "${mywafargs[@]}"
293 +}
294 +
295 +src_install() {
296 + waf-utils_src_install
297 +
298 + if use lua; then
299 + insinto /usr/share/${PN}
300 + doins -r TOOLS/lua
301 + fi
302 +
303 + if use cli && use luajit; then
304 + pax-mark -m "${ED}"usr/bin/${PN}
305 + fi
306 +}
307 +
308 +pkg_preinst() {
309 + gnome2_icon_savelist
310 +}
311 +
312 +pkg_postinst() {
313 + fdo-mime_desktop_database_update
314 + gnome2_icon_cache_update
315 +
316 + local rv softvol_0_18_1=0
317 + for rv in ${REPLACING_VERSIONS}; do
318 + version_compare ${rv} 0.18.1-r1
319 + [[ $? -eq 1 ]] && softvol_0_18_1=1
320 + done
321 +
322 + if [[ ${softvol_0_18_1} -eq 1 ]]; then
323 + echo
324 + elog "Starting from version 0.18.1 the software volume control is"
325 + elog "enabled by default, see:"
326 + elog "https://github.com/mpv-player/mpv/blob/v0.18.1/DOCS/interface-changes.rst"
327 + elog "https://github.com/mpv-player/mpv/issues/3322"
328 + elog
329 + elog "This means that volume controls don't change the system volume,"
330 + elog "e.g. per-application volume with PulseAudio."
331 + elog "If you want to restore the old behaviour, please refer to"
332 + elog "https://bugs.gentoo.org/show_bug.cgi?id=588492#c7"
333 + echo
334 + fi
335 +
336 + # bash-completion < 2.3-r1 already installs (mostly broken) mpv completion.
337 + if use cli && ! has_version '<app-shells/bash-completion-2.3-r1' && \
338 + ! has_version 'app-shells/mpv-bash-completion'; then
339 + elog "If you want to have command-line completion via bash-completion,"
340 + elog "please install app-shells/mpv-bash-completion."
341 + fi
342 +
343 + if use cli && [[ -n ${REPLACING_VERSIONS} ]] && \
344 + has_version 'app-shells/mpv-bash-completion'; then
345 + elog "If command-line completion doesn't work after mpv update,"
346 + elog "please rebuild app-shells/mpv-bash-completion."
347 + fi
348 +}
349 +
350 +pkg_postrm() {
351 + fdo-mime_desktop_database_update
352 + gnome2_icon_cache_update
353 +}
354 +
355 +src_test() {
356 + cd "${S}"/build/test || die
357 + local test
358 + for test in *; do
359 + if [[ -x ${test} ]]; then
360 + ./"${test}" || die "Test suite failed"
361 + fi
362 + done
363 +}