Gentoo Archives: gentoo-commits

From: Sam Jorna <wraeth@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/
Date: Tue, 31 May 2016 08:49:51
Message-Id: 1464684546.2bae91d4e99bcaa89239ce9341052d1a9a7065a0.wraeth@gentoo
1 commit: 2bae91d4e99bcaa89239ce9341052d1a9a7065a0
2 Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
3 AuthorDate: Tue May 31 04:37:48 2016 +0000
4 Commit: Sam Jorna <wraeth <AT> gentoo <DOT> org>
5 CommitDate: Tue May 31 08:49:06 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bae91d4
7
8 media-video/mpv: revbump to 0.17.0-r5 wrt bug 584418
9
10 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=584418
11
12 Package-Manager: portage-2.3.0_rc1
13
14 media-video/mpv/Manifest | 1 +
15 media-video/mpv/mpv-0.17.0-r5.ebuild | 300 +++++++++++++++++++++++++++++++++++
16 2 files changed, 301 insertions(+)
17
18 diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest
19 index d5fb1d0..171e223 100644
20 --- a/media-video/mpv/Manifest
21 +++ b/media-video/mpv/Manifest
22 @@ -1,4 +1,5 @@
23 DIST mpv-0.17.0-patches-04.tar.gz 7862 SHA256 a6b259cfe3ed605ca5530981670051e38c712c906bbdd0ea7958932660cc6556 SHA512 74dc84ab5baadb950658d55ba5d89300fc169c67cf854ca33ea812e246a1fbbbe9f84d0f07ca6cc3ca5fb97710209974105785a8a3e593166a4aaa696266b1ea WHIRLPOOL 743c9c7443213499d2ec692955c447f29ec10c3305fa13c2e06ae52b10408473b35037772b4b3c4a2f69ff9318fe1a6dd8a7d5c4307928424b0a081447b9018e
24 +DIST mpv-0.17.0-patches-05.tar.gz 12830 SHA256 cc63d7fe5754ceb62bc8c33d50a02376ee0d5d4c3ff0763fc85787624e32b1e1 SHA512 680b5f50e5a4749ffd63712bf6160b64b37bd14bfc9f9b3912afb1a576a1ab754cdaeb20ee206e3484e037126bec395431002590ff3417ea247d2be340b4fd09 WHIRLPOOL 01e76442ed360ca0f29404038d5b082fb87d40dcf7a868377735ac63cd2df51385dd5987fe57ed6c5928ca1aca3fa8938d7fe878360025d6ea8706b7948c8531
25 DIST mpv-0.17.0.tar.gz 2882629 SHA256 602cd2b0f5fc7e43473234fbb96e3f7bbb6418f15eb8fa720d9433cce31eba6e SHA512 fb79738a16dbc12b60199a68836aca121a800958af4eaf6c2bdf1114bde36c156bafc232e814045a16fd738d2de1e2d8392bc98507961e5a73fa692e270dc7a2 WHIRLPOOL 704133b4033a5a2be8db92a4f1e52397d5b261a99a035d38e33b91d2c478e0e9bfcb2ba0e24ee03d37fffe693b275f50f7f1e453263a5afe61e8944f51eefa61
26 DIST mpv-0.9.2.tar.gz 2701306 SHA256 c0148f55dbd17705f49bb496d0ce374419de62e1b17195d91409d7727cbd4751 SHA512 4f652a8e78d65b0ef44a06287b05250dfdfbce4cf5a6e21d3b446eedec268d83cf98afcc687272e2da2cfac9e9f69a303847dffdfd45cecdd4273b943ce50967 WHIRLPOOL 1512bacc2ce50e875770c76106a1bb2bc1d0cc5f6e2bdce91ff8c5cfc8bf13ffb48519858a5fa2a7d57880820dc12e5eb20f34ab71eca5d76ec303618da8f3fe
27 DIST waf-1.8.12 97567 SHA256 01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b SHA512 8e47112abb134f965f15a27a600b4453cad3075afb5dadc17f2f6dac33d80ec68b679ac0ebc5f8a0245cbd07ae9fc7b899e69afc1bd021cce74e7af2ab457939 WHIRLPOOL c36d37c2d8c08e4048b4800f511611af5cf534304fcb58388ca491ff308bfcbcdd959d153edfd6ff8c118404e7293d8b786e43b07486139bf915a82aa75d792b
28
29 diff --git a/media-video/mpv/mpv-0.17.0-r5.ebuild b/media-video/mpv/mpv-0.17.0-r5.ebuild
30 new file mode 100644
31 index 0000000..54589c6
32 --- /dev/null
33 +++ b/media-video/mpv/mpv-0.17.0-r5.ebuild
34 @@ -0,0 +1,300 @@
35 +# Copyright 1999-2016 Gentoo Foundation
36 +# Distributed under the terms of the GNU General Public License v2
37 +# $Id$
38 +
39 +EAPI=6
40 +
41 +PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
42 +PYTHON_REQ_USE='threads(+)'
43 +
44 +WAF_PV=1.8.12
45 +
46 +inherit fdo-mime gnome2-utils pax-utils python-any-r1 toolchain-funcs waf-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="
53 + https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz
54 + https://dev.gentoo.org/~wraeth/distfiles/${P}-patches-05.tar.gz
55 + "
56 + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux"
57 + DOCS=( RELEASE_NOTES )
58 +else
59 + EGIT_REPO_URI="git://github.com/mpv-player/mpv.git"
60 + inherit git-r3
61 +fi
62 +SRC_URI+=" https://waf.io/waf-${WAF_PV}"
63 +DOCS+=( CONTRIBUTING.md README.md )
64 +
65 +# See Copyright in sources and Gentoo bug 506946. Waf is BSD, libmpv is ISC.
66 +LICENSE="GPL-2+ BSD ISC"
67 +SLOT="0"
68 +IUSE="aqua +alsa archive bluray cdda +cli coreaudio doc drm dvb dvd +egl +enca
69 + encode gbm +iconv jack jpeg lcms +libass libav libcaca libguess libmpv lua
70 + luajit openal +opengl oss pulseaudio raspberry-pi rubberband samba -sdl
71 + selinux test uchardet v4l vaapi vdpau vf-dlopen wayland +X xinerama
72 + +xscreensaver +xv zsh-completion"
73 +
74 +REQUIRED_USE="
75 + || ( cli libmpv )
76 + aqua? ( opengl )
77 + egl? ( || ( gbm X wayland ) )
78 + enca? ( iconv )
79 + gbm? ( drm egl )
80 + lcms? ( || ( opengl egl ) )
81 + libguess? ( iconv )
82 + luajit? ( lua )
83 + uchardet? ( iconv )
84 + v4l? ( || ( alsa oss ) )
85 + vaapi? ( || ( gbm X wayland ) )
86 + vdpau? ( X )
87 + wayland? ( egl )
88 + xinerama? ( X )
89 + xscreensaver? ( X )
90 + xv? ( X )
91 + zsh-completion? ( cli )
92 +"
93 +
94 +COMMON_DEPEND="
95 + !libav? ( >=media-video/ffmpeg-2.4:0=[encode?,threads,vaapi?,vdpau?] )
96 + libav? ( >=media-video/libav-11:0=[encode?,threads,vaapi?,vdpau?] )
97 + sys-libs/zlib
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 + dvb? ( virtual/linuxtv-dvb-headers )
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 + enca? ( app-i18n/enca )
112 + libguess? ( >=app-i18n/libguess-1.0 )
113 + uchardet? ( dev-libs/uchardet )
114 + )
115 + jack? ( virtual/jack )
116 + jpeg? ( virtual/jpeg:0 )
117 + lcms? ( >=media-libs/lcms-2.6:2 )
118 + libass? (
119 + >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz]
120 + virtual/ttf-fonts
121 + )
122 + libcaca? ( >=media-libs/libcaca-0.99_beta18 )
123 + lua? (
124 + !luajit? ( || ( =dev-lang/lua-5.1*:= =dev-lang/lua-5.2*:= ) )
125 + luajit? ( dev-lang/luajit:2 )
126 + )
127 + openal? ( >=media-libs/openal-1.13 )
128 + opengl? ( !aqua? ( virtual/opengl ) )
129 + pulseaudio? ( media-sound/pulseaudio )
130 + raspberry-pi? (
131 + >=media-libs/raspberrypi-userland-0_pre20160305-r1
132 + media-libs/mesa[egl,gles2]
133 + )
134 + rubberband? ( >=media-libs/rubberband-1.8.0 )
135 + samba? ( net-fs/samba )
136 + sdl? ( media-libs/libsdl2[sound,threads,video,X?,wayland?] )
137 + v4l? ( media-libs/libv4l )
138 + vaapi? ( >=x11-libs/libva-1.4.0[drm?,X?,wayland?] )
139 + wayland? (
140 + >=dev-libs/wayland-1.6.0
141 + >=x11-libs/libxkbcommon-0.3.0
142 + )
143 + X? (
144 + x11-libs/libX11
145 + x11-libs/libXext
146 + >=x11-libs/libXrandr-1.2.0
147 + opengl? ( x11-libs/libXdamage )
148 + vdpau? ( >=x11-libs/libvdpau-0.2 )
149 + xinerama? ( x11-libs/libXinerama )
150 + xscreensaver? ( x11-libs/libXScrnSaver )
151 + xv? ( x11-libs/libXv )
152 + )
153 +"
154 +DEPEND="${COMMON_DEPEND}
155 + ${PYTHON_DEPS}
156 + >=dev-lang/perl-5.8
157 + dev-python/docutils
158 + virtual/pkgconfig
159 + doc? ( dev-python/rst2pdf )
160 + test? ( >=dev-util/cmocka-1.0.0 )
161 +"
162 +RDEPEND="${COMMON_DEPEND}
163 + selinux? ( sec-policy/selinux-mplayer )
164 +"
165 +
166 +pkg_pretend() {
167 + if [[ ${MERGE_TYPE} != "binary" ]] && ! tc-has-tls && use vaapi && use egl; then
168 + die "Your compiler lacks C++11 TLS support. Use GCC>=4.8.0 or Clang>=3.3."
169 + fi
170 +}
171 +
172 +src_prepare() {
173 + cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
174 + chmod +x "${S}"/waf || die
175 + default_src_prepare
176 + EPATCH_SUFFIX=patch EPATCH_FORCE=yes epatch "${WORKDIR}/${PV}"
177 +}
178 +
179 +src_configure() {
180 + local mywafargs=(
181 + --confdir="${EPREFIX}/etc/${PN}"
182 + --docdir="${EPREFIX}/usr/share/doc/${PF}"
183 +
184 + --disable-gpl3 # Unclear license info. See Gentoo bug 571728.
185 +
186 + $(usex cli '' '--disable-cplayer')
187 + $(use_enable libmpv libmpv-shared)
188 +
189 + # See deep down below for build-date.
190 + --disable-libmpv-static
191 + --disable-static-build
192 + --disable-optimize # Don't add '-O2' to CFLAGS.
193 + --disable-debug-build # Don't add '-g' to CFLAGS.
194 +
195 + $(use_enable doc html-build)
196 + $(use_enable doc pdf-build)
197 + $(use_enable vf-dlopen vf-dlopen-filters)
198 + $(use_enable zsh-completion zsh-comp)
199 + $(use_enable test)
200 +
201 + $(use_enable iconv)
202 + $(use_enable samba libsmbclient)
203 + $(use_enable lua)
204 + $(usex luajit '--lua=luajit' '')
205 + $(use_enable libass)
206 + $(use_enable libass libass-osd)
207 + $(use_enable encode encoding)
208 + $(use_enable bluray libbluray)
209 + $(use_enable dvd dvdread)
210 + $(use_enable dvd dvdnav)
211 + $(use_enable cdda)
212 + $(use_enable enca)
213 + $(use_enable libguess)
214 + $(use_enable uchardet)
215 + $(use_enable rubberband)
216 + $(use_enable lcms lcms2)
217 + --disable-vapoursynth # Only available in overlays.
218 + --disable-vapoursynth-lazy
219 + $(use_enable archive libarchive)
220 +
221 + --enable-libavdevice
222 +
223 + # Audio outputs:
224 + $(use_enable sdl sdl2) # Listed under audio, but also includes video.
225 + --disable-sdl1
226 + $(use_enable oss oss-audio)
227 + --disable-rsound # Only available in overlays.
228 + $(use_enable pulseaudio pulse)
229 + $(use_enable jack)
230 + $(use_enable openal)
231 + --disable-opensles
232 + $(use_enable alsa)
233 + $(use_enable coreaudio)
234 +
235 + # Video outputs:
236 + $(use_enable aqua cocoa)
237 + $(use_enable drm)
238 + $(use_enable gbm)
239 + $(use_enable wayland)
240 + $(use_enable X x11)
241 + $(use_enable xscreensaver xss)
242 + $(use_enable X xext)
243 + $(use_enable xv)
244 + $(use_enable xinerama)
245 + $(use_enable X xrandr)
246 + $(usex opengl "$(use_enable aqua gl-cocoa)" '--disable-gl-cocoa')
247 + $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11')
248 + $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
249 + $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm')
250 + $(use_enable wayland gl-wayland)
251 + $(use_enable vdpau)
252 + $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
253 + $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl.
254 + $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11')
255 + $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland')
256 + $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm')
257 + $(use_enable libcaca caca)
258 + $(use_enable jpeg)
259 + --disable-android
260 + $(use_enable raspberry-pi rpi)
261 + $(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl')
262 +
263 + # HWaccels:
264 + # Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.
265 + $(use_enable vaapi vaapi-hwaccel)
266 + # Automagic VDPAU HW acceleration. See Gentoo bug 558870.
267 +
268 + # TV features:
269 + $(use_enable v4l tv)
270 + $(use_enable v4l tv-v4l2)
271 + $(use_enable v4l libv4l2)
272 + $(use_enable v4l audio-input)
273 + $(use_enable dvb dvbin)
274 +
275 + # Miscellaneous features:
276 + --disable-apple-remote # Needs testing first. See Gentoo bug 577332.
277 + )
278 +
279 + if use vaapi && use X; then
280 + mywafargs+=(
281 + $(use_enable opengl vaapi-glx)
282 + $(use_enable egl vaapi-x-egl)
283 + )
284 + fi
285 +
286 + # Create reproducible non-live builds.
287 + [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)
288 +
289 + waf-utils_src_configure "${mywafargs[@]}"
290 +}
291 +
292 +src_install() {
293 + waf-utils_src_install
294 +
295 + if use cli && use luajit; then
296 + pax-mark -m "${ED}"usr/bin/${PN}
297 + fi
298 +}
299 +
300 +pkg_preinst() {
301 + gnome2_icon_savelist
302 +}
303 +
304 +pkg_postinst() {
305 + fdo-mime_desktop_database_update
306 + gnome2_icon_cache_update
307 +
308 + # bash-completion < 2.3-r1 already installs (mostly broken) mpv completion.
309 + if use cli && ! has_version '<app-shells/bash-completion-2.3-r1' && \
310 + ! has_version 'app-shells/mpv-bash-completion'; then
311 + elog "If you want to have command-line completion via bash-completion,"
312 + elog "please install app-shells/mpv-bash-completion."
313 + fi
314 +
315 + if use cli && [[ -n ${REPLACING_VERSIONS} ]] && \
316 + has_version 'app-shells/mpv-bash-completion'; then
317 + elog "If command-line completion doesn't work after mpv update,"
318 + elog "please rebuild app-shells/mpv-bash-completion."
319 + fi
320 +}
321 +
322 +pkg_postrm() {
323 + fdo-mime_desktop_database_update
324 + gnome2_icon_cache_update
325 +}
326 +
327 +src_test() {
328 + cd "${S}"/build/test || die
329 + for test in *; do
330 + if [[ -x ${test} ]]; then
331 + ./"${test}" || die "Test suite failed"
332 + fi
333 + done
334 +}