1 |
commit: e535b39b9315f9b53459b5c993b0047b4c69a793 |
2 |
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Feb 12 20:24:41 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 14 21:41:06 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e535b39b |
7 |
|
8 |
media-video/mpv: verbump to 0.24.0 |
9 |
|
10 |
Also backport upstream commit to fix build w/o GL. |
11 |
|
12 |
Upstream-commit: https://github.com/mpv-player/mpv/commit/212f6c8206bd4dcc7d8970c5f1632823ae4e783a |
13 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
14 |
|
15 |
media-video/mpv/Manifest | 1 + |
16 |
.../files/0.24.0/mpv-fix-build-without-gl.patch | 32 ++ |
17 |
media-video/mpv/mpv-0.24.0.ebuild | 379 +++++++++++++++++++++ |
18 |
3 files changed, 412 insertions(+) |
19 |
|
20 |
diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest |
21 |
index 22d470d162..118dbc9a2c 100644 |
22 |
--- a/media-video/mpv/Manifest |
23 |
+++ b/media-video/mpv/Manifest |
24 |
@@ -1,4 +1,5 @@ |
25 |
DIST mpv-0.18.0.tar.gz 2758960 SHA256 b656638d4f6bce2621baaacb60d8be384aa492fcd86dfd43996aaa2c16fee02b SHA512 5a899ea680b4da6d668a6e77a254e623bafef16f376ee46639e40f151da5a000de84b382f2b07f3a1e87b60fc8e524132767fdf243e36474966af11a88277437 WHIRLPOOL c491e61cb2d7f453cfc23605120048e81c2b7621b8d9591cad6415d3b550f55db6a6c8c6f90d27c7ce214ff89f92a9861d202b457c2de25c5b7de11d8d1d40af |
26 |
DIST mpv-0.22.0.tar.gz 2822645 SHA256 c0f9ac8f0e37a391d19007b333ef8787c2f45d75a0d4401c0098cde52c5082f6 SHA512 6c021bfb79cbedee842bf122ebb29df56e8b1cbfcb038bd54bf6e2f2db2a6550b71fd9fe8998dbd79b4ceeab3fbcab65ec60695f255c5cb36fb1feae17b797c0 WHIRLPOOL 3458dfe646bab65408a7fe45f98ae168f439b4939064b009ba87d0ae08c1f2067bd252558a92f9fdb0822bf5a35b2377bce7f46aeb190d60a4e115394f0506c9 |
27 |
DIST mpv-0.23.0.tar.gz 2812103 SHA256 8aeefe5970587dfc454d2b89726b603f156bd7a9ae427654eef0d60c68d94998 SHA512 16304a729684ba177cb902e2508bdba09b344228c44ac78b27302ee4e0bcfb344b3522969e834516547bf82825009afd3bef1701327fdcaa42a9696065cca591 WHIRLPOOL fa214186ae80f4b26d967b8d6c68f0c4c56a77caaf06088249d30551e2cd5efbfc4f0a06e1944ef24ac679f1a3d47faa0d6152d192f032b3d279d5ada6567c8e |
28 |
+DIST mpv-0.24.0.tar.gz 2835920 SHA256 a41854fa0ac35b9c309ad692aaee67c8d4495c3546f11cb4cdd0a124195d3f15 SHA512 c1d988ccf9e22765822b9ce75c04f155df4fc4bd4c2aa164903eee8947c36f659116c2ab96668a4af31c4f5aeecbf20ce21191c48456d74e138db617a1e34d96 WHIRLPOOL e3a10fc26df124127b819754aedd8bd4ccaa1b9b3764f0deac20eaa8e338e49f09aea25d2b508b8599ce75b0a72fdd3ebcbb9487851cf823c803024e1effc950 |
29 |
DIST waf-1.8.12 97567 SHA256 01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b SHA512 8e47112abb134f965f15a27a600b4453cad3075afb5dadc17f2f6dac33d80ec68b679ac0ebc5f8a0245cbd07ae9fc7b899e69afc1bd021cce74e7af2ab457939 WHIRLPOOL c36d37c2d8c08e4048b4800f511611af5cf534304fcb58388ca491ff308bfcbcdd959d153edfd6ff8c118404e7293d8b786e43b07486139bf915a82aa75d792b |
30 |
|
31 |
diff --git a/media-video/mpv/files/0.24.0/mpv-fix-build-without-gl.patch b/media-video/mpv/files/0.24.0/mpv-fix-build-without-gl.patch |
32 |
new file mode 100644 |
33 |
index 0000000000..ed17562053 |
34 |
--- /dev/null |
35 |
+++ b/media-video/mpv/files/0.24.0/mpv-fix-build-without-gl.patch |
36 |
@@ -0,0 +1,32 @@ |
37 |
+commit 212f6c8206bd4dcc7d8970c5f1632823ae4e783a |
38 |
+Author: Michael Forney <mforney@×××××××.org> |
39 |
+Date: Sun Feb 12 23:01:21 2017 -0800 |
40 |
+ |
41 |
+Fix build with HAVE_GL==0 |
42 |
+ |
43 |
+video/out/opengl/hwdec.h includes video/out/opengl/common.h, which tries |
44 |
+to include opengl headers. |
45 |
+ |
46 |
+diff --git a/options/options.c b/options/options.c |
47 |
+index b711156c1..0bb36ad3f 100644 |
48 |
+--- a/options/options.c |
49 |
++++ b/options/options.c |
50 |
+@@ -40,7 +40,6 @@ |
51 |
+ #include "stream/stream.h" |
52 |
+ #include "video/csputils.h" |
53 |
+ #include "video/hwdec.h" |
54 |
+-#include "video/out/opengl/hwdec.h" |
55 |
+ #include "video/image_writer.h" |
56 |
+ #include "sub/osd.h" |
57 |
+ #include "audio/filter/af.h" |
58 |
+@@ -53,6 +52,10 @@ |
59 |
+ #include "video/out/drm_common.h" |
60 |
+ #endif |
61 |
+ |
62 |
++#if HAVE_GL |
63 |
++#include "video/out/opengl/hwdec.h" |
64 |
++#endif |
65 |
++ |
66 |
+ extern const char mp_help_text[]; |
67 |
+ |
68 |
+ static void print_version(struct mp_log *log) |
69 |
|
70 |
diff --git a/media-video/mpv/mpv-0.24.0.ebuild b/media-video/mpv/mpv-0.24.0.ebuild |
71 |
new file mode 100644 |
72 |
index 0000000000..8b0e7a9b76 |
73 |
--- /dev/null |
74 |
+++ b/media-video/mpv/mpv-0.24.0.ebuild |
75 |
@@ -0,0 +1,379 @@ |
76 |
+# Copyright 1999-2017 Gentoo Foundation |
77 |
+# Distributed under the terms of the GNU General Public License v2 |
78 |
+# $Id$ |
79 |
+ |
80 |
+EAPI=6 |
81 |
+ |
82 |
+PYTHON_COMPAT=( python{2_7,3_4,3_5} ) |
83 |
+PYTHON_REQ_USE='threads(+)' |
84 |
+ |
85 |
+WAF_PV=1.8.12 |
86 |
+ |
87 |
+inherit gnome2-utils pax-utils python-r1 toolchain-funcs versionator waf-utils xdg-utils |
88 |
+ |
89 |
+DESCRIPTION="Media player based on MPlayer and mplayer2" |
90 |
+HOMEPAGE="https://mpv.io/" |
91 |
+ |
92 |
+if [[ ${PV} != *9999* ]]; then |
93 |
+ SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
94 |
+ KEYWORDS="~amd64 ~hppa ~x86 ~amd64-linux" |
95 |
+ DOCS=( RELEASE_NOTES ) |
96 |
+else |
97 |
+ EGIT_REPO_URI=( {https,git}://github.com/mpv-player/mpv.git ) |
98 |
+ inherit git-r3 |
99 |
+fi |
100 |
+SRC_URI+=" https://waf.io/waf-${WAF_PV}" |
101 |
+DOCS+=( README.md ) |
102 |
+ |
103 |
+# See Copyright in sources and Gentoo bug 506946. Waf is BSD, libmpv is ISC. |
104 |
+LICENSE="GPL-2+ BSD ISC" |
105 |
+SLOT="0" |
106 |
+IUSE="+alsa aqua archive bluray cdda +cli coreaudio cplugins cuda doc drm dvb |
107 |
+ dvd +egl encode gbm +iconv jack jpeg lcms +libass libav libcaca libmpv +lua |
108 |
+ luajit openal +opengl oss pulseaudio raspberry-pi rubberband samba sdl |
109 |
+ selinux test tools +uchardet v4l vaapi vdpau vf-dlopen wayland +X xinerama |
110 |
+ +xscreensaver +xv zsh-completion" |
111 |
+IUSE+=" cpu_flags_x86_sse4_1" |
112 |
+ |
113 |
+REQUIRED_USE=" |
114 |
+ || ( cli libmpv ) |
115 |
+ aqua? ( opengl ) |
116 |
+ cuda? ( !libav || ( opengl egl ) ) |
117 |
+ egl? ( || ( gbm X wayland ) ) |
118 |
+ gbm? ( drm egl ) |
119 |
+ lcms? ( || ( opengl egl ) ) |
120 |
+ luajit? ( lua ) |
121 |
+ opengl? ( || ( aqua X !cli? ( libmpv ) ) ) |
122 |
+ test? ( || ( opengl egl ) ) |
123 |
+ tools? ( cli ) |
124 |
+ uchardet? ( iconv ) |
125 |
+ v4l? ( || ( alsa oss ) ) |
126 |
+ vaapi? ( || ( gbm X wayland ) ) |
127 |
+ vdpau? ( X ) |
128 |
+ wayland? ( egl ) |
129 |
+ xinerama? ( X ) |
130 |
+ xscreensaver? ( X ) |
131 |
+ xv? ( X ) |
132 |
+ zsh-completion? ( cli ) |
133 |
+" |
134 |
+ |
135 |
+COMMON_DEPEND=" |
136 |
+ !libav? ( >=media-video/ffmpeg-3.2.2:0=[encode?,threads,vaapi?,vdpau?] ) |
137 |
+ libav? ( >=media-video/libav-12:0=[encode?,threads,vaapi?,vdpau?] ) |
138 |
+ sys-libs/zlib |
139 |
+ alsa? ( >=media-libs/alsa-lib-1.0.18 ) |
140 |
+ archive? ( >=app-arch/libarchive-3.0.0:= ) |
141 |
+ bluray? ( >=media-libs/libbluray-0.3.0 ) |
142 |
+ cdda? ( dev-libs/libcdio-paranoia ) |
143 |
+ cuda? ( >=media-video/ffmpeg-3.3:0 ) |
144 |
+ drm? ( x11-libs/libdrm ) |
145 |
+ dvd? ( |
146 |
+ >=media-libs/libdvdnav-4.2.0 |
147 |
+ >=media-libs/libdvdread-4.1.0 |
148 |
+ ) |
149 |
+ egl? ( media-libs/mesa[egl,gbm(-)?,wayland(-)?] ) |
150 |
+ iconv? ( |
151 |
+ virtual/libiconv |
152 |
+ uchardet? ( app-i18n/uchardet ) |
153 |
+ ) |
154 |
+ jack? ( virtual/jack ) |
155 |
+ jpeg? ( virtual/jpeg:0 ) |
156 |
+ lcms? ( >=media-libs/lcms-2.6:2 ) |
157 |
+ libass? ( |
158 |
+ >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz] |
159 |
+ virtual/ttf-fonts |
160 |
+ ) |
161 |
+ libcaca? ( >=media-libs/libcaca-0.99_beta18 ) |
162 |
+ lua? ( |
163 |
+ !luajit? ( <dev-lang/lua-5.3:= ) |
164 |
+ luajit? ( dev-lang/luajit:2 ) |
165 |
+ ) |
166 |
+ openal? ( >=media-libs/openal-1.13 ) |
167 |
+ opengl? ( X? ( virtual/opengl ) ) |
168 |
+ pulseaudio? ( media-sound/pulseaudio ) |
169 |
+ raspberry-pi? ( |
170 |
+ >=media-libs/raspberrypi-userland-0_pre20160305-r1 |
171 |
+ virtual/opengl |
172 |
+ ) |
173 |
+ rubberband? ( >=media-libs/rubberband-1.8.0 ) |
174 |
+ samba? ( net-fs/samba[smbclient(+)] ) |
175 |
+ sdl? ( media-libs/libsdl2[sound,threads,video,X?,wayland?] ) |
176 |
+ v4l? ( media-libs/libv4l ) |
177 |
+ vaapi? ( >=x11-libs/libva-1.4.0[drm?,X?,wayland?] ) |
178 |
+ vdpau? ( >=x11-libs/libvdpau-0.2 ) |
179 |
+ wayland? ( |
180 |
+ >=dev-libs/wayland-1.6.0 |
181 |
+ >=x11-libs/libxkbcommon-0.3.0 |
182 |
+ ) |
183 |
+ X? ( |
184 |
+ x11-libs/libX11 |
185 |
+ x11-libs/libXext |
186 |
+ >=x11-libs/libXrandr-1.2.0 |
187 |
+ opengl? ( x11-libs/libXdamage ) |
188 |
+ xinerama? ( x11-libs/libXinerama ) |
189 |
+ xscreensaver? ( x11-libs/libXScrnSaver ) |
190 |
+ xv? ( x11-libs/libXv ) |
191 |
+ ) |
192 |
+" |
193 |
+DEPEND="${COMMON_DEPEND} |
194 |
+ ${PYTHON_DEPS} |
195 |
+ dev-python/docutils |
196 |
+ virtual/pkgconfig |
197 |
+ doc? ( dev-python/rst2pdf ) |
198 |
+ dvb? ( virtual/linuxtv-dvb-headers ) |
199 |
+ test? ( >=dev-util/cmocka-1.0.0 ) |
200 |
+ v4l? ( virtual/os-headers ) |
201 |
+ zsh-completion? ( dev-lang/perl ) |
202 |
+" |
203 |
+RDEPEND="${COMMON_DEPEND} |
204 |
+ cuda? ( x11-drivers/nvidia-drivers[X] ) |
205 |
+ selinux? ( sec-policy/selinux-mplayer ) |
206 |
+ tools? ( ${PYTHON_DEPS} ) |
207 |
+" |
208 |
+ |
209 |
+PATCHES=( |
210 |
+ "${FILESDIR}/${PN}-0.19.0-make-ffmpeg-version-check-non-fatal.patch" |
211 |
+ "${FILESDIR}/${PN}-0.23.0-make-libavdevice-check-accept-libav.patch" |
212 |
+ "${FILESDIR}/${PV}/${PN}-fix-build-without-gl.patch" |
213 |
+) |
214 |
+ |
215 |
+mpv_check_compiler() { |
216 |
+ if [[ ${MERGE_TYPE} != "binary" ]]; then |
217 |
+ if tc-is-gcc && ( [[ $(gcc-major-version) -lt 4 ]] || \ |
218 |
+ ( [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -lt 5 ]] ) ); then |
219 |
+ die "${PN} requires GCC>=4.5." |
220 |
+ fi |
221 |
+ if ( use opengl || use egl ) && ! tc-has-tls; then |
222 |
+ die "Your compiler lacks C++11 TLS support. Use GCC>=4.8 or Clang>=3.3." |
223 |
+ fi |
224 |
+ if use vaapi && use cpu_flags_x86_sse4_1 && ! tc-is-gcc; then |
225 |
+ die "${PN} requires GCC for SSE4.1 intrinsics." |
226 |
+ fi |
227 |
+ fi |
228 |
+} |
229 |
+ |
230 |
+pkg_pretend() { |
231 |
+ mpv_check_compiler |
232 |
+} |
233 |
+ |
234 |
+pkg_setup() { |
235 |
+ mpv_check_compiler |
236 |
+ [[ ${MERGE_TYPE} != "binary" ]] && python_setup |
237 |
+} |
238 |
+ |
239 |
+src_prepare() { |
240 |
+ cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die |
241 |
+ chmod +x "${S}"/waf || die |
242 |
+ default_src_prepare |
243 |
+} |
244 |
+ |
245 |
+src_configure() { |
246 |
+ tc-export CC PKG_CONFIG AR |
247 |
+ |
248 |
+ if tc-is-cross-compiler && use raspberry-pi; then |
249 |
+ export EXTRA_PKG_CONFIG_LIBDIR="${SYSROOT%/}${EPREFIX}/opt/vc/lib/pkgconfig" |
250 |
+ # Drop next line when Gentoo bug 607344 is fixed or if you fixed it locally. |
251 |
+ die "${PN} can't be cross built with raspberry-pi USE enabled. See Gentoo bug 607344." |
252 |
+ fi |
253 |
+ |
254 |
+ local mywafargs=( |
255 |
+ --confdir="${EPREFIX}/etc/${PN}" |
256 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" |
257 |
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" |
258 |
+ |
259 |
+ $(usex cli '' '--disable-cplayer') |
260 |
+ $(use_enable libmpv libmpv-shared) |
261 |
+ |
262 |
+ # See deep down below for build-date. |
263 |
+ --disable-libmpv-static |
264 |
+ --disable-static-build |
265 |
+ --disable-optimize # Don't add '-O2' to CFLAGS. |
266 |
+ --disable-debug-build # Don't add '-g' to CFLAGS. |
267 |
+ --enable-html-build |
268 |
+ |
269 |
+ $(use_enable doc pdf-build) |
270 |
+ $(use_enable cplugins) |
271 |
+ $(use_enable vf-dlopen vf-dlopen-filters) |
272 |
+ $(use_enable zsh-completion zsh-comp) |
273 |
+ $(use_enable test) |
274 |
+ |
275 |
+ $(use_enable iconv) |
276 |
+ $(use_enable samba libsmbclient) |
277 |
+ $(use_enable lua) |
278 |
+ $(usex luajit '--lua=luajit' '') |
279 |
+ $(use_enable libass) |
280 |
+ $(use_enable libass libass-osd) |
281 |
+ $(use_enable encode encoding) |
282 |
+ $(use_enable bluray libbluray) |
283 |
+ $(use_enable dvd dvdread) |
284 |
+ $(use_enable dvd dvdnav) |
285 |
+ $(use_enable cdda) |
286 |
+ $(use_enable uchardet) |
287 |
+ $(use_enable rubberband) |
288 |
+ $(use_enable lcms lcms2) |
289 |
+ --disable-vapoursynth # Only available in overlays. |
290 |
+ --disable-vapoursynth-lazy |
291 |
+ $(use_enable archive libarchive) |
292 |
+ |
293 |
+ --enable-libavdevice |
294 |
+ |
295 |
+ # Audio outputs: |
296 |
+ $(use_enable sdl sdl2) # Listed under audio, but also includes video. |
297 |
+ --disable-sdl1 |
298 |
+ $(use_enable oss oss-audio) |
299 |
+ --disable-rsound # Only available in overlays. |
300 |
+ --disable-sndio # Only available in overlays. |
301 |
+ $(use_enable pulseaudio pulse) |
302 |
+ $(use_enable jack) |
303 |
+ $(use_enable openal) |
304 |
+ --disable-opensles |
305 |
+ $(use_enable alsa) |
306 |
+ $(use_enable coreaudio) |
307 |
+ |
308 |
+ # Video outputs: |
309 |
+ $(use_enable aqua cocoa) |
310 |
+ $(use_enable drm) |
311 |
+ $(use_enable gbm) |
312 |
+ $(use_enable wayland) |
313 |
+ $(use_enable X x11) |
314 |
+ $(use_enable xscreensaver xss) |
315 |
+ $(use_enable X xext) |
316 |
+ $(use_enable xv) |
317 |
+ $(use_enable xinerama) |
318 |
+ $(use_enable X xrandr) |
319 |
+ $(usex opengl "$(use_enable aqua gl-cocoa)" '--disable-gl-cocoa') |
320 |
+ $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11') |
321 |
+ $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11') |
322 |
+ $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm') |
323 |
+ $(use_enable wayland gl-wayland) |
324 |
+ $(use_enable vdpau) |
325 |
+ $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11') |
326 |
+ $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl. |
327 |
+ $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11') |
328 |
+ $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland') |
329 |
+ $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm') |
330 |
+ $(use_enable libcaca caca) |
331 |
+ $(use_enable jpeg) |
332 |
+ --disable-android |
333 |
+ $(use_enable raspberry-pi rpi) |
334 |
+ $(usex opengl "$(use_enable !aqua standard-gl)" '--disable-standard-gl') |
335 |
+ --disable-ios-gl |
336 |
+ $(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl') |
337 |
+ --disable-mali-fbdev # Only available in overlays. |
338 |
+ |
339 |
+ # HWaccels: |
340 |
+ # Automagic Video Toolbox HW acceleration. See Gentoo bug 577332. |
341 |
+ $(use_enable vaapi vaapi-hwaccel) |
342 |
+ $(use_enable vdpau vdpau-hwaccel) |
343 |
+ $(use_enable cuda cuda-hwaccel) |
344 |
+ |
345 |
+ # TV features: |
346 |
+ $(use_enable v4l tv) |
347 |
+ $(use_enable v4l tv-v4l2) |
348 |
+ $(use_enable v4l libv4l2) |
349 |
+ $(use_enable v4l audio-input) |
350 |
+ $(use_enable dvb dvbin) |
351 |
+ |
352 |
+ # Miscellaneous features: |
353 |
+ --disable-apple-remote # Needs testing first. See Gentoo bug 577332. |
354 |
+ ) |
355 |
+ |
356 |
+ if use vaapi && use X; then |
357 |
+ mywafargs+=( |
358 |
+ $(use_enable opengl vaapi-glx) |
359 |
+ $(use_enable egl vaapi-x-egl) |
360 |
+ ) |
361 |
+ fi |
362 |
+ |
363 |
+ if ! use egl && ! use opengl && ! use raspberry-pi; then |
364 |
+ mywafargs+=(--disable-gl) |
365 |
+ fi |
366 |
+ |
367 |
+ # Create reproducible non-live builds. |
368 |
+ [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date) |
369 |
+ |
370 |
+ waf-utils_src_configure "${mywafargs[@]}" |
371 |
+} |
372 |
+ |
373 |
+src_install() { |
374 |
+ waf-utils_src_install |
375 |
+ |
376 |
+ if use lua; then |
377 |
+ insinto /usr/share/${PN} |
378 |
+ doins -r TOOLS/lua |
379 |
+ fi |
380 |
+ |
381 |
+ if use cli && use luajit; then |
382 |
+ pax-mark -m "${ED}"usr/bin/${PN} |
383 |
+ fi |
384 |
+ |
385 |
+ if use tools; then |
386 |
+ dobin TOOLS/{mpv_identify.sh,umpv} |
387 |
+ newbin TOOLS/idet.sh mpv_idet.sh |
388 |
+ python_replicate_script "${ED}"usr/bin/umpv |
389 |
+ fi |
390 |
+} |
391 |
+ |
392 |
+pkg_preinst() { |
393 |
+ gnome2_icon_savelist |
394 |
+} |
395 |
+ |
396 |
+pkg_postinst() { |
397 |
+ local rv softvol_0_18_1=0 osc_0_21_0=0 |
398 |
+ |
399 |
+ for rv in ${REPLACING_VERSIONS}; do |
400 |
+ version_compare ${rv} 0.18.1 |
401 |
+ [[ $? -eq 1 ]] && softvol_0_18_1=1 |
402 |
+ version_compare ${rv} 0.21.0 |
403 |
+ [[ $? -eq 1 ]] && osc_0_21_0=1 |
404 |
+ done |
405 |
+ |
406 |
+ if [[ ${softvol_0_18_1} -eq 1 ]]; then |
407 |
+ elog "Since version 0.18.1 the software volume control is always enabled." |
408 |
+ elog "This means that volume controls don't change the system volume," |
409 |
+ elog "e.g. per-application volume with PulseAudio." |
410 |
+ elog "If you want to restore the previous behaviour, please refer to" |
411 |
+ elog |
412 |
+ elog "https://wiki.gentoo.org/wiki/Mpv#Volume_in_0.18.1" |
413 |
+ elog |
414 |
+ fi |
415 |
+ |
416 |
+ if [[ ${osc_0_21_0} -eq 1 ]]; then |
417 |
+ elog "In version 0.21.0 the default OSC layout was changed." |
418 |
+ elog "If you want to restore the previous layout, please refer to" |
419 |
+ elog |
420 |
+ elog "https://wiki.gentoo.org/wiki/Mpv#OSC_in_0.21.0" |
421 |
+ elog |
422 |
+ fi |
423 |
+ |
424 |
+ # bash-completion < 2.3-r1 already installs (mostly broken) mpv completion. |
425 |
+ if use cli && ! has_version '<app-shells/bash-completion-2.3-r1' && \ |
426 |
+ ! has_version 'app-shells/mpv-bash-completion'; then |
427 |
+ elog "If you want to have command-line completion via bash-completion," |
428 |
+ elog "please install app-shells/mpv-bash-completion." |
429 |
+ fi |
430 |
+ |
431 |
+ if use cli && [[ -n ${REPLACING_VERSIONS} ]] && \ |
432 |
+ has_version 'app-shells/mpv-bash-completion'; then |
433 |
+ elog "If command-line completion doesn't work after mpv update," |
434 |
+ elog "please rebuild app-shells/mpv-bash-completion." |
435 |
+ fi |
436 |
+ |
437 |
+ gnome2_icon_cache_update |
438 |
+ xdg_desktop_database_update |
439 |
+} |
440 |
+ |
441 |
+pkg_postrm() { |
442 |
+ gnome2_icon_cache_update |
443 |
+ xdg_desktop_database_update |
444 |
+} |
445 |
+ |
446 |
+src_test() { |
447 |
+ cd "${S}"/build/test || die |
448 |
+ local test |
449 |
+ for test in *; do |
450 |
+ if [[ -x ${test} ]]; then |
451 |
+ ./"${test}" || die "Test suite failed" |
452 |
+ fi |
453 |
+ done |
454 |
+} |