Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-video/mplayer2: mplayer2-2.0_p20131009-r1.ebuild mplayer2-9999.ebuild ChangeLog
Date: Sun, 01 Feb 2015 23:21:55
Message-Id: 20150201232149.5B1D210DAD@oystercatcher.gentoo.org
1 mgorny 15/02/01 23:21:49
2
3 Modified: mplayer2-9999.ebuild ChangeLog
4 Added: mplayer2-2.0_p20131009-r1.ebuild
5 Log:
6 Introduce USE=libav to control the preferred implementation. Fixes subslot & implementation switch rebuilds as well.
7
8 (Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
9
10 Revision Changes Path
11 1.71 media-video/mplayer2/mplayer2-9999.ebuild
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/mplayer2-9999.ebuild?rev=1.71&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/mplayer2-9999.ebuild?rev=1.71&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/mplayer2-9999.ebuild?r1=1.70&r2=1.71
16
17 Index: mplayer2-9999.ebuild
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer2/mplayer2-9999.ebuild,v
20 retrieving revision 1.70
21 retrieving revision 1.71
22 diff -u -r1.70 -r1.71
23 --- mplayer2-9999.ebuild 30 Jan 2015 17:27:26 -0000 1.70
24 +++ mplayer2-9999.ebuild 1 Feb 2015 23:21:49 -0000 1.71
25 @@ -1,6 +1,6 @@
26 # Copyright 1999-2015 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/mplayer2-9999.ebuild,v 1.70 2015/01/30 17:27:26 mgorny Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/mplayer2-9999.ebuild,v 1.71 2015/02/01 23:21:49 mgorny Exp $
30
31 EAPI=5
32
33 @@ -23,7 +23,7 @@
34 [[ ${PV} == *9999* ]] || \
35 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux"
36 IUSE="+alsa aqua bluray bs2b cddb +cdio cpudetection debug directfb doc dvb +dvd
37 -+dvdnav +enca ftp gif +iconv ipv6 jack joystick jpeg ladspa lcms +libass libcaca
38 ++dvdnav +enca ftp gif +iconv ipv6 jack joystick jpeg ladspa lcms +libass libav libcaca
39 lirc md5sum mng +mp3 +network +opengl oss png pnm portaudio +postproc pulseaudio
40 pvr +quvi radio samba selinux +shm tga +threads +unicode v4l vcd vdpau +X xinerama
41 +xscreensaver +xv yuv4mpeg"
42 @@ -97,17 +97,15 @@
43 pnm? ( media-libs/netpbm )
44 portaudio? ( >=media-libs/portaudio-19_pre20111121 )
45 postproc? (
46 - || (
47 - media-libs/libpostproc
48 - media-video/ffmpeg:0
49 - )
50 + libav? ( media-libs/libpostproc:0= )
51 + !libav? ( media-video/ffmpeg:0= )
52 )
53 pulseaudio? ( media-sound/pulseaudio )
54 quvi? ( >=media-libs/libquvi-0.4.1 <media-libs/libquvi-0.9 )
55 samba? ( net-fs/samba )
56 || (
57 - >=media-video/libav-9.12:=[threads?,vdpau?]
58 - >=media-video/ffmpeg-1.2.6:0=[threads?,vdpau?]
59 + libav? ( >=media-video/libav-9.12:0=[threads?,vdpau?] )
60 + !libav? ( >=media-video/ffmpeg-1.2.6:0=[threads?,vdpau?] )
61 )
62 symlink? ( !media-video/mplayer )
63 "
64
65
66
67 1.141 media-video/mplayer2/ChangeLog
68
69 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/ChangeLog?rev=1.141&view=markup
70 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/ChangeLog?rev=1.141&content-type=text/plain
71 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/ChangeLog?r1=1.140&r2=1.141
72
73 Index: ChangeLog
74 ===================================================================
75 RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer2/ChangeLog,v
76 retrieving revision 1.140
77 retrieving revision 1.141
78 diff -u -r1.140 -r1.141
79 --- ChangeLog 31 Jan 2015 01:34:52 -0000 1.140
80 +++ ChangeLog 1 Feb 2015 23:21:49 -0000 1.141
81 @@ -1,6 +1,13 @@
82 # ChangeLog for media-video/mplayer2
83 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
84 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/ChangeLog,v 1.140 2015/01/31 01:34:52 patrick Exp $
85 +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/ChangeLog,v 1.141 2015/02/01 23:21:49 mgorny Exp $
86 +
87 +*mplayer2-2.0_p20131009-r1 (01 Feb 2015)
88 +
89 + 01 Feb 2015; Michał Górny <mgorny@g.o>
90 + +mplayer2-2.0_p20131009-r1.ebuild, mplayer2-9999.ebuild:
91 + Introduce USE=libav to control the preferred implementation. Fixes subslot &
92 + implementation switch rebuilds as well.
93
94 31 Jan 2015; Patrick Lauer <patrick@g.o> metadata.xml:
95 Remove unneded useflag description from metadata.xml
96
97
98
99 1.1 media-video/mplayer2/mplayer2-2.0_p20131009-r1.ebuild
100
101 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/mplayer2-2.0_p20131009-r1.ebuild?rev=1.1&view=markup
102 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/mplayer2-2.0_p20131009-r1.ebuild?rev=1.1&content-type=text/plain
103
104 Index: mplayer2-2.0_p20131009-r1.ebuild
105 ===================================================================
106 # Copyright 1999-2015 Gentoo Foundation
107 # Distributed under the terms of the GNU General Public License v2
108 # $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/mplayer2-2.0_p20131009-r1.ebuild,v 1.1 2015/02/01 23:21:49 mgorny Exp $
109
110 EAPI=5
111
112 # https://bugs.gentoo.org/show_bug.cgi?id=434356#c4
113 PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} )
114
115 EGIT_REPO_URI="git://git.mplayer2.org/mplayer2.git"
116
117 inherit toolchain-funcs flag-o-matic multilib eutils python-any-r1
118 [[ ${PV} == *9999* ]] && inherit git-2
119
120 NAMESUF="${PN/mplayer/}"
121 DESCRIPTION="Media Player for Linux"
122 HOMEPAGE="http://www.mplayer2.org/"
123 [[ ${PV} == *9999* ]] || \
124 SRC_URI="http://dev.gentoo.org/~maksbotan/${P}.tar.xz"
125
126 LICENSE="GPL-3"
127 SLOT="0"
128 [[ ${PV} == *9999* ]] || \
129 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux"
130 IUSE="+alsa aqua bluray bs2b cddb +cdio cpudetection debug directfb doc dvb +dvd
131 +dvdnav +enca ftp gif +iconv ipv6 jack joystick jpeg ladspa lcms +libass libav libcaca
132 lirc md5sum mng +mp3 +network +opengl oss png pnm portaudio +postproc pulseaudio
133 pvr +quvi radio samba selinux +shm tga +threads +unicode v4l vcd vdpau +X xinerama
134 +xscreensaver +xv yuv4mpeg"
135 IUSE+=" symlink"
136
137 CPU_FEATURES="cpu_flags_x86_3dnow:3dnow cpu_flags_x86_3dnowext:3dnowext altivec +cpu_flags_x86_mmx:mmx cpu_flags_x86_mmxext:mmxext cpu_flags_x86_sse:sse cpu_flags_x86_sse2:sse2 cpu_flags_x86_ssse3:ssse3"
138 for x in ${CPU_FEATURES}; do
139 IUSE+=" ${x%:*}"
140 done
141
142 REQUIRED_USE="
143 cddb? ( cdio network )
144 dvdnav? ( dvd )
145 enca? ( iconv )
146 lcms? ( opengl )
147 libass? ( iconv )
148 opengl? ( || ( aqua X ) )
149 portaudio? ( threads )
150 pvr? ( v4l )
151 radio? ( v4l || ( alsa oss ) )
152 v4l? ( threads )
153 vdpau? ( X )
154 xinerama? ( X )
155 xscreensaver? ( X )
156 xv? ( X )
157 "
158
159 RDEPEND+="
160 sys-libs/ncurses
161 sys-libs/zlib
162 X? (
163 x11-libs/libXext
164 x11-libs/libXxf86vm
165 opengl? ( virtual/opengl )
166 lcms? ( media-libs/lcms:2 )
167 vdpau? ( x11-libs/libvdpau )
168 xinerama? ( x11-libs/libXinerama )
169 xscreensaver? ( x11-libs/libXScrnSaver )
170 xv? ( x11-libs/libXv )
171 )
172 alsa? ( media-libs/alsa-lib )
173 bluray? ( media-libs/libbluray )
174 bs2b? ( media-libs/libbs2b )
175 cdio? (
176 || (
177 dev-libs/libcdio-paranoia
178 <dev-libs/libcdio-0.90[-minimal]
179 )
180 )
181 directfb? ( dev-libs/DirectFB )
182 dvb? ( virtual/linuxtv-dvb-headers )
183 dvd? (
184 >=media-libs/libdvdread-4.1.3
185 dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
186 )
187 enca? ( app-i18n/enca )
188 gif? ( media-libs/giflib )
189 iconv? ( virtual/libiconv )
190 jack? ( media-sound/jack-audio-connection-kit )
191 jpeg? ( virtual/jpeg )
192 ladspa? ( media-libs/ladspa-sdk )
193 libass? (
194 >=media-libs/libass-0.9.10[enca?,fontconfig]
195 virtual/ttf-fonts
196 )
197 libcaca? ( media-libs/libcaca )
198 lirc? ( app-misc/lirc )
199 mng? ( media-libs/libmng )
200 mp3? ( media-sound/mpg123 )
201 png? ( media-libs/libpng )
202 pnm? ( media-libs/netpbm )
203 portaudio? ( >=media-libs/portaudio-19_pre20111121 )
204 postproc? (
205 libav? ( media-libs/libpostproc:0= )
206 !libav? ( media-video/ffmpeg:0= )
207 )
208 pulseaudio? ( media-sound/pulseaudio )
209 quvi? ( >=media-libs/libquvi-0.4.1 <media-libs/libquvi-0.9 )
210 samba? ( net-fs/samba )
211 || (
212 libav? ( >=media-video/libav-9.12:0=[threads?,vdpau?] )
213 !libav? ( >=media-video/ffmpeg-1.2.6:0=[threads?,vdpau?] )
214 )
215 symlink? ( !media-video/mplayer )
216 "
217 DEPEND="${RDEPEND}
218 virtual/pkgconfig
219 ${PYTHON_DEPS}
220 dev-python/docutils
221 X? (
222 x11-proto/videoproto
223 x11-proto/xf86vidmodeproto
224 xinerama? ( x11-proto/xineramaproto )
225 xscreensaver? ( x11-proto/scrnsaverproto )
226 )
227 doc? (
228 dev-libs/libxslt
229 app-text/docbook-xml-dtd
230 app-text/docbook-xsl-stylesheets
231 )
232 "
233 RDEPEND+="
234 selinux? ( sec-policy/selinux-mplayer )
235 "
236 DOCS=( AUTHORS Copyright README etc/example.conf etc/input.conf etc/codecs.conf )
237
238 pkg_setup() {
239 if [[ ${PV} == *9999* ]]; then
240 elog
241 elog "This is a live ebuild which installs the latest from upstream's"
242 elog "git repository, and is unsupported by Gentoo."
243 elog "Everything but bugs in the ebuild itself will be ignored."
244 elog
245 fi
246
247 if use !libass; then
248 ewarn
249 ewarn "You've disabled the libass flag. No OSD or subtitles will be displayed."
250 fi
251
252 if use cpudetection; then
253 ewarn
254 ewarn "You've enabled the cpudetection flag. This feature is"
255 ewarn "included mainly for people who want to use the same"
256 ewarn "binary on another system with a different CPU architecture."
257 ewarn "MPlayer will already detect your CPU settings by default at"
258 ewarn "buildtime; this flag is used for runtime detection."
259 ewarn "You won't need this turned on if you are only building"
260 ewarn "mplayer for this system. Also, if your compile fails, try"
261 ewarn "disabling this use flag."
262 fi
263
264 einfo "For various format support you need to enable the support on your ffmpeg package:"
265 einfo " media-video/libav or media-video/ffmpeg"
266
267 python-any-r1_pkg_setup
268 }
269
270 src_prepare() {
271 epatch "${FILESDIR}/${PN}-py2compat.patch"
272 epatch "${FILESDIR}/${P}_support_libav10.patch"
273 epatch_user
274
275 # fix path to bash executable in configure scripts
276 sed -i -e "1c\#!${EPREFIX}/bin/bash" \
277 configure version.sh || die
278
279 sed -e 's/ $(INSTALLSTRIP)//' \
280 -e '/$(INSTALL) -d $(LIBDIR)/d' \
281 -i Makefile || die
282
283 if [[ -n ${NAMESUF} ]]; then
284 sed -e "/^EXESUF/s,= \$_exesuf$,= ${NAMESUF}\$_exesuf," \
285 -i configure || die
286 sed -e "s/mplayer/${PN}/" \
287 -i TOOLS/midentify.sh || die
288 fi
289 }
290
291 src_configure() {
292 local myconf=""
293 local uses i
294
295 # ebuild uses "use foo || --disable-foo" to forcibly disable
296 # compilation in almost every situation. The reason for this is
297 # because if --enable is used, it will force the build of that option,
298 # regardless of whether the dependency is available or not.
299
300 #####################
301 # Optional features #
302 #####################
303 # rtc is useless and /dev/rtc0 is only readable for root
304 myconf+=" --disable-rtc"
305 # SDL output is fallback for platforms where nothing better is available
306 myconf+=" --disable-sdl"
307 myconf+="
308 $(use_enable network networking)
309 $(use_enable joystick)
310 "
311 uses="bluray ftp vcd"
312 for i in ${uses}; do
313 use ${i} || myconf+=" --disable-${i}"
314 done
315 use ipv6 || myconf+=" --disable-inet6"
316 use quvi || myconf+=" --disable-libquvi"
317 use samba || myconf+=" --disable-smb"
318 use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
319
320 ########
321 # CDDA #
322 ########
323 use cddb || myconf+=" --disable-cddb"
324 use cdio || myconf+=" --disable-libcdio"
325
326 ################################
327 # DVD read, navigation support #
328 ################################
329 #
330 # dvdread - accessing a DVD
331 # dvdnav - navigation of menus
332 #
333 # use external libdvdcss, dvdread and dvdnav
334 myconf+=" --disable-dvdread-internal --disable-libdvdcss-internal"
335 use dvd || myconf+=" --disable-dvdread"
336 use dvdnav || myconf+=" --disable-dvdnav"
337
338 #############
339 # Subtitles #
340 #############
341 uses="enca libass"
342 for i in ${uses}; do
343 use ${i} || myconf+=" --disable-${i}"
344 done
345 # iconv optionally can use unicode
346 use iconv || myconf+=" --disable-iconv --charset=noconv"
347 use iconv && use unicode && myconf+=" --charset=UTF-8"
348 # obscure and not maintained feature
349 myconf+=" --disable-unrarexec"
350
351 #####################################
352 # DVB / Video4Linux / Radio support #
353 #####################################
354 # BSD legacy TV/radio support, FreeBSD actually supports V4L2, and V4L2 supports this chip.
355 myconf+=" --disable-tv-bsdbt848 --disable-radio-bsdbt848"
356 use dvb || myconf+=" --disable-dvb"
357 use pvr || myconf+=" --disable-pvr"
358 use v4l || myconf+=" --disable-tv --disable-tv-v4l2 --disable-v4l2"
359 if use radio; then
360 myconf+=" --enable-radio --enable-radio-capture"
361 else
362 myconf+=" --disable-radio-v4l2"
363 fi
364
365 ##########
366 # Codecs #
367 ##########
368 # better demuxers and decoders are provided by libav and ffmpeg
369 uses="faad liba52 libdca libdv libnut libvorbis mad musepack speex theora tremor xanim xvid"
370 for i in ${uses}; do
371 myconf+=" --disable-${i}"
372 done
373 use mp3 || myconf+=" --disable-mpg123"
374 uses="gif jpeg mng png pnm tga"
375 for i in ${uses}; do
376 use ${i} || myconf+=" --disable-${i}"
377 done
378
379 #################
380 # Binary codecs #
381 #################
382 myconf+=" --disable-qtx --disable-real --disable-win32dll"
383
384 ################
385 # Video Output #
386 ################
387 uses="directfb md5sum yuv4mpeg"
388 for i in ${uses}; do
389 use ${i} || myconf+=" --disable-${i}"
390 done
391 use libcaca || myconf+=" --disable-caca"
392 use postproc || myconf+=" --disable-libpostproc"
393
394 ################
395 # Audio Output #
396 ################
397 myconf+=" --disable-rsound" # media-sound/rsound is in pro-audio overlay only
398 uses="alsa jack ladspa portaudio"
399 for i in ${uses}; do
400 use ${i} || myconf+=" --disable-${i}"
401 done
402 use bs2b || myconf+=" --disable-libbs2b"
403 #use openal && myconf+=" --enable-openal" # build fails
404 use oss || myconf+=" --disable-ossaudio"
405 use pulseaudio || myconf+=" --disable-pulse"
406
407 ####################
408 # Advanced Options #
409 ####################
410 use threads || myconf+=" --disable-pthreads"
411
412 # Platform specific flags, hardcoded on amd64 (see below)
413 use cpudetection && myconf+=" --enable-runtime-cpudetection"
414 use shm || myconf+=" --disable-shm"
415
416 for i in ${CPU_FEATURES//+/}; do
417 myconf+=" $(use_enable ${i%:*} ${i#*:})"
418 done
419
420 use debug && myconf+=" --enable-debug=3"
421
422 if use x86 && gcc-specs-pie; then
423 filter-flags -fPIC -fPIE
424 append-ldflags -nopie
425 fi
426
427 ###########################
428 # X enabled configuration #
429 ###########################
430 use X || myconf+=" --disable-x11"
431 uses="vdpau xinerama xv"
432 for i in ${uses}; do
433 use ${i} || myconf+=" --disable-${i}"
434 done
435 use opengl || myconf+=" --disable-gl"
436 use lcms || myconf+=" --disable-lcms2"
437 use xscreensaver || myconf+=" --disable-xss"
438
439 ############################
440 # OSX (aqua) configuration #
441 ############################
442 use aqua && myconf+=" --enable-macosx-bundle --enable-macosx-finder"
443
444 CFLAGS= LDFLAGS= ./configure \
445 --cc="$(tc-getCC)" \
446 --extra-cflags="${CFLAGS}" \
447 --extra-ldflags="${LDFLAGS}" \
448 --pkg-config="$(tc-getPKG_CONFIG)" \
449 --prefix="${EPREFIX}"/usr \
450 --bindir="${EPREFIX}"/usr/bin \
451 --confdir="${EPREFIX}"/etc/${PN} \
452 --mandir="${EPREFIX}"/usr/share/man \
453 --localedir="${EPREFIX}"/usr/share/locale \
454 ${myconf} || die
455
456 MAKEOPTS+=" V=1"
457 }
458
459 src_compile() {
460 default
461 use doc && emake -C DOCS/xml html-chunked
462 }
463
464 src_install() {
465 default
466
467 if use doc; then
468 rm -r TOOLS/osxbundle* DOCS/tech/{Doxyfile,realcodecs} || die
469 dodoc -r TOOLS DOCS/tech
470 dohtml -r DOCS/HTML/*
471 fi
472
473 newbin TOOLS/midentify.sh midentify${NAMESUF}
474
475 if [[ -n ${NAMESUF} ]]; then
476 mv "${ED}/usr/share/man/man1/mplayer.1" "${ED}/usr/share/man/man1/mplayer${NAMESUF}.1" || die
477
478 if use symlink; then
479 dosym ${PN} /usr/bin/mplayer
480 dosym midentify${NAMESUF} /usr/bin/midentify
481 fi
482 fi
483 }