1 |
commit: 075cacd6224fc94f2cbd2be393d626626dc95dd2 |
2 |
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Dec 22 23:08:10 2015 +0000 |
4 |
Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 28 12:47:24 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=075cacd6 |
7 |
|
8 |
media-video/mpv: revbump 0.11.0 to receive recent live ebuild changes |
9 |
|
10 |
This requires a small upstream patch to fix include in tests. |
11 |
|
12 |
Package-Manager: portage-2.2.24 |
13 |
|
14 |
.../mpv/files/mpv-fix-include-in-tests.patch | 17 ++ |
15 |
media-video/mpv/mpv-0.11.0-r1.ebuild | 284 +++++++++++++++++++++ |
16 |
2 files changed, 301 insertions(+) |
17 |
|
18 |
diff --git a/media-video/mpv/files/mpv-fix-include-in-tests.patch b/media-video/mpv/files/mpv-fix-include-in-tests.patch |
19 |
new file mode 100644 |
20 |
index 0000000..b020119 |
21 |
--- /dev/null |
22 |
+++ b/media-video/mpv/files/mpv-fix-include-in-tests.patch |
23 |
@@ -0,0 +1,17 @@ |
24 |
+commit 867334395765ae7d2765e0834f9fd3dd5de53cab |
25 |
+Author: Ilya Tumaykin <itumaykin@×××××.com> |
26 |
+Date: Tue Dec 22 17:10:12 2015 +0300 |
27 |
+ |
28 |
+ tests: fix #include |
29 |
+ |
30 |
+diff --git a/test/gl_video.c b/test/gl_video.c |
31 |
+index 253ab35..97fee94 100644 |
32 |
+--- a/test/gl_video.c |
33 |
++++ b/test/gl_video.c |
34 |
+@@ -1,5 +1,5 @@ |
35 |
+ #include "test_helpers.h" |
36 |
+-#include "video/out/gl_video.h" |
37 |
++#include "video/out/opengl/video.h" |
38 |
+ |
39 |
+ static void test_scale_ambient_lux_limits(void **state) { |
40 |
+ float x; |
41 |
|
42 |
diff --git a/media-video/mpv/mpv-0.11.0-r1.ebuild b/media-video/mpv/mpv-0.11.0-r1.ebuild |
43 |
new file mode 100644 |
44 |
index 0000000..dc450c2 |
45 |
--- /dev/null |
46 |
+++ b/media-video/mpv/mpv-0.11.0-r1.ebuild |
47 |
@@ -0,0 +1,284 @@ |
48 |
+# Copyright 1999-2015 Gentoo Foundation |
49 |
+# Distributed under the terms of the GNU General Public License v2 |
50 |
+# $Id$ |
51 |
+ |
52 |
+EAPI=5 |
53 |
+ |
54 |
+PYTHON_COMPAT=( python{2_7,3_3,3_4} ) |
55 |
+PYTHON_REQ_USE='threads(+)' |
56 |
+ |
57 |
+WAF_PV='1.8.12' |
58 |
+ |
59 |
+inherit eutils fdo-mime gnome2-utils pax-utils python-any-r1 waf-utils |
60 |
+ |
61 |
+DESCRIPTION="Media player based on MPlayer and mplayer2" |
62 |
+HOMEPAGE="https://mpv.io/" |
63 |
+ |
64 |
+if [[ ${PV} != *9999* ]]; then |
65 |
+ SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
66 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux" |
67 |
+ DOCS=( RELEASE_NOTES ) |
68 |
+else |
69 |
+ EGIT_REPO_URI="https://github.com/mpv-player/mpv.git" |
70 |
+ inherit git-r3 |
71 |
+fi |
72 |
+SRC_URI+=" https://waf.io/waf-${WAF_PV}" |
73 |
+DOCS+=( README.md etc/example.conf etc/input.conf ) |
74 |
+ |
75 |
+# See Copyright in source tarball and bug #506946. Waf is BSD, libmpv is ISC. |
76 |
+LICENSE="GPL-2+ BSD ISC" |
77 |
+SLOT="0" |
78 |
+# Here 'opengl' stands for GLX, 'egl' stands for any EGL-based output |
79 |
+IUSE="+alsa archive bluray cdda +cli doc drm dvb +dvd egl +enca encode +iconv |
80 |
+ jack jpeg lcms +libass libav libcaca libguess libmpv lua luajit openal |
81 |
+ +opengl oss pulseaudio pvr raspberry-pi rubberband samba sdl selinux test |
82 |
+ uchardet v4l vaapi vdpau vf-dlopen wayland +X xinerama +xscreensaver xv" |
83 |
+ |
84 |
+REQUIRED_USE=" |
85 |
+ || ( cli libmpv ) |
86 |
+ egl? ( || ( X wayland ) ) |
87 |
+ enca? ( iconv ) |
88 |
+ lcms? ( || ( opengl egl ) ) |
89 |
+ libguess? ( iconv ) |
90 |
+ luajit? ( lua ) |
91 |
+ opengl? ( X ) |
92 |
+ pvr? ( v4l ) |
93 |
+ uchardet? ( iconv ) |
94 |
+ v4l? ( || ( alsa oss ) ) |
95 |
+ vaapi? ( X ) |
96 |
+ vdpau? ( X ) |
97 |
+ wayland? ( egl ) |
98 |
+ xinerama? ( X ) |
99 |
+ xscreensaver? ( X ) |
100 |
+ xv? ( X ) |
101 |
+" |
102 |
+ |
103 |
+COMMON_DEPEND=" |
104 |
+ !libav? ( >=media-video/ffmpeg-2.4.0:0=[encode?,threads,vaapi?,vdpau?] ) |
105 |
+ libav? ( >=media-video/libav-11:0=[encode?,threads,vaapi?,vdpau?] ) |
106 |
+ sys-libs/zlib |
107 |
+ alsa? ( >=media-libs/alsa-lib-1.0.18 ) |
108 |
+ archive? ( >=app-arch/libarchive-3.0.0:= ) |
109 |
+ bluray? ( >=media-libs/libbluray-0.3.0 ) |
110 |
+ cdda? ( dev-libs/libcdio-paranoia ) |
111 |
+ drm? ( x11-libs/libdrm ) |
112 |
+ dvb? ( virtual/linuxtv-dvb-headers ) |
113 |
+ dvd? ( |
114 |
+ >=media-libs/libdvdnav-4.2.0 |
115 |
+ >=media-libs/libdvdread-4.1.0 |
116 |
+ ) |
117 |
+ egl? ( media-libs/mesa[egl,wayland(-)?] ) |
118 |
+ iconv? ( |
119 |
+ virtual/libiconv |
120 |
+ enca? ( app-i18n/enca ) |
121 |
+ libguess? ( >=app-i18n/libguess-1.0 ) |
122 |
+ uchardet? ( dev-libs/uchardet ) |
123 |
+ ) |
124 |
+ jack? ( media-sound/jack-audio-connection-kit ) |
125 |
+ jpeg? ( virtual/jpeg:0 ) |
126 |
+ lcms? ( >=media-libs/lcms-2.6:2 ) |
127 |
+ libass? ( |
128 |
+ >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz] |
129 |
+ virtual/ttf-fonts |
130 |
+ ) |
131 |
+ libcaca? ( >=media-libs/libcaca-0.99_beta18 ) |
132 |
+ lua? ( |
133 |
+ !luajit? ( || ( =dev-lang/lua-5.1*:= =dev-lang/lua-5.2*:= ) ) |
134 |
+ luajit? ( dev-lang/luajit:2 ) |
135 |
+ ) |
136 |
+ openal? ( >=media-libs/openal-1.13 ) |
137 |
+ pulseaudio? ( media-sound/pulseaudio ) |
138 |
+ rubberband? ( >=media-libs/rubberband-1.8.0 ) |
139 |
+ samba? ( net-fs/samba ) |
140 |
+ sdl? ( media-libs/libsdl2[sound,threads,video,X?,wayland?] ) |
141 |
+ v4l? ( media-libs/libv4l ) |
142 |
+ wayland? ( |
143 |
+ >=dev-libs/wayland-1.6.0 |
144 |
+ >=x11-libs/libxkbcommon-0.3.0 |
145 |
+ ) |
146 |
+ X? ( |
147 |
+ x11-libs/libX11 |
148 |
+ x11-libs/libXext |
149 |
+ >=x11-libs/libXrandr-1.2.0 |
150 |
+ opengl? ( |
151 |
+ x11-libs/libXdamage |
152 |
+ virtual/opengl |
153 |
+ ) |
154 |
+ vaapi? ( >=x11-libs/libva-1.2.0[X] ) |
155 |
+ vdpau? ( >=x11-libs/libvdpau-0.2 ) |
156 |
+ xinerama? ( x11-libs/libXinerama ) |
157 |
+ xscreensaver? ( x11-libs/libXScrnSaver ) |
158 |
+ xv? ( x11-libs/libXv ) |
159 |
+ ) |
160 |
+" |
161 |
+DEPEND="${COMMON_DEPEND} |
162 |
+ ${PYTHON_DEPS} |
163 |
+ >=dev-lang/perl-5.8 |
164 |
+ dev-python/docutils |
165 |
+ virtual/pkgconfig |
166 |
+ doc? ( dev-python/rst2pdf ) |
167 |
+ test? ( >=dev-util/cmocka-1.0.0 ) |
168 |
+" |
169 |
+RDEPEND="${COMMON_DEPEND} |
170 |
+ selinux? ( sec-policy/selinux-mplayer ) |
171 |
+" |
172 |
+ |
173 |
+pkg_pretend() { |
174 |
+ if ! use libass; then |
175 |
+ ewarn "You have disabled the libass support." |
176 |
+ ewarn "OSD and subtitles won't be available." |
177 |
+ fi |
178 |
+ |
179 |
+ if use openal; then |
180 |
+ ewarn "You have enabled the openal audio output. Be warned that" |
181 |
+ ewarn "this output is considered experimental by upstream." |
182 |
+ fi |
183 |
+ |
184 |
+ if use sdl; then |
185 |
+ ewarn "You have enabled the sdl video and audio outputs. Note that" |
186 |
+ ewarn "upstream provides these outputs for compatibility reasons only." |
187 |
+ ewarn "You probably don't need them under the normal circumstances." |
188 |
+ fi |
189 |
+ |
190 |
+ if use libav; then |
191 |
+ elog "You have enabled media-video/libav instead of media-video/ffmpeg." |
192 |
+ elog "Upstream recommends media-video/ffmpeg, as some functionality" |
193 |
+ elog "is not provided by media-video/libav." |
194 |
+ fi |
195 |
+ |
196 |
+ einfo "mpv optionally supports many different audio and video formats." |
197 |
+ einfo "You will need to enable support for the desired formats in your" |
198 |
+ einfo "libavcodec/libavformat provider:" |
199 |
+ einfo " media-video/ffmpeg or media-video/libav" |
200 |
+} |
201 |
+ |
202 |
+src_prepare() { |
203 |
+ cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die |
204 |
+ chmod +x "${S}"/waf || die |
205 |
+ |
206 |
+ epatch "${FILESDIR}/${PN}-fix-include-in-tests.patch" |
207 |
+ epatch_user |
208 |
+} |
209 |
+ |
210 |
+src_configure() { |
211 |
+ local mywafargs=( |
212 |
+ --confdir="${EPREFIX}"/etc/${PN} |
213 |
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} |
214 |
+ |
215 |
+ $(usex cli '' '--disable-cplayer') |
216 |
+ $(use_enable libmpv libmpv-shared) |
217 |
+ |
218 |
+ --disable-libmpv-static |
219 |
+ --disable-static-build |
220 |
+ --disable-build-date # Create reproducible build |
221 |
+ --disable-optimize # Do not add '-O2' to CFLAGS |
222 |
+ --disable-debug-build # Do not add '-g' to CFLAGS |
223 |
+ |
224 |
+ $(use_enable doc pdf-build) |
225 |
+ $(use_enable vf-dlopen vf-dlopen-filters) |
226 |
+ $(use_enable cli zsh-comp) |
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 libass) |
234 |
+ $(use_enable libass libass-osd) |
235 |
+ $(use_enable encode encoding) |
236 |
+ $(use_enable bluray libbluray) |
237 |
+ $(use_enable dvd dvdread) |
238 |
+ $(use_enable dvd dvdnav) |
239 |
+ $(use_enable cdda) |
240 |
+ $(use_enable enca) |
241 |
+ $(use_enable libguess) |
242 |
+ $(use_enable uchardet) |
243 |
+ $(use_enable rubberband) |
244 |
+ $(use_enable lcms lcms2) |
245 |
+ --disable-vapoursynth # Only available in overlays |
246 |
+ --disable-vapoursynth-lazy |
247 |
+ $(use_enable archive libarchive) |
248 |
+ |
249 |
+ --enable-libavfilter |
250 |
+ --enable-libavdevice |
251 |
+ |
252 |
+ # Audio outputs |
253 |
+ $(use_enable sdl sdl2) # Listed under audio, but also includes video |
254 |
+ --disable-sdl1 |
255 |
+ $(use_enable oss oss-audio) |
256 |
+ --disable-rsound # Only available in overlays |
257 |
+ $(use_enable pulseaudio pulse) |
258 |
+ $(use_enable jack) |
259 |
+ $(use_enable openal) |
260 |
+ $(use_enable alsa) |
261 |
+ --disable-coreaudio |
262 |
+ --disable-dsound |
263 |
+ --disable-wasapi |
264 |
+ |
265 |
+ # Video outputs |
266 |
+ --disable-cocoa |
267 |
+ $(use_enable wayland) |
268 |
+ $(use_enable X x11) |
269 |
+ $(use_enable xscreensaver xss) |
270 |
+ $(use_enable X xext) |
271 |
+ $(use_enable xv) |
272 |
+ $(use_enable xinerama) |
273 |
+ $(use_enable X xrandr) |
274 |
+ $(use_enable opengl gl-x11) |
275 |
+ $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11') |
276 |
+ $(use_enable wayland gl-wayland) |
277 |
+ $(use_enable vdpau) |
278 |
+ $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11') |
279 |
+ $(use_enable vaapi) |
280 |
+ $(use_enable vaapi vaapi-vpp) |
281 |
+ $(usex vaapi "$(use_enable opengl vaapi-glx)" '--disable-vaapi-glx') |
282 |
+ $(use_enable libcaca caca) |
283 |
+ $(use_enable drm) |
284 |
+ $(use_enable jpeg) |
285 |
+ $(use_enable raspberry-pi rpi) |
286 |
+ |
287 |
+ # HWaccels |
288 |
+ $(use_enable vaapi vaapi-hwaccel) |
289 |
+ # Automagic VDPAU HW acceleration. See Gentoo bug 558870. |
290 |
+ |
291 |
+ # TV features |
292 |
+ $(use_enable v4l tv) |
293 |
+ $(use_enable v4l tv-v4l2) |
294 |
+ $(use_enable v4l libv4l2) |
295 |
+ $(use_enable v4l audio-input) |
296 |
+ $(use_enable pvr) |
297 |
+ $(use_enable dvb dvbin) |
298 |
+ ) |
299 |
+ waf-utils_src_configure "${mywafargs[@]}" |
300 |
+} |
301 |
+ |
302 |
+src_install() { |
303 |
+ waf-utils_src_install |
304 |
+ |
305 |
+ if use cli && use luajit; then |
306 |
+ pax-mark -m "${ED}usr/bin/${PN}" |
307 |
+ fi |
308 |
+} |
309 |
+ |
310 |
+pkg_preinst() { |
311 |
+ gnome2_icon_savelist |
312 |
+} |
313 |
+ |
314 |
+pkg_postinst() { |
315 |
+ fdo-mime_desktop_database_update |
316 |
+ gnome2_icon_cache_update |
317 |
+} |
318 |
+ |
319 |
+pkg_postrm() { |
320 |
+ fdo-mime_desktop_database_update |
321 |
+ gnome2_icon_cache_update |
322 |
+} |
323 |
+ |
324 |
+src_test() { |
325 |
+ cd "${S}"/build/test || die |
326 |
+ for test in *; do |
327 |
+ if [[ -x ${test} ]]; then |
328 |
+ ./"${test}" || die "Test suite failed" |
329 |
+ fi |
330 |
+ done |
331 |
+} |