1 |
commit: b0ec4ce8cebbb5373b02c7ef2d45953596767667 |
2 |
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Feb 29 14:29:43 2016 +0000 |
4 |
Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 29 19:28:40 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0ec4ce8 |
7 |
|
8 |
media-video/mpv: verbump to 0.16.0 |
9 |
|
10 |
Gentoo-Bug: 575976 |
11 |
|
12 |
Package-Manager: portage-2.2.27 |
13 |
|
14 |
media-video/mpv/Manifest | 1 + |
15 |
.../mpv-0.16.0-fix-srt-subtitles-on-libav.patch | 29 ++ |
16 |
media-video/mpv/mpv-0.16.0.ebuild | 302 +++++++++++++++++++++ |
17 |
3 files changed, 332 insertions(+) |
18 |
|
19 |
diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest |
20 |
index 58e4f66..a60de5b 100644 |
21 |
--- a/media-video/mpv/Manifest |
22 |
+++ b/media-video/mpv/Manifest |
23 |
@@ -1,5 +1,6 @@ |
24 |
DIST mpv-0.14.0.tar.gz 2872619 SHA256 042937f483603f0c3d1dec11e8f0045e8c27f19eee46ea64d81a3cdf01e51233 SHA512 523bffe87d6743ac67cab090bb5f43363352491f663debf150e204b942daaaa85176f228011e306d58fa4a05ee962d4bc56b6f77ea943e3efe757417ad52b952 WHIRLPOOL b27f8acb21870c4d98e2a39ce78cf0e8923bdac5056adafedd242b687c0532cc51e338b9d5c2046155972adb99fd8f12f7d9ec2e78bdf4ed8ae1a295faedc0e9 |
25 |
DIST mpv-0.15.0.tar.gz 2849513 SHA256 7d31217ba8572f364fcea2955733f821374ae6d8c6d8f22f8bc63c44c0400bdc SHA512 6f12487ff9bedd6872993189e3359c04ab0de559fd42bfcc5accdbfbd02e0d863cf3d7cfa5cceaedd174a4c16c831914945cf9cf6c918732f72fa44467127332 WHIRLPOOL 92b5a8ff864089bdddffa5941b8afca1433e5732ebe1ba71e326fbeb93475471e25038e73f807b3be01381a2b11ba2bc586cdccdc40bd99509a6fe234d780d9d |
26 |
+DIST mpv-0.16.0.tar.gz 2877026 SHA256 fc3619de0ede16fbb023ac72589090e8e77fd9d9e03a81adc728105d50ef38ba SHA512 d328dba2cc68bd3ae2e14bfcf2b4f69f076691bb40db77036e716f783d7683fde668b652829106661dfeea46d66b4a7ad61b58610411b69bd5265adea4f20bd6 WHIRLPOOL 09af632453788c9251a595f7ea18a15876c2bab2e393d32e8cc9eebf7e2ecc459873022234a98f97840223c7cb613e05039dbc987f13839d3210f284300ce312 |
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/files/mpv-0.16.0-fix-srt-subtitles-on-libav.patch b/media-video/mpv/files/mpv-0.16.0-fix-srt-subtitles-on-libav.patch |
32 |
new file mode 100644 |
33 |
index 0000000..4344e78 |
34 |
--- /dev/null |
35 |
+++ b/media-video/mpv/files/mpv-0.16.0-fix-srt-subtitles-on-libav.patch |
36 |
@@ -0,0 +1,29 @@ |
37 |
+commit 041c9f1782cbed4abf7793f4e72b8b29b2fd9b1b |
38 |
+Author: wm4 <wm4@nowhere> |
39 |
+Date: Mon Feb 29 18:20:27 2016 +0100 |
40 |
+ |
41 |
+ lavc_conv: fix Libav srt subtitles |
42 |
+ |
43 |
+ Use the mp_lavc_set_extradata() function instead of setting up the |
44 |
+ extradata manually. This takes care of the corner case when |
45 |
+ extradata_len is 0. |
46 |
+ |
47 |
+ This apparently fixes #2888. |
48 |
+ |
49 |
+diff --git a/sub/lavc_conv.c b/sub/lavc_conv.c |
50 |
+index 3dd6097..7303020 100644 |
51 |
+--- a/sub/lavc_conv.c |
52 |
++++ b/sub/lavc_conv.c |
53 |
+@@ -79,11 +79,8 @@ struct lavc_conv *lavc_conv_create(struct mp_log *log, const char *codec_name, |
54 |
+ avctx = avcodec_alloc_context3(codec); |
55 |
+ if (!avctx) |
56 |
+ goto error; |
57 |
+- avctx->extradata_size = extradata_len; |
58 |
+- avctx->extradata = av_malloc(extradata_len); |
59 |
+- if (!avctx->extradata) |
60 |
++ if (mp_lavc_set_extradata(avctx, extradata, extradata_len) < 0) |
61 |
+ goto error; |
62 |
+- memcpy(avctx->extradata, extradata, extradata_len); |
63 |
+ if (strcmp(codec_name, "eia_608") == 0) |
64 |
+ av_dict_set(&opts, "real_time", "1", 0); |
65 |
+ if (avcodec_open2(avctx, codec, &opts) < 0) |
66 |
|
67 |
diff --git a/media-video/mpv/mpv-0.16.0.ebuild b/media-video/mpv/mpv-0.16.0.ebuild |
68 |
new file mode 100644 |
69 |
index 0000000..1d18f73 |
70 |
--- /dev/null |
71 |
+++ b/media-video/mpv/mpv-0.16.0.ebuild |
72 |
@@ -0,0 +1,302 @@ |
73 |
+# Copyright 1999-2016 Gentoo Foundation |
74 |
+# Distributed under the terms of the GNU General Public License v2 |
75 |
+# $Id$ |
76 |
+ |
77 |
+EAPI=5 |
78 |
+ |
79 |
+PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} ) |
80 |
+PYTHON_REQ_USE='threads(+)' |
81 |
+ |
82 |
+WAF_PV='1.8.12' |
83 |
+ |
84 |
+inherit eutils fdo-mime gnome2-utils pax-utils python-any-r1 toolchain-funcs waf-utils |
85 |
+ |
86 |
+DESCRIPTION="Media player based on MPlayer and mplayer2" |
87 |
+HOMEPAGE="https://mpv.io/" |
88 |
+ |
89 |
+if [[ ${PV} != *9999* ]]; then |
90 |
+ SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
91 |
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux" |
92 |
+ DOCS=( RELEASE_NOTES ) |
93 |
+else |
94 |
+ EGIT_REPO_URI="https://github.com/mpv-player/mpv.git" |
95 |
+ inherit git-r3 |
96 |
+fi |
97 |
+SRC_URI+=" https://waf.io/waf-${WAF_PV}" |
98 |
+DOCS+=( README.md ) |
99 |
+ |
100 |
+# See Copyright in source tarball and bug #506946. Waf is BSD, libmpv is ISC. |
101 |
+LICENSE="GPL-2+ BSD ISC" |
102 |
+SLOT="0" |
103 |
+IUSE="+alsa archive bluray cdda +cli doc drm dvb +dvd +egl +enca encode gbm |
104 |
+ +iconv jack jpeg lcms +libass libav libcaca libguess libmpv lua luajit |
105 |
+ openal +opengl oss pulseaudio raspberry-pi rubberband samba sdl selinux |
106 |
+ test uchardet v4l vaapi vdpau vf-dlopen wayland +X xinerama +xscreensaver |
107 |
+ +xv zsh-completion" |
108 |
+ |
109 |
+REQUIRED_USE=" |
110 |
+ || ( cli libmpv ) |
111 |
+ egl? ( || ( gbm X wayland ) ) |
112 |
+ enca? ( iconv ) |
113 |
+ gbm? ( drm egl ) |
114 |
+ lcms? ( || ( opengl egl ) ) |
115 |
+ libguess? ( iconv ) |
116 |
+ luajit? ( lua ) |
117 |
+ uchardet? ( iconv ) |
118 |
+ v4l? ( || ( alsa oss ) ) |
119 |
+ vaapi? ( || ( gbm X wayland ) ) |
120 |
+ vdpau? ( X ) |
121 |
+ wayland? ( egl ) |
122 |
+ xinerama? ( X ) |
123 |
+ xscreensaver? ( X ) |
124 |
+ xv? ( X ) |
125 |
+ zsh-completion? ( cli ) |
126 |
+" |
127 |
+ |
128 |
+COMMON_DEPEND=" |
129 |
+ !libav? ( >=media-video/ffmpeg-2.4:0=[encode?,threads,vaapi?,vdpau?] ) |
130 |
+ libav? ( >=media-video/libav-11:0=[encode?,threads,vaapi?,vdpau?] ) |
131 |
+ sys-libs/zlib |
132 |
+ alsa? ( >=media-libs/alsa-lib-1.0.18 ) |
133 |
+ archive? ( >=app-arch/libarchive-3.0.0:= ) |
134 |
+ bluray? ( >=media-libs/libbluray-0.3.0 ) |
135 |
+ cdda? ( dev-libs/libcdio-paranoia ) |
136 |
+ drm? ( x11-libs/libdrm ) |
137 |
+ dvb? ( virtual/linuxtv-dvb-headers ) |
138 |
+ dvd? ( |
139 |
+ >=media-libs/libdvdnav-4.2.0 |
140 |
+ >=media-libs/libdvdread-4.1.0 |
141 |
+ ) |
142 |
+ egl? ( media-libs/mesa[egl,gbm(-)?,wayland(-)?] ) |
143 |
+ iconv? ( |
144 |
+ virtual/libiconv |
145 |
+ enca? ( app-i18n/enca ) |
146 |
+ libguess? ( >=app-i18n/libguess-1.0 ) |
147 |
+ uchardet? ( dev-libs/uchardet ) |
148 |
+ ) |
149 |
+ jack? ( virtual/jack ) |
150 |
+ jpeg? ( virtual/jpeg:0 ) |
151 |
+ lcms? ( >=media-libs/lcms-2.6:2 ) |
152 |
+ libass? ( |
153 |
+ >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz] |
154 |
+ virtual/ttf-fonts |
155 |
+ ) |
156 |
+ libcaca? ( >=media-libs/libcaca-0.99_beta18 ) |
157 |
+ lua? ( |
158 |
+ !luajit? ( || ( =dev-lang/lua-5.1*:= =dev-lang/lua-5.2*:= ) ) |
159 |
+ luajit? ( dev-lang/luajit:2 ) |
160 |
+ ) |
161 |
+ openal? ( >=media-libs/openal-1.13 ) |
162 |
+ opengl? ( virtual/opengl ) |
163 |
+ pulseaudio? ( media-sound/pulseaudio ) |
164 |
+ rubberband? ( >=media-libs/rubberband-1.8.0 ) |
165 |
+ samba? ( net-fs/samba ) |
166 |
+ sdl? ( media-libs/libsdl2[sound,threads,video,X?,wayland?] ) |
167 |
+ v4l? ( media-libs/libv4l ) |
168 |
+ vaapi? ( >=x11-libs/libva-1.4.0[drm?,X?,wayland?] ) |
169 |
+ wayland? ( |
170 |
+ >=dev-libs/wayland-1.6.0 |
171 |
+ >=x11-libs/libxkbcommon-0.3.0 |
172 |
+ ) |
173 |
+ X? ( |
174 |
+ x11-libs/libX11 |
175 |
+ x11-libs/libXext |
176 |
+ >=x11-libs/libXrandr-1.2.0 |
177 |
+ opengl? ( x11-libs/libXdamage ) |
178 |
+ vdpau? ( >=x11-libs/libvdpau-0.2 ) |
179 |
+ xinerama? ( x11-libs/libXinerama ) |
180 |
+ xscreensaver? ( x11-libs/libXScrnSaver ) |
181 |
+ xv? ( x11-libs/libXv ) |
182 |
+ ) |
183 |
+" |
184 |
+DEPEND="${COMMON_DEPEND} |
185 |
+ ${PYTHON_DEPS} |
186 |
+ >=dev-lang/perl-5.8 |
187 |
+ dev-python/docutils |
188 |
+ virtual/pkgconfig |
189 |
+ doc? ( dev-python/rst2pdf ) |
190 |
+ test? ( >=dev-util/cmocka-1.0.0 ) |
191 |
+" |
192 |
+RDEPEND="${COMMON_DEPEND} |
193 |
+ selinux? ( sec-policy/selinux-mplayer ) |
194 |
+" |
195 |
+ |
196 |
+pkg_pretend() { |
197 |
+ if [[ ${MERGE_TYPE} != "binary" ]] && ! tc-has-tls && use vaapi && use egl; then |
198 |
+ die "Your compiler lacks C++11 TLS support. Use GCC>=4.8.0 or Clang>=3.3." |
199 |
+ fi |
200 |
+ |
201 |
+ if ! use libass; then |
202 |
+ ewarn "You have disabled the libass support." |
203 |
+ ewarn "OSD and subtitles won't be available." |
204 |
+ fi |
205 |
+ |
206 |
+ if use openal; then |
207 |
+ ewarn "You have enabled the openal audio output. Be warned that" |
208 |
+ ewarn "this output is considered experimental by upstream." |
209 |
+ fi |
210 |
+ |
211 |
+ if use sdl; then |
212 |
+ ewarn "You have enabled the sdl video and audio outputs. Note that" |
213 |
+ ewarn "upstream provides these outputs for compatibility reasons only." |
214 |
+ ewarn "You probably don't need them under the normal circumstances." |
215 |
+ fi |
216 |
+ |
217 |
+ if use libav; then |
218 |
+ elog "You have enabled media-video/libav instead of media-video/ffmpeg." |
219 |
+ elog "Upstream recommends media-video/ffmpeg, as some functionality" |
220 |
+ elog "is not provided by media-video/libav." |
221 |
+ fi |
222 |
+ |
223 |
+ einfo "mpv optionally supports many different audio and video formats." |
224 |
+ einfo "You will need to enable support for the desired formats in your" |
225 |
+ einfo "libavcodec/libavformat provider:" |
226 |
+ einfo " media-video/ffmpeg or media-video/libav" |
227 |
+} |
228 |
+ |
229 |
+src_prepare() { |
230 |
+ cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die |
231 |
+ chmod +x "${S}"/waf || die |
232 |
+ |
233 |
+ epatch "${FILESDIR}/${P}-fix-srt-subtitles-on-libav.patch" |
234 |
+ epatch_user |
235 |
+} |
236 |
+ |
237 |
+src_configure() { |
238 |
+ local mywafargs=( |
239 |
+ --confdir="${EPREFIX}"/etc/${PN} |
240 |
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} |
241 |
+ |
242 |
+ --disable-gpl3 # Unclear license info. See Gentoo bug 571728. |
243 |
+ |
244 |
+ $(usex cli '' '--disable-cplayer') |
245 |
+ $(use_enable libmpv libmpv-shared) |
246 |
+ |
247 |
+ # See deep down below for build-date |
248 |
+ --disable-libmpv-static |
249 |
+ --disable-static-build |
250 |
+ --disable-optimize # Do not add '-O2' to CFLAGS |
251 |
+ --disable-debug-build # Do not add '-g' to CFLAGS |
252 |
+ |
253 |
+ $(use_enable doc html-build) |
254 |
+ $(use_enable doc pdf-build) |
255 |
+ $(use_enable vf-dlopen vf-dlopen-filters) |
256 |
+ $(use_enable zsh-completion zsh-comp) |
257 |
+ $(use_enable test) |
258 |
+ |
259 |
+ $(use_enable iconv) |
260 |
+ $(use_enable samba libsmbclient) |
261 |
+ $(use_enable lua) |
262 |
+ $(usex luajit '--lua=luajit' '') |
263 |
+ $(use_enable libass) |
264 |
+ $(use_enable libass libass-osd) |
265 |
+ $(use_enable encode encoding) |
266 |
+ $(use_enable bluray libbluray) |
267 |
+ $(use_enable dvd dvdread) |
268 |
+ $(use_enable dvd dvdnav) |
269 |
+ $(use_enable cdda) |
270 |
+ $(use_enable enca) |
271 |
+ $(use_enable libguess) |
272 |
+ $(use_enable uchardet) |
273 |
+ $(use_enable rubberband) |
274 |
+ $(use_enable lcms lcms2) |
275 |
+ --disable-vapoursynth # Only available in overlays |
276 |
+ --disable-vapoursynth-lazy |
277 |
+ $(use_enable archive libarchive) |
278 |
+ |
279 |
+ --enable-libavdevice |
280 |
+ |
281 |
+ # Audio outputs |
282 |
+ $(use_enable sdl sdl2) # Listed under audio, but also includes video |
283 |
+ --disable-sdl1 |
284 |
+ $(use_enable oss oss-audio) |
285 |
+ --disable-rsound # Only available in overlays |
286 |
+ $(use_enable pulseaudio pulse) |
287 |
+ $(use_enable jack) |
288 |
+ $(use_enable openal) |
289 |
+ --disable-opensles |
290 |
+ $(use_enable alsa) |
291 |
+ --disable-coreaudio |
292 |
+ |
293 |
+ # Video outputs |
294 |
+ --disable-cocoa |
295 |
+ $(use_enable drm) |
296 |
+ $(use_enable gbm) |
297 |
+ $(use_enable wayland) |
298 |
+ $(use_enable X x11) |
299 |
+ $(use_enable xscreensaver xss) |
300 |
+ $(use_enable X xext) |
301 |
+ $(use_enable xv) |
302 |
+ $(use_enable xinerama) |
303 |
+ $(use_enable X xrandr) |
304 |
+ $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11') |
305 |
+ $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11') |
306 |
+ $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm') |
307 |
+ $(use_enable wayland gl-wayland) |
308 |
+ $(use_enable vdpau) |
309 |
+ $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11') |
310 |
+ $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl |
311 |
+ $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11') |
312 |
+ $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland') |
313 |
+ $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm') |
314 |
+ $(use_enable libcaca caca) |
315 |
+ $(use_enable jpeg) |
316 |
+ --disable-android |
317 |
+ $(use_enable raspberry-pi rpi) |
318 |
+ $(use_enable opengl desktop-gl) |
319 |
+ |
320 |
+ # HWaccels |
321 |
+ $(use_enable vaapi vaapi-hwaccel) |
322 |
+ # Automagic VDPAU HW acceleration. See Gentoo bug 558870. |
323 |
+ |
324 |
+ # TV features |
325 |
+ $(use_enable v4l tv) |
326 |
+ $(use_enable v4l tv-v4l2) |
327 |
+ $(use_enable v4l libv4l2) |
328 |
+ $(use_enable v4l audio-input) |
329 |
+ $(use_enable dvb dvbin) |
330 |
+ ) |
331 |
+ |
332 |
+ if use vaapi && use X; then |
333 |
+ mywafargs+=( |
334 |
+ $(use_enable opengl vaapi-glx) |
335 |
+ $(use_enable egl vaapi-x-egl) |
336 |
+ ) |
337 |
+ fi |
338 |
+ |
339 |
+ # Create reproducible non-live builds |
340 |
+ [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date) |
341 |
+ |
342 |
+ waf-utils_src_configure "${mywafargs[@]}" |
343 |
+} |
344 |
+ |
345 |
+src_install() { |
346 |
+ waf-utils_src_install |
347 |
+ |
348 |
+ if use cli && use luajit; then |
349 |
+ pax-mark -m "${ED}usr/bin/${PN}" |
350 |
+ fi |
351 |
+} |
352 |
+ |
353 |
+pkg_preinst() { |
354 |
+ gnome2_icon_savelist |
355 |
+} |
356 |
+ |
357 |
+pkg_postinst() { |
358 |
+ fdo-mime_desktop_database_update |
359 |
+ gnome2_icon_cache_update |
360 |
+} |
361 |
+ |
362 |
+pkg_postrm() { |
363 |
+ fdo-mime_desktop_database_update |
364 |
+ gnome2_icon_cache_update |
365 |
+} |
366 |
+ |
367 |
+src_test() { |
368 |
+ cd "${S}"/build/test || die |
369 |
+ for test in *; do |
370 |
+ if [[ -x ${test} ]]; then |
371 |
+ ./"${test}" || die "Test suite failed" |
372 |
+ fi |
373 |
+ done |
374 |
+} |