1 |
commit: 8cd64057c30c0a6b62f84e32d8b34ba994e16200 |
2 |
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Apr 27 20:30:03 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 4 16:28:07 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cd64057 |
7 |
|
8 |
media-video/mpv: verbump to 0.25.0 |
9 |
|
10 |
Gentoo-Bug: 616838 |
11 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
12 |
|
13 |
media-video/mpv/Manifest | 1 + |
14 |
.../0.25.0/mpv-use-internal-GL-definitions.patch | 100 ++++++ |
15 |
media-video/mpv/mpv-0.25.0.ebuild | 376 +++++++++++++++++++++ |
16 |
3 files changed, 477 insertions(+) |
17 |
|
18 |
diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest |
19 |
index 4aeeafdc247..d36d37ce4ba 100644 |
20 |
--- a/media-video/mpv/Manifest |
21 |
+++ b/media-video/mpv/Manifest |
22 |
@@ -1,5 +1,6 @@ |
23 |
DIST mpv-0.18.0.tar.gz 2758960 SHA256 b656638d4f6bce2621baaacb60d8be384aa492fcd86dfd43996aaa2c16fee02b SHA512 5a899ea680b4da6d668a6e77a254e623bafef16f376ee46639e40f151da5a000de84b382f2b07f3a1e87b60fc8e524132767fdf243e36474966af11a88277437 WHIRLPOOL c491e61cb2d7f453cfc23605120048e81c2b7621b8d9591cad6415d3b550f55db6a6c8c6f90d27c7ce214ff89f92a9861d202b457c2de25c5b7de11d8d1d40af |
24 |
DIST mpv-0.22.0.tar.gz 2822645 SHA256 c0f9ac8f0e37a391d19007b333ef8787c2f45d75a0d4401c0098cde52c5082f6 SHA512 6c021bfb79cbedee842bf122ebb29df56e8b1cbfcb038bd54bf6e2f2db2a6550b71fd9fe8998dbd79b4ceeab3fbcab65ec60695f255c5cb36fb1feae17b797c0 WHIRLPOOL 3458dfe646bab65408a7fe45f98ae168f439b4939064b009ba87d0ae08c1f2067bd252558a92f9fdb0822bf5a35b2377bce7f46aeb190d60a4e115394f0506c9 |
25 |
DIST mpv-0.24.0.tar.gz 2835920 SHA256 a41854fa0ac35b9c309ad692aaee67c8d4495c3546f11cb4cdd0a124195d3f15 SHA512 c1d988ccf9e22765822b9ce75c04f155df4fc4bd4c2aa164903eee8947c36f659116c2ab96668a4af31c4f5aeecbf20ce21191c48456d74e138db617a1e34d96 WHIRLPOOL e3a10fc26df124127b819754aedd8bd4ccaa1b9b3764f0deac20eaa8e338e49f09aea25d2b508b8599ce75b0a72fdd3ebcbb9487851cf823c803024e1effc950 |
26 |
+DIST mpv-0.25.0.tar.gz 2874584 SHA256 07423ffad6921ec4da32f703cd7fbfb27012301dcb736ac8542ac8e6083b0bce SHA512 eefc574e2995ddf6bd15c9b62986a5ca277c30949b036d57a11bbfb796c11c1e6dd7c313abd91a909dd98ca0f2b0be29ec6b980d0287a5891b42b0ffba926cbf WHIRLPOOL 4c5225040ed8793de5daa00a4bb5cf2754fb877c73055dbe4bed92d9fa1bb3f5e67d341c698658e9f10e183084bbe691c8bbb90960e16358b9ffdaa58b11bf2b |
27 |
DIST waf-1.8.12 97567 SHA256 01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b SHA512 8e47112abb134f965f15a27a600b4453cad3075afb5dadc17f2f6dac33d80ec68b679ac0ebc5f8a0245cbd07ae9fc7b899e69afc1bd021cce74e7af2ab457939 WHIRLPOOL c36d37c2d8c08e4048b4800f511611af5cf534304fcb58388ca491ff308bfcbcdd959d153edfd6ff8c118404e7293d8b786e43b07486139bf915a82aa75d792b |
28 |
DIST waf-1.9.8 100685 SHA256 167dc42bab6d5bd823b798af195420319cb5c9b571e00db7d83df2a0fe1f4dbf SHA512 e7493767f65deeb38aa162adef22adf60ebbd038410e9cdf4fe6f0de8c43395dbbba14962aa2c3855e1277136085fc22ad12ebfb8ac4e76f16358296039b8ea2 WHIRLPOOL 447b6936b8bd5904d85001a96bdcfd0d517f92ff0a859f8a63efd032a418c1b335578266d0f7ce0c5f71ffc7b81643d18e21c14981502153e2d586a9ce152c3a |
29 |
|
30 |
diff --git a/media-video/mpv/files/0.25.0/mpv-use-internal-GL-definitions.patch b/media-video/mpv/files/0.25.0/mpv-use-internal-GL-definitions.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..afb0a541647 |
33 |
--- /dev/null |
34 |
+++ b/media-video/mpv/files/0.25.0/mpv-use-internal-GL-definitions.patch |
35 |
@@ -0,0 +1,100 @@ |
36 |
+commit 9d80c08441edf3e8da5180fb42eda71878e9c411 |
37 |
+Author: Ilya Tumaykin <itumaykin@×××××.com> |
38 |
+Date: Wed Apr 26 17:43:51 2017 +0300 |
39 |
+ |
40 |
+build: rely on internal GL headers for rpi check |
41 |
+ |
42 |
+Since mpv ships all the required OpenGL defines now, |
43 |
+rpi check doesn't need to check system GL headers. |
44 |
+ |
45 |
+diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py |
46 |
+index 8ed06e5b2..36b6822be 100644 |
47 |
+--- a/waftools/checks/custom.py |
48 |
++++ b/waftools/checks/custom.py |
49 |
+@@ -146,10 +146,6 @@ def check_rpi(ctx, dependency_identifier): |
50 |
+ check_pkg_config('egl'), |
51 |
+ check_pkg_config('glesv2'), |
52 |
+ check_cc(lib=['mmal_core', 'mmal_util', 'mmal_vc_client'], use=['bcm_host']), |
53 |
+- # We still need all OpenGL symbols, because the vo_opengl code is |
54 |
+- # generic and supports anything from GLES2/OpenGL 2.1 to OpenGL 4 core. |
55 |
+- check_statement('GL/gl.h', '(void)GL_RGB32F'), # arbitrary OpenGL 3.0 symbol |
56 |
+- check_statement('GL/gl.h', '(void)GL_LUMINANCE16') # arbitrary OpenGL legacy-only symbol |
57 |
+ ] |
58 |
+ |
59 |
+ ret = all((fn(ctx, dependency_identifier) for fn in checks)) |
60 |
+ |
61 |
+commit cb25bb5776b30e34ff7aa32c5e0a4f8862774e74 |
62 |
+Author: wm4 <wm4@nowhere> |
63 |
+Date: Wed Apr 26 17:09:16 2017 +0200 |
64 |
+ |
65 |
+build: remove checks for libGL |
66 |
+ |
67 |
+We don't need to link against libGL directly, nor do we need OpenGL |
68 |
+headers. The only thing we need is the windowing interop stuff, such as |
69 |
+libEGL. |
70 |
+ |
71 |
+diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py |
72 |
+index 36b6822be..a2b4971cd 100644 |
73 |
+--- a/waftools/checks/custom.py |
74 |
++++ b/waftools/checks/custom.py |
75 |
+@@ -144,7 +144,6 @@ def check_rpi(ctx, dependency_identifier): |
76 |
+ checks = [ |
77 |
+ check_pkg_config('bcm_host', uselib_store='bcm_host'), |
78 |
+ check_pkg_config('egl'), |
79 |
+- check_pkg_config('glesv2'), |
80 |
+ check_cc(lib=['mmal_core', 'mmal_util', 'mmal_vc_client'], use=['bcm_host']), |
81 |
+ ] |
82 |
+ |
83 |
+diff --git a/wscript b/wscript |
84 |
+index 7270bf464..a24d4852f 100644 |
85 |
+--- a/wscript |
86 |
++++ b/wscript |
87 |
+@@ -610,16 +610,13 @@ video_output_features = [ |
88 |
+ 'desc': 'OpenGL X11 EGL Backend', |
89 |
+ 'deps': [ 'x11' ], |
90 |
+ 'groups': [ 'gl' ], |
91 |
+- 'func': check_pkg_config('egl', 'gl'), |
92 |
++ 'func': check_pkg_config('egl'), |
93 |
+ } , { |
94 |
+ 'name': '--egl-drm', |
95 |
+ 'desc': 'OpenGL DRM EGL Backend', |
96 |
+ 'deps': [ 'drm', 'gbm' ], |
97 |
+ 'groups': [ 'gl' ], |
98 |
+- 'func': compose_checks( |
99 |
+- check_pkg_config('egl'), |
100 |
+- check_pkg_config_cflags('gl') |
101 |
+- ) |
102 |
++ 'func': check_pkg_config('egl'), |
103 |
+ } , { |
104 |
+ 'name': '--gl-wayland', |
105 |
+ 'desc': 'OpenGL Wayland Backend', |
106 |
+@@ -743,7 +740,6 @@ video_output_features = [ |
107 |
+ 'deps': ['libdl'], |
108 |
+ 'func': compose_checks( |
109 |
+ check_cc(lib="EGL"), |
110 |
+- check_cc(lib="GLESv2"), |
111 |
+ check_statement('EGL/fbdev_window.h', 'struct fbdev_window test'), |
112 |
+ check_statement('linux/fb.h', 'struct fb_var_screeninfo test'), |
113 |
+ ), |
114 |
+ |
115 |
+commit 010c7d499258c1064189b2d149ae6eca859d9ae1 |
116 |
+Author: wm4 <wm4@nowhere> |
117 |
+Date: Wed Apr 26 17:43:23 2017 +0200 |
118 |
+ |
119 |
+vo_opengl: context_drm_egl: remove unnecessary include |
120 |
+ |
121 |
+Could be broken after the previous commit removed finding the GL include |
122 |
+dir. |
123 |
+ |
124 |
+diff --git a/video/out/opengl/context_drm_egl.c b/video/out/opengl/context_drm_egl.c |
125 |
+index 1852cb76f..e52fec451 100644 |
126 |
+--- a/video/out/opengl/context_drm_egl.c |
127 |
++++ b/video/out/opengl/context_drm_egl.c |
128 |
+@@ -27,7 +27,6 @@ |
129 |
+ #include <gbm.h> |
130 |
+ #include <EGL/egl.h> |
131 |
+ #include <EGL/eglext.h> |
132 |
+-#include <GL/gl.h> |
133 |
+ |
134 |
+ #include "context.h" |
135 |
+ #include "egl_helpers.h" |
136 |
|
137 |
diff --git a/media-video/mpv/mpv-0.25.0.ebuild b/media-video/mpv/mpv-0.25.0.ebuild |
138 |
new file mode 100644 |
139 |
index 00000000000..b978fb7d764 |
140 |
--- /dev/null |
141 |
+++ b/media-video/mpv/mpv-0.25.0.ebuild |
142 |
@@ -0,0 +1,376 @@ |
143 |
+# Copyright 1999-2017 Gentoo Foundation |
144 |
+# Distributed under the terms of the GNU General Public License v2 |
145 |
+ |
146 |
+EAPI=6 |
147 |
+ |
148 |
+PYTHON_COMPAT=( python{2_7,3_4,3_5} ) |
149 |
+PYTHON_REQ_USE='threads(+)' |
150 |
+ |
151 |
+WAF_PV=1.9.8 |
152 |
+ |
153 |
+inherit gnome2-utils pax-utils python-r1 toolchain-funcs versionator waf-utils xdg-utils |
154 |
+ |
155 |
+DESCRIPTION="Media player based on MPlayer and mplayer2" |
156 |
+HOMEPAGE="https://mpv.io/" |
157 |
+ |
158 |
+if [[ ${PV} != *9999* ]]; then |
159 |
+ SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
160 |
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux" |
161 |
+ DOCS=( RELEASE_NOTES ) |
162 |
+else |
163 |
+ EGIT_REPO_URI=( {https,git}://github.com/mpv-player/mpv.git ) |
164 |
+ inherit git-r3 |
165 |
+fi |
166 |
+SRC_URI+=" https://waf.io/waf-${WAF_PV}" |
167 |
+DOCS+=( README.md ) |
168 |
+ |
169 |
+# See Copyright in sources and Gentoo bug 506946. Waf is BSD, libmpv is ISC. |
170 |
+LICENSE="LGPL-2.1+ GPL-2+ BSD ISC" |
171 |
+SLOT="0" |
172 |
+IUSE="+alsa aqua archive bluray cdda +cli coreaudio cplugins cuda doc drm dvb |
173 |
+ dvd +egl encode gbm +iconv jack jpeg lcms +libass libav libcaca libmpv +lua |
174 |
+ luajit openal +opengl oss pulseaudio raspberry-pi rubberband samba sdl |
175 |
+ selinux test tools +uchardet v4l vaapi vdpau vf-dlopen wayland +X +xv |
176 |
+ zsh-completion" |
177 |
+IUSE+=" cpu_flags_x86_sse4_1" |
178 |
+ |
179 |
+REQUIRED_USE=" |
180 |
+ || ( cli libmpv ) |
181 |
+ aqua? ( opengl ) |
182 |
+ cuda? ( !libav opengl ) |
183 |
+ egl? ( || ( gbm X wayland ) ) |
184 |
+ gbm? ( drm egl opengl ) |
185 |
+ lcms? ( opengl ) |
186 |
+ luajit? ( lua ) |
187 |
+ opengl? ( || ( aqua egl X raspberry-pi !cli? ( libmpv ) ) ) |
188 |
+ raspberry-pi? ( opengl ) |
189 |
+ test? ( opengl ) |
190 |
+ tools? ( cli ) |
191 |
+ uchardet? ( iconv ) |
192 |
+ v4l? ( || ( alsa oss ) ) |
193 |
+ vaapi? ( || ( gbm X wayland ) ) |
194 |
+ vdpau? ( X ) |
195 |
+ wayland? ( egl ) |
196 |
+ X? ( egl? ( opengl ) ) |
197 |
+ xv? ( X ) |
198 |
+ zsh-completion? ( cli ) |
199 |
+ ${PYTHON_REQUIRED_USE} |
200 |
+" |
201 |
+ |
202 |
+COMMON_DEPEND=" |
203 |
+ !libav? ( >=media-video/ffmpeg-3.2.2:0=[encode?,threads,vaapi?,vdpau?] ) |
204 |
+ libav? ( >=media-video/libav-12:0=[encode?,threads,vaapi?,vdpau?] ) |
205 |
+ sys-libs/zlib |
206 |
+ alsa? ( >=media-libs/alsa-lib-1.0.18 ) |
207 |
+ archive? ( >=app-arch/libarchive-3.0.0:= ) |
208 |
+ bluray? ( >=media-libs/libbluray-0.3.0:= ) |
209 |
+ cdda? ( dev-libs/libcdio-paranoia ) |
210 |
+ cuda? ( >=media-video/ffmpeg-3.3:0 ) |
211 |
+ drm? ( x11-libs/libdrm ) |
212 |
+ dvd? ( |
213 |
+ >=media-libs/libdvdnav-4.2.0 |
214 |
+ >=media-libs/libdvdread-4.1.0 |
215 |
+ ) |
216 |
+ egl? ( media-libs/mesa[egl,gbm(-)?,wayland(-)?] ) |
217 |
+ iconv? ( |
218 |
+ virtual/libiconv |
219 |
+ uchardet? ( app-i18n/uchardet ) |
220 |
+ ) |
221 |
+ jack? ( virtual/jack ) |
222 |
+ jpeg? ( virtual/jpeg:0 ) |
223 |
+ lcms? ( >=media-libs/lcms-2.6:2 ) |
224 |
+ libass? ( |
225 |
+ >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz] |
226 |
+ virtual/ttf-fonts |
227 |
+ ) |
228 |
+ libcaca? ( >=media-libs/libcaca-0.99_beta18 ) |
229 |
+ lua? ( |
230 |
+ !luajit? ( <dev-lang/lua-5.3:= ) |
231 |
+ luajit? ( dev-lang/luajit:2 ) |
232 |
+ ) |
233 |
+ openal? ( >=media-libs/openal-1.13 ) |
234 |
+ pulseaudio? ( media-sound/pulseaudio ) |
235 |
+ raspberry-pi? ( >=media-libs/raspberrypi-userland-0_pre20160305-r1 ) |
236 |
+ rubberband? ( >=media-libs/rubberband-1.8.0 ) |
237 |
+ samba? ( net-fs/samba[smbclient(+)] ) |
238 |
+ sdl? ( media-libs/libsdl2[sound,threads,video] ) |
239 |
+ v4l? ( media-libs/libv4l ) |
240 |
+ vaapi? ( >=x11-libs/libva-1.4.0[drm?,X?,wayland?] ) |
241 |
+ vdpau? ( >=x11-libs/libvdpau-0.2 ) |
242 |
+ wayland? ( |
243 |
+ >=dev-libs/wayland-1.6.0 |
244 |
+ >=x11-libs/libxkbcommon-0.3.0 |
245 |
+ ) |
246 |
+ X? ( |
247 |
+ x11-libs/libX11 |
248 |
+ x11-libs/libXScrnSaver |
249 |
+ x11-libs/libXext |
250 |
+ x11-libs/libXinerama |
251 |
+ x11-libs/libXrandr |
252 |
+ opengl? ( |
253 |
+ x11-libs/libXdamage |
254 |
+ virtual/opengl |
255 |
+ ) |
256 |
+ xv? ( x11-libs/libXv ) |
257 |
+ ) |
258 |
+" |
259 |
+DEPEND="${COMMON_DEPEND} |
260 |
+ ${PYTHON_DEPS} |
261 |
+ dev-python/docutils |
262 |
+ virtual/pkgconfig |
263 |
+ doc? ( dev-python/rst2pdf ) |
264 |
+ dvb? ( virtual/linuxtv-dvb-headers ) |
265 |
+ test? ( >=dev-util/cmocka-1.0.0 ) |
266 |
+ v4l? ( virtual/os-headers ) |
267 |
+ zsh-completion? ( dev-lang/perl ) |
268 |
+" |
269 |
+RDEPEND="${COMMON_DEPEND} |
270 |
+ cuda? ( x11-drivers/nvidia-drivers[X] ) |
271 |
+ selinux? ( sec-policy/selinux-mplayer ) |
272 |
+ tools? ( ${PYTHON_DEPS} ) |
273 |
+" |
274 |
+ |
275 |
+PATCHES=( |
276 |
+ "${FILESDIR}/${PN}-0.19.0-make-ffmpeg-version-check-non-fatal.patch" |
277 |
+ "${FILESDIR}/${PN}-0.23.0-make-libavdevice-check-accept-libav.patch" |
278 |
+ "${FILESDIR}/${PV}/${PN}-use-internal-GL-definitions.patch" |
279 |
+) |
280 |
+ |
281 |
+mpv_check_compiler() { |
282 |
+ if [[ ${MERGE_TYPE} != "binary" ]]; then |
283 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || \ |
284 |
+ ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 5 ) ]]; then |
285 |
+ die "${PN} requires GCC>=4.5." |
286 |
+ fi |
287 |
+ if use opengl && ! tc-has-tls; then |
288 |
+ die "Your compiler lacks C++11 TLS support. Use GCC>=4.8 or Clang>=3.3." |
289 |
+ fi |
290 |
+ if ! tc-is-gcc && use vaapi && use cpu_flags_x86_sse4_1 && \ |
291 |
+ { has_version '<media-video/ffmpeg-3.3:0' || has_version '<media-video/libav-13:0'; }; then |
292 |
+ die "${PN} requires GCC for SSE4.1 intrinsics." |
293 |
+ fi |
294 |
+ fi |
295 |
+} |
296 |
+ |
297 |
+pkg_pretend() { |
298 |
+ mpv_check_compiler |
299 |
+} |
300 |
+ |
301 |
+pkg_setup() { |
302 |
+ mpv_check_compiler |
303 |
+ [[ ${MERGE_TYPE} != "binary" ]] && python_setup |
304 |
+} |
305 |
+ |
306 |
+src_prepare() { |
307 |
+ cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die |
308 |
+ chmod +x "${S}"/waf || die |
309 |
+ default_src_prepare |
310 |
+} |
311 |
+ |
312 |
+src_configure() { |
313 |
+ tc-export CC PKG_CONFIG AR |
314 |
+ |
315 |
+ if tc-is-cross-compiler && use raspberry-pi; then |
316 |
+ export EXTRA_PKG_CONFIG_LIBDIR="${SYSROOT%/}${EPREFIX}/opt/vc/lib/pkgconfig" |
317 |
+ # Drop next line when Gentoo bug 607344 is fixed or if you fixed it locally. |
318 |
+ die "${PN} can't be cross built with raspberry-pi USE enabled. See Gentoo bug 607344." |
319 |
+ fi |
320 |
+ |
321 |
+ local mywafargs=( |
322 |
+ --confdir="${EPREFIX}/etc/${PN}" |
323 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" |
324 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
325 |
+ |
326 |
+ $(usex cli '' '--disable-cplayer') |
327 |
+ $(use_enable libmpv libmpv-shared) |
328 |
+ |
329 |
+ --disable-libmpv-static |
330 |
+ --disable-static-build |
331 |
+ # See deep down below for build-date. |
332 |
+ --disable-optimize # Don't add '-O2' to CFLAGS. |
333 |
+ --disable-debug-build # Don't add '-g' to CFLAGS. |
334 |
+ --enable-html-build |
335 |
+ |
336 |
+ $(use_enable doc pdf-build) |
337 |
+ $(use_enable cplugins) |
338 |
+ $(use_enable vf-dlopen vf-dlopen-filters) |
339 |
+ $(use_enable zsh-completion zsh-comp) |
340 |
+ $(use_enable test) |
341 |
+ |
342 |
+ $(use_enable iconv) |
343 |
+ $(use_enable samba libsmbclient) |
344 |
+ $(use_enable lua) |
345 |
+ $(usex luajit '--lua=luajit' '') |
346 |
+ $(use_enable libass) |
347 |
+ $(use_enable libass libass-osd) |
348 |
+ $(use_enable encode encoding) |
349 |
+ $(use_enable bluray libbluray) |
350 |
+ $(use_enable dvd dvdread) |
351 |
+ $(use_enable dvd dvdnav) |
352 |
+ $(use_enable cdda) |
353 |
+ $(use_enable uchardet) |
354 |
+ $(use_enable rubberband) |
355 |
+ $(use_enable lcms lcms2) |
356 |
+ --disable-vapoursynth # Only available in overlays. |
357 |
+ --disable-vapoursynth-lazy |
358 |
+ $(use_enable archive libarchive) |
359 |
+ |
360 |
+ --enable-libavdevice |
361 |
+ |
362 |
+ # Audio outputs: |
363 |
+ $(use_enable sdl sdl2) # Listed under audio, but also includes video. |
364 |
+ --disable-sdl1 |
365 |
+ $(use_enable oss oss-audio) |
366 |
+ --disable-rsound # Only available in overlays. |
367 |
+ --disable-sndio # Only available in overlays. |
368 |
+ $(use_enable pulseaudio pulse) |
369 |
+ $(use_enable jack) |
370 |
+ $(use_enable openal) |
371 |
+ --disable-opensles |
372 |
+ $(use_enable alsa) |
373 |
+ $(use_enable coreaudio) |
374 |
+ |
375 |
+ # Video outputs: |
376 |
+ $(use_enable aqua cocoa) |
377 |
+ $(use_enable drm) |
378 |
+ $(use_enable gbm) |
379 |
+ $(use_enable wayland) |
380 |
+ $(use_enable X x11) |
381 |
+ $(use_enable xv) |
382 |
+ $(usex opengl "$(use_enable aqua gl-cocoa)" '--disable-gl-cocoa') |
383 |
+ $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11') |
384 |
+ $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11') |
385 |
+ $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm') |
386 |
+ $(usex opengl "$(use_enable wayland gl-wayland)" '--disable-gl-wayland') |
387 |
+ $(use_enable vdpau) |
388 |
+ $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11') |
389 |
+ $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl. |
390 |
+ $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11') |
391 |
+ $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland') |
392 |
+ $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm') |
393 |
+ $(use_enable libcaca caca) |
394 |
+ $(use_enable jpeg) |
395 |
+ --disable-android |
396 |
+ $(use_enable raspberry-pi rpi) |
397 |
+ $(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl') |
398 |
+ --disable-mali-fbdev # Only available in overlays. |
399 |
+ $(usex opengl '' '--disable-gl') |
400 |
+ |
401 |
+ # HWaccels: |
402 |
+ # Automagic Video Toolbox HW acceleration. See Gentoo bug 577332. |
403 |
+ $(use_enable vaapi vaapi-hwaccel) |
404 |
+ $(use_enable vdpau vdpau-hwaccel) |
405 |
+ $(use_enable cuda cuda-hwaccel) |
406 |
+ |
407 |
+ # TV features: |
408 |
+ $(use_enable v4l tv) |
409 |
+ $(use_enable v4l tv-v4l2) |
410 |
+ $(use_enable v4l libv4l2) |
411 |
+ $(use_enable v4l audio-input) |
412 |
+ $(use_enable dvb dvbin) |
413 |
+ |
414 |
+ # Miscellaneous features: |
415 |
+ --disable-apple-remote # Needs testing first. See Gentoo bug 577332. |
416 |
+ ) |
417 |
+ |
418 |
+ if use vaapi && use X; then |
419 |
+ mywafargs+=( |
420 |
+ $(use_enable opengl vaapi-glx) |
421 |
+ $(use_enable egl vaapi-x-egl) |
422 |
+ ) |
423 |
+ fi |
424 |
+ |
425 |
+ # Create reproducible non-live builds. |
426 |
+ [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date) |
427 |
+ |
428 |
+ waf-utils_src_configure "${mywafargs[@]}" |
429 |
+} |
430 |
+ |
431 |
+src_install() { |
432 |
+ waf-utils_src_install |
433 |
+ |
434 |
+ if use lua; then |
435 |
+ insinto /usr/share/${PN} |
436 |
+ doins -r TOOLS/lua |
437 |
+ fi |
438 |
+ |
439 |
+ if use cli && use luajit; then |
440 |
+ pax-mark -m "${ED}"usr/bin/${PN} |
441 |
+ fi |
442 |
+ |
443 |
+ if use tools; then |
444 |
+ dobin TOOLS/{mpv_identify.sh,umpv} |
445 |
+ newbin TOOLS/idet.sh mpv_idet.sh |
446 |
+ python_replicate_script "${ED}"usr/bin/umpv |
447 |
+ fi |
448 |
+} |
449 |
+ |
450 |
+pkg_preinst() { |
451 |
+ gnome2_icon_savelist |
452 |
+} |
453 |
+ |
454 |
+pkg_postinst() { |
455 |
+ local rv softvol_0_18_1=0 osc_0_21_0=0 opengl_0_25_0=0 |
456 |
+ |
457 |
+ for rv in ${REPLACING_VERSIONS}; do |
458 |
+ version_compare ${rv} 0.18.1 |
459 |
+ [[ $? -eq 1 ]] && softvol_0_18_1=1 |
460 |
+ version_compare ${rv} 0.21.0 |
461 |
+ [[ $? -eq 1 ]] && osc_0_21_0=1 |
462 |
+ version_compare ${rv} 0.25.0 |
463 |
+ [[ $? -eq 1 ]] && ! use opengl && opengl_0_25_0=1 |
464 |
+ done |
465 |
+ |
466 |
+ if [[ ${softvol_0_18_1} -eq 1 ]]; then |
467 |
+ elog "Since version 0.18.1 the software volume control is always enabled." |
468 |
+ elog "This means that volume controls don't change the system volume," |
469 |
+ elog "e.g. per-application volume with PulseAudio." |
470 |
+ elog "If you want to restore the previous behaviour, please refer to" |
471 |
+ elog |
472 |
+ elog "https://wiki.gentoo.org/wiki/Mpv#Volume_in_0.18.1" |
473 |
+ elog |
474 |
+ fi |
475 |
+ |
476 |
+ if [[ ${osc_0_21_0} -eq 1 ]]; then |
477 |
+ elog "In version 0.21.0 the default OSC layout was changed." |
478 |
+ elog "If you want to restore the previous layout, please refer to" |
479 |
+ elog |
480 |
+ elog "https://wiki.gentoo.org/wiki/Mpv#OSC_in_0.21.0" |
481 |
+ elog |
482 |
+ fi |
483 |
+ |
484 |
+ if [[ ${opengl_0_25_0} -eq 1 ]]; then |
485 |
+ elog "Since version 0.25.0 the 'opengl' USE flag is mapped to" |
486 |
+ elog "the 'opengl' video output and no longer depends on X11" |
487 |
+ elog "or Mac OS Aqua. Consider enabling the 'opengl' USE flag." |
488 |
+ fi |
489 |
+ |
490 |
+ if use cli && ! has_version 'app-shells/mpv-bash-completion'; then |
491 |
+ elog "If you want to have command-line completion via bash-completion," |
492 |
+ elog "please install app-shells/mpv-bash-completion." |
493 |
+ fi |
494 |
+ |
495 |
+ if use cli && [[ -n ${REPLACING_VERSIONS} ]] && \ |
496 |
+ has_version 'app-shells/mpv-bash-completion'; then |
497 |
+ elog "If command-line completion doesn't work after mpv update," |
498 |
+ elog "please rebuild app-shells/mpv-bash-completion." |
499 |
+ fi |
500 |
+ |
501 |
+ gnome2_icon_cache_update |
502 |
+ xdg_desktop_database_update |
503 |
+} |
504 |
+ |
505 |
+pkg_postrm() { |
506 |
+ gnome2_icon_cache_update |
507 |
+ xdg_desktop_database_update |
508 |
+} |
509 |
+ |
510 |
+src_test() { |
511 |
+ cd "${S}"/build/test || die |
512 |
+ local test |
513 |
+ for test in *; do |
514 |
+ if [[ -x ${test} ]]; then |
515 |
+ ./"${test}" || die "Test suite failed" |
516 |
+ fi |
517 |
+ done |
518 |
+} |