Gentoo Archives: gentoo-commits

From: "Steve Dibb (beandog)" <beandog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-video/mplayer: metadata.xml ChangeLog mplayer-20090226.28734.ebuild
Date: Thu, 26 Feb 2009 20:21:54
Message-Id: E1Lcmjt-0003o6-NC@stork.gentoo.org
1 beandog 09/02/26 20:21:49
2
3 Modified: metadata.xml ChangeLog
4 Added: mplayer-20090226.28734.ebuild
5 Log:
6 Add vdpau, dvdnav support, lots more use flags, split up real use flags, see ebuild changelog for moar.
7 (Portage version: 2.2_rc23/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.13 media-video/mplayer/metadata.xml
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/metadata.xml?rev=1.13&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/metadata.xml?rev=1.13&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/metadata.xml?r1=1.12&r2=1.13
15
16 Index: metadata.xml
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer/metadata.xml,v
19 retrieving revision 1.12
20 retrieving revision 1.13
21 diff -u -r1.12 -r1.13
22 --- metadata.xml 10 Jan 2009 23:10:00 -0000 1.12
23 +++ metadata.xml 26 Feb 2009 20:21:49 -0000 1.13
24 @@ -19,22 +19,29 @@
25 <flag name="dvdnav">Use forked libdvdnav, navigate menus in GUIs</flag>
26 <flag name="dxr3">Enable DXR3/H+ video output</flag>
27 <flag name="enca">Enables support for charset discovery and conversion</flag>
28 + <flag name="faac">Use external faac library for AAC encoding</flag>
29 + <flag name="faad">Use external faad library for AAC decoding</flag>
30 + <flag name="gtk">Build gmplayer, a GTK+ MPlayer gui (UNSUPPORTED)</flag>
31 <flag name="live">Enables live.com streaming media support</flag>
32 <flag name="md5sum">Enables md5sum video output</flag>
33 <flag name="mmxext">Enables mmx2 support</flag>
34 <flag name="mng">MNG input support</flag>
35 <flag name="mp2">Enables support for twolame, an MP2 audio library</flag>
36 <flag name="nemesi">Enable Nemesi Streaming Media support</flag>
37 + <flag name="network">Enables network streaming support</flag>
38 <flag name="pnm">Add PNM video output option, to create PPM/PGM/PGMYUV images</flag>
39 <flag name="pvr">Enable Video4Linux2 MPEG PVR</flag>
40 <flag name="radio">Enable V4L2 radio interface and support</flag>
41 <flag name="rar">Enable Unique RAR File Library</flag>
42 - <flag name="real">Adds real video support</flag>
43 + <flag name="real">Adds real audo/video support</flag>
44 + <flag name="realcodecs">External Real Player binary codec support (UNSUPPORTED)</flag>
45 <flag name="rtc">Enables usage of the linux real time clock. The alternative is software emulation of rtc</flag>
46 <flag name="schroedinger">Enable Dirac video support (an advanced royalty-free video compression format) via libschroedinger (high-speed implementation in C of the Dirac codec).</flag>
47 <flag name="ssse3">faster floating point optimization for SSSE3 capable chips (Intel Core 2 and later chips)</flag>
48 <flag name="teletext">Support for TV teletext interface</flag>
49 <flag name="tga">Enables Targa video output</flag>
50 + <flag name="tremor">Enable internal support for Vorbis</flag>
51 + <flag name="vdpau">Enables experimental VDPAU support (requires nVidia video cards) to offload MPEG2/MPEG4/VC1/WMV CPU processing to video card</flag>
52 <flag name="vidix">Support for vidix video output</flag>
53 <flag name="xanim">Enables support for xanim based codecs</flag>
54 <flag name="xvmc">Enables X-Video Motion Compensation support</flag>
55
56
57
58 1.620 media-video/mplayer/ChangeLog
59
60 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.620&view=markup
61 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.620&content-type=text/plain
62 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?r1=1.619&r2=1.620
63
64 Index: ChangeLog
65 ===================================================================
66 RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v
67 retrieving revision 1.619
68 retrieving revision 1.620
69 diff -u -r1.619 -r1.620
70 --- ChangeLog 12 Feb 2009 15:05:02 -0000 1.619
71 +++ ChangeLog 26 Feb 2009 20:21:49 -0000 1.620
72 @@ -1,6 +1,19 @@
73 # ChangeLog for media-video/mplayer
74 # Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
75 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.619 2009/02/12 15:05:02 beandog Exp $
76 +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.620 2009/02/26 20:21:49 beandog Exp $
77 +
78 +*mplayer-20090226.28734 (26 Feb 2009)
79 +
80 + 26 Feb 2009; Steve Dibb <beandog@g.o> metadata.xml,
81 + +mplayer-20090226.28734.ebuild:
82 + Split real use flag into two: real for internal, realcodecs for binary;
83 + Add faad, faac use flags for external AAC support; Add vdpau use flag; Add
84 + more use flags to be enabled by default for that fresh just-works feeling;
85 + Add tremor use flag for internal Vorbis support; Cleanup use flags, bug
86 + 254661; Install more docs by default, bug 254671; Check for mng use flag,
87 + bug 256054; Use unrar, add to mplayer.conf, bug 256203; Remove deprecated
88 + DEPEND, bug 256146; New naming scheme DATE.SVN_REVISION; Add more
89 + documentation to ebuild
90
91 12 Feb 2009; Steve Dibb <beandog@g.o>
92 mplayer-1.0_rc2_p28450.ebuild:
93
94
95
96 1.1 media-video/mplayer/mplayer-20090226.28734.ebuild
97
98 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/mplayer-20090226.28734.ebuild?rev=1.1&view=markup
99 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/mplayer-20090226.28734.ebuild?rev=1.1&content-type=text/plain
100
101 Index: mplayer-20090226.28734.ebuild
102 ===================================================================
103 # Copyright 1999-2009 Gentoo Foundation
104 # Distributed under the terms of the GNU General Public License v2
105 # $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-20090226.28734.ebuild,v 1.1 2009/02/26 20:21:49 beandog Exp $
106
107 EAPI="1"
108
109 inherit eutils flag-o-matic multilib
110
111 # Ugly hack, feel free to fix
112 MPLAYER_REVISION=28734
113
114 IUSE="3dnow 3dnowext +a52 +aac -aalib +alsa altivec +amrnb +amrwb -arts +ass bidi
115 bindist bl +cddb +cdio cdparanoia -cpudetection -custom-cflags -custom-cpuopts
116 debug dga +dirac directfb doc +dts +dv dvb +dvd +dvdnav dxr3 +enca +encode esd +faac
117 +faad +fbcon +ftp -gif ggi -gtk +iconv ipv6 jack joystick +jpeg kernel_linux ladspa
118 -libcaca lirc +live lzo +mad +md5sum +mmx mmxext mng +mp2 +mp3 musepack nas
119 +nemesi +network openal +opengl oss +png +pnm pulseaudio -pvr +quicktime radio
120 +rar +real -realcodecs +rtc -samba +schroedinger +sdl +speex sse sse2 ssse3 svga
121 teletext tga +theora +tremor +truetype unicode v4l v4l2 vdpau vidix +vorbis
122 -win32codecs +X +x264 xanim xinerama +xscreensaver +xv +xvid +xvmc zoran"
123
124 VIDEO_CARDS="s3virge mga tdfx vesa"
125
126 for x in ${VIDEO_CARDS}; do
127 IUSE="${IUSE} video_cards_${x}"
128 done
129
130 BLUV="1.7"
131 SVGV="1.9.17"
132 AMR_URI="http://www.3gpp.org/ftp/Specs/archive"
133 SRC_URI="mirror://gentoo/${P}.tar.bz2
134 !truetype? ( mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
135 mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
136 mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 )
137 !iconv? ( mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
138 mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
139 mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 )
140 gtk? ( mirror://mplayer/Skin/Blue-${BLUV}.tar.bz2 )
141 svga? ( http://mplayerhq.hu/~alex/svgalib_helper-${SVGV}-mplayer.tar.bz2 )"
142
143 DESCRIPTION="Media Player for Linux"
144 HOMEPAGE="http://www.mplayerhq.hu/"
145
146 RDEPEND="sys-libs/ncurses
147 !bindist? (
148 x86? (
149 win32codecs? ( media-libs/win32codecs )
150 realcodecs? ( media-libs/win32codecs
151 media-libs/realcodecs )
152 )
153 amd64? ( realcodecs? ( media-libs/amd64codecs ) )
154 )
155 aalib? ( media-libs/aalib )
156 alsa? ( media-libs/alsa-lib )
157 amrnb? ( media-libs/amrnb )
158 amrwb? ( media-libs/amrwb )
159 arts? ( kde-base/arts )
160 ass? ( >=media-libs/freetype-2.1
161 media-libs/fontconfig )
162 openal? ( media-libs/openal )
163 bidi? ( dev-libs/fribidi )
164 cdio? ( dev-libs/libcdio )
165 cdparanoia? ( media-sound/cdparanoia )
166 dirac? ( >=media-video/dirac-0.10.0 )
167 directfb? ( dev-libs/DirectFB )
168 dga? ( x11-libs/libXxf86dga )
169 dts? ( media-libs/libdca )
170 dv? ( media-libs/libdv )
171 dvb? ( media-tv/linuxtv-dvb-headers )
172 encode? (
173 mp2? ( media-sound/twolame )
174 mp3? ( media-sound/lame )
175 faac? ( media-libs/faac )
176 x264? ( >=media-libs/x264-0.0.20080406 )
177 xvid? ( media-libs/xvid )
178 )
179 esd? ( media-sound/esound )
180 enca? ( app-i18n/enca )
181 faad? ( media-libs/faad2 )
182 gif? ( media-libs/giflib )
183 ggi? ( media-libs/libggi
184 media-libs/libggiwmh )
185 gtk? ( media-libs/libpng
186 x11-libs/libXxf86vm
187 x11-libs/libXext
188 x11-libs/libXi
189 =x11-libs/gtk+-2* )
190 jpeg? ( media-libs/jpeg )
191 ladspa? ( media-libs/ladspa-sdk )
192 libcaca? ( media-libs/libcaca )
193 libvorbis? ( media-libs/libvorbis )
194 lirc? ( app-misc/lirc )
195 lzo? ( >=dev-libs/lzo-2 )
196 mad? ( media-libs/libmad )
197 mng? ( media-libs/libmng )
198 musepack? ( >=media-libs/libmpcdec-1.2.2 )
199 nas? ( media-libs/nas )
200 opengl? ( virtual/opengl )
201 png? ( media-libs/libpng )
202 pnm? ( media-libs/netpbm )
203 pulseaudio? ( media-sound/pulseaudio )
204 rar? ( || ( app-arch/unrar-gpl
205 app-arch/unrar ) )
206 samba? ( net-fs/samba )
207 schroedinger? ( media-libs/schroedinger )
208 sdl? ( media-libs/libsdl )
209 speex? ( >=media-libs/speex-1.1.7 )
210 svga? ( media-libs/svgalib )
211 theora? ( media-libs/libtheora )
212 live? ( >=media-plugins/live-2007.02.20 )
213 truetype? ( >=media-libs/freetype-2.1
214 media-libs/fontconfig )
215 vdpau? ( >=x11-drivers/nvidia-drivers-180.22 )
216 vidix? ( x11-libs/libXxf86vm
217 x11-libs/libXext )
218 xanim? ( media-video/xanim )
219 xinerama? ( x11-libs/libXinerama
220 x11-libs/libXxf86vm
221 x11-libs/libXext )
222 xscreensaver? ( x11-libs/libXScrnSaver )
223 xv? ( x11-libs/libXv
224 x11-libs/libXxf86vm
225 x11-libs/libXext
226 xvmc? ( x11-libs/libXvMC ) )
227 X? ( x11-libs/libXxf86vm
228 x11-libs/libXext
229 )"
230
231 DEPEND="${RDEPEND}
232 doc? ( dev-libs/libxslt )
233 dga? ( x11-proto/xf86dgaproto )
234 dxr3? ( media-video/em8300-libraries )
235 xinerama? ( x11-proto/xineramaproto )
236 xv? ( x11-proto/videoproto
237 x11-proto/xf86vidmodeproto )
238 gtk? ( x11-proto/xextproto
239 x11-proto/xf86vidmodeproto )
240 X? ( x11-proto/xextproto
241 x11-proto/xf86vidmodeproto )
242 xscreensaver? ( x11-proto/scrnsaverproto )
243 iconv? ( virtual/libiconv )"
244
245 SLOT="0"
246 LICENSE="GPL-2"
247 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
248
249 pkg_setup() {
250
251 if [[ -n ${LINGUAS} ]]; then
252 elog ""
253 elog "MPlayer's build system uses the LINGUAS variable for both"
254 elog "output messages and which man pages to build. The first"
255 elog "language in the LINGUAS variable will be used to display"
256 elog "output messages. See bug #228799."
257 fi
258
259 if use gtk; then
260 ewarn ""
261 ewarn "You've enabled the 'gtk' use flag which will build"
262 ewarn "GMPlayer, which is no longer actively developed upstream"
263 ewarn "and is not supported by Gentoo. There are alternatives"
264 ewarn "for a GUI frontend: smplayer, gnome-mplayer and kmplayer."
265 fi
266
267 if use cpudetection; then
268 ewarn ""
269 ewarn "You've enabled the cpudetection flag. This feature is"
270 ewarn "included mainly for people who want to use the same"
271 ewarn "binary on another system with a different CPU architecture."
272 ewarn "MPlayer will already detect your CPU settings by default at"
273 ewarn "buildtime; this flag is used for runtime detection."
274 ewarn "You won't need this turned on if you are only building"
275 ewarn "mplayer for this system. Also, if your compile fails, try"
276 ewarn "disabling this use flag."
277 fi
278
279 if use custom-cpuopts; then
280 ewarn ""
281 ewarn "You are using the custom-cpuopts flag which will"
282 ewarn "specifically allow you to enable / disable certain"
283 ewarn "CPU optimizations."
284 ewarn ""
285 ewarn "Most desktop users won't need this functionality, but it"
286 ewarn "is included for corner cases like cross-compiling and"
287 ewarn "certain profiles. If unsure, disable this flag and MPlayer"
288 ewarn "will automatically detect and use your available CPU"
289 ewarn "optimizations."
290 ewarn ""
291 ewarn "Using this flag means your build is unsupported, so"
292 ewarn "please make sure your CPU optimization use flags (3dnow"
293 ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set."
294 fi
295 }
296
297 src_unpack() {
298 unpack ${A}
299
300 if ! use truetype ; then
301 unpack font-arial-iso-8859-1.tar.bz2 \
302 font-arial-iso-8859-2.tar.bz2 \
303 font-arial-cp1250.tar.bz2
304 fi
305
306 use gtk && unpack "Blue-${BLUV}.tar.bz2"
307
308 use svga && unpack "svgalib_helper-${SVGV}-mplayer.tar.bz2"
309
310 cd "${S}"
311
312 # Fix sparc compilation, bug 241110
313 # epatch "${FILESDIR}/mplayer-libavcodec.patch"
314
315 # Fix x264 compilation, bug 240347
316 epatch "${FILESDIR}/mplayer-1.0_rc2_p27725-libx264.patch"
317
318 # Security bug 251017
319 # epatch "${FILESDIR}"/mplayer-1.0_rc2_p28058-demux_vqf.patch
320
321 # Set version #
322 sed -i s/UNKNOWN/${MPLAYER_REVISION}/ "${S}/version.sh"
323
324 # Fix hppa compilation
325 use hppa && sed -i -e "s/-O4/-O1/" "${S}/configure"
326
327 if use svga; then
328 echo
329 einfo "Enabling vidix non-root mode."
330 einfo "(You need a proper svgalib_helper.o module for your kernel"
331 einfo "to actually use this)"
332 echo
333
334 mv "${WORKDIR}/svgalib_helper" "${S}/libdha"
335 fi
336
337 # Fix polish spelling errors
338 [[ -n ${LINGUAS} ]] && sed -e 's:Zarządano:Zażądano:' -i help/help_mp-pl.h
339 }
340
341 src_compile() {
342
343 local myconf=""
344
345 # MPlayer reads in the LINGUAS variable from make.conf, and sets
346 # the languages accordingly. Some will have to be altered to match
347 # upstream's naming scheme.
348 [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
349
350 # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
351 # compilation in almost every situation. The reason for this is
352 # because if --enable is used, it will force the build of that option,
353 # regardless of whether the dependency is available or not.
354
355 ################
356 #Optional features#
357 ###############
358 myconf="${myconf} --enable-menu"
359 myconf="${myconf} $(use_enable network)"
360 use ass || myconf="${myconf} --disable-ass"
361 use bidi || myconf="${myconf} --disable-fribidi"
362 use bl && myconf="${myconf} --enable-bl"
363 use enca || myconf="${myconf} --disable-enca"
364 use encode || myconf="${myconf} --disable-mencoder"
365 use ftp || myconf="${myconf} --disable-ftp"
366 use ipv6 || myconf="${myconf} --disable-inet6"
367 use lirc || myconf="${myconf} --disable-lirc --disable-lircc"
368 use nemesi || myconf="${myconf} --disable-nemesi"
369 use rar || myconf="${myconf} --disable-unrarexec"
370 use rtc || myconf="${myconf} --disable-rtc"
371 use samba || myconf="${myconf} --disable-smb"
372 use xscreensaver || myconf="${myconf} --disable-xss"
373 myconf="${myconf} $(use_enable joystick)"
374
375 # libcdio support: prefer libcdio over cdparanoia
376 # don't check for cddb w/cdio
377 if use cdio; then
378 myconf="${myconf} --disable-cdparanoia"
379 else
380 myconf="${myconf} --disable-libcdio"
381 use cdparanoia || myconf="${myconf} --disable-cdparanoia"
382 use cddb || myconf="${myconf} --disable-cddb"
383 fi
384
385 ###############
386 # DVD read, navigation support
387 ###############
388 #
389 # dvdread - accessing a DVD
390 # dvdnav - navigation of menus
391 #
392 # internal dvdread and dvdnav use flags enable internal
393 # versions of the libraries, which are snapshots of the fork.
394 #
395 # Only check for disabled a52 use flag inside the DVD check,
396 # since many users were getting confused why there was no
397 # audio stream.
398 #
399 if use dvd; then
400 use dvdnav || myconf="${myconf} --disable-dvdnav"
401 else
402 myconf="${myconf} --disable-dvdnav --disable-dvdread \
403 --disable-dvdread-internal --disable-libdvdcss-internal"
404 use a52 || myconf="${myconf} --disable-liba52-internal"
405 fi
406
407 ###############
408 # Subtitles
409 ###############
410 #
411 # SRT/ASS/SSA (subtitles) requires freetype support
412 # freetype support requires iconv
413 # iconv optionally can use unicode
414 if ! use ass; then
415 if ! use truetype; then
416 myconf="${myconf} --disable-freetype"
417 if ! use iconv; then
418 myconf="${myconf} --disable-iconv --charset=noconv"
419 fi
420 fi
421 fi
422 use iconv && use unicode && myconf="${myconf} --charset=UTF-8"
423
424 ###############
425 # DVB / Video4Linux / Radio support
426 ###############
427 myconf="${myconf} --disable-tv-bsdbt848"
428 # broken upstream, won't work with recent kernels
429 myconf="${myconf} --disable-ivtv"
430 if { use dvb || use v4l || use v4l2 || use pvr || use radio; }; then
431 use dvb || myconf="${myconf} --disable-dvb --disable-dvbhead"
432 use pvr || myconf="${myconf} --disable-pvr"
433 use v4l || myconf="${myconf} --disable-tv-v4l1"
434 use v4l2 || myconf="${myconf} --disable-tv-v4l2"
435 use teletext || myconf="${myconf} --disable-tv-teletext"
436 if use radio && { use dvb || use v4l || use v4l2; }; then
437 myconf="${myconf} --enable-radio $(use_enable encode radio-capture)"
438 else
439 myconf="${myconf} --disable-radio-v4l2 --disable-radio-bsdbt848"
440 fi
441 else
442 myconf="${myconf} --disable-tv --disable-tv-v4l1 --disable-tv-v4l2 \
443 --disable-radio --disable-radio-v4l2 --disable-radio-bsdbt848 \
444 --disable-dvb --disable-dvbhead --disable-tv-teletext \
445 --disable-v4l2 --disable-pvr"
446 fi
447
448 #########
449 # Codecs #
450 ########
451 # Won't work with external liba52
452 myconf="${myconf} --disable-liba52"
453
454 use aac || myconf="${myconf} --disable-faad-internal"
455 use amrnb || myconf="${myconf} --disable-libamr_nb"
456 use amrwb || myconf="${myconf} --disable-libamr_wb"
457 use dirac || myconf="${myconf} --disable-libdirac-lavc"
458 use dts || myconf="${myconf} --disable-libdca"
459 use dv || myconf="${myconf} --disable-libdv"
460 use faad || myconf="${myconf} --disable-faad"
461 use lzo || myconf="${myconf} --disable-liblzo"
462 use mp3 || myconf="${myconf} --disable-mp3lame --disable-mp3lame-lavc \
463 --disable-mp3lib"
464 use schroedinger || myconf="${myconf} --disable-libschroedinger-lavc"
465 use xanim && myconf="${myconf} --xanimcodecsdir=/usr/lib/xanim/mods"
466 ! use png && ! use gtk && myconf="${myconf} --disable-png"
467 for x in gif jpeg live mad mng musepack pnm speex tga theora xanim; do
468 use ${x} || myconf="${myconf} --disable-${x}"
469 done
470 if use vorbis || use tremor; then
471 use tremor || myconf="${myconf} --disable-tremor-internal"
472 use vorbis || myconf="${myconf} --disable-libvorbis"
473 else
474 myconf="${myconf} --disable-tremor-internal --disable-tremor \
475 --disable-libvorbis"
476 fi
477 # Encoding
478 if use encode; then
479 use aac || myconf="${myconf} --disable-faac-lavc"
480 use faac || myconf="${myconf} --disable-faac"
481 use x264 || myconf="${myconf} --disable-x264"
482 use xvid || myconf="${myconf} --disable-xvid"
483 use mp2 || myconf="${myconf} --disable-twolame --disable-toolame"
484 else
485 myconf="${myconf} --disable-faac-lavc --disable-faac --disable-x264 \
486 --disable-xvid --disable-x264-lavc --disable-xvid-lavc \
487 --disable-twolame --disable-toolame"
488 fi
489
490
491 ###############
492 # Binary codecs
493 ###############
494 # bug 213836
495 if ! use x86 || ! use win32codecs; then
496 use quicktime || myconf="${myconf} --disable-qtx"
497 fi
498
499 ###############
500 # RealPlayer support
501 ###############
502 #
503 # Realplayer support shows up in four places:
504 # - libavcodec (internal)
505 # - win32codecs
506 # - realcodecs (win32codecs libs)
507 # - realcodecs (realplayer libs)
508 #
509
510 # internal
511 use real || myconf="${myconf} --disable-real"
512
513 # Real binary codec support only available on x86, amd64
514 if use realcodecs; then
515 use x86 && myconf="${myconf} \
516 --realcodecsdir=/opt/RealPlayer/codecs"
517 use amd64 && myconf="${myconf} \
518 --realcodecsdir=/usr/$(get_libdir)/codecs"
519 elif ! use bindist; then
520 myconf="${myconf} $(use_enable win32codecs win32dll)"
521 fi
522
523
524 #############
525 # Video Output #
526 #############
527 for x in directfb ggi md5sum sdl xinerama; do
528 use ${x} || myconf="${myconf} --disable-${x}"
529 done
530 use aalib || myconf="${myconf} --disable-aa"
531 use dga || myconf="${myconf} --disable-dga1 --disable-dga2"
532 use fbcon || myconf="${myconf} --disable-fbdev"
533 use fbcon && use video_cards_s3virge && myconf="${myconf} --enable-s3fb"
534 use libcaca || myconf="${myconf} --disable-caca"
535 use opengl || myconf="${myconf} --disable-gl"
536 use video_cards_vesa || myconf="${myconf} --disable-vesa"
537 use video_cards_nvidia && use vdpau || myconf="${myconf} --disable-vdpau"
538 use vidix || myconf="${myconf} --disable-vidix --disable-vidix-pcidb"
539 use zoran || myconf="${myconf} --disable-zr"
540
541 # MPlayer incorrectly looks for DXR3 support, so forcibly enable
542 # if requested. See bug 223587
543 myconf="${myconf} $(use_enable dxr3)"
544
545 # GTK gmplayer gui
546 # Unsupported by Gentoo, upstream has dropped development
547 myconf="${myconf} $(use_enable gtk gui)"
548
549 if use xv; then
550 if use xvmc; then
551 myconf="${myconf} --enable-xvmc --with-xvmclib=XvMCW"
552 else
553 myconf="${myconf} --disable-xvmc"
554 fi
555 else
556 myconf="${myconf} --disable-xv --disable-xvmc"
557 fi
558
559 if ! use kernel_linux && ! use video_cards_mga; then
560 myconf="${myconf} --disable-mga --disable-xmga"
561 fi
562
563 if use video_cards_tdfx; then
564 myconf="${myconf} $(use_enable video_cards_tdfx tdfxvid) \
565 $(use_enable fbcon tdfxfb)"
566 else
567 myconf="${myconf} --disable-3dfx --disable-tdfxvid --disable-tdfxfb"
568 fi
569
570 #############
571 # Audio Output #
572 #############
573 for x in alsa arts esd jack ladspa nas openal; do
574 use ${x} || myconf="${myconf} --disable-${x}"
575 done
576 use pulseaudio || myconf="${myconf} --disable-pulse"
577 if ! use radio; then
578 use oss || myconf="${myconf} --disable-ossaudio"
579 fi
580
581 #################
582 # Advanced Options #
583 #################
584 # Platform specific flags, hardcoded on amd64 (see below)
585 if use cpudetection || use bindist; then
586 myconf="${myconf} --enable-runtime-cpudetection"
587 fi
588
589 # Turning off CPU optimizations usually will break the build.
590 # However, this use flag, if enabled, will allow users to completely
591 # specify which ones to use. If disabled, mplayer will automatically
592 # enable all CPU optimizations that the host build supports.
593 if use custom-cpuopts; then
594 for x in 3dnow 3dnowext mmx mmxext sse sse2 ssse3; do
595 myconf="${myconf} $(use_enable $x)"
596 done
597 fi
598
599 use debug && myconf="${myconf} --enable-debug=3"
600
601 myconf="${myconf} $(use_enable altivec)"
602
603 if use custom-cflags; then
604 # let's play the filtration game! MPlayer hates on all!
605 strip-flags
606 # ugly optimizations cause MPlayer to cry on x86 systems!
607 if use x86 || use x86-fbsd ; then
608 replace-flags -O* -O2
609 filter-flags -fPIC -fPIE
610
611 use debug || append-flags -fomit-frame-pointer
612 fi
613 append-flags -D__STDC_LIMIT_MACROS
614 else
615 unset CFLAGS CXXFLAGS
616 fi
617
618 myconf="--cc=$(tc-getCC) \
619 --host-cc=$(tc-getBUILD_CC) \
620 --prefix=/usr \
621 --confdir=/etc/mplayer \
622 --datadir=/usr/share/mplayer \
623 --libdir=/usr/$(get_libdir) \
624 ${myconf}"
625
626 #echo "CFLAGS=\"${CFLAGS}\" ./configure ${myconf}"
627 CFLAGS="${CFLAGS}" ./configure ${myconf} || die "configure died"
628
629 emake || die "Failed to build MPlayer!"
630 use doc && make -C DOCS/xml html-chunked
631 }
632
633 src_install() {
634
635 make prefix="${D}/usr" \
636 BINDIR="${D}/usr/bin" \
637 LIBDIR="${D}/usr/$(get_libdir)" \
638 CONFDIR="${D}/etc/mplayer" \
639 DATADIR="${D}/usr/share/mplayer" \
640 MANDIR="${D}/usr/share/man" \
641 INSTALLSTRIP="" \
642 install || die "Failed to install MPlayer!"
643
644 dodoc AUTHORS Changelog Copyright README etc/codecs.conf
645
646 docinto tech/
647 dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
648 docinto tech/realcodecs/
649 dodoc DOCS/tech/realcodecs/*
650 docinto tech/mirrors/
651 dodoc DOCS/tech/mirrors/*
652
653 docinto TOOLS/
654 dodoc TOOLS/*
655 docinto TOOLS/realcodecs/
656 dodoc TOOLS/realcodecs/*
657
658 # Install the default Skin and Gnome menu entry
659 if use gtk; then
660 dodir /usr/share/mplayer/skins
661 cp -r "${WORKDIR}/Blue" \
662 "${D}/usr/share/mplayer/skins/default" || die "cp skins died"
663
664 # Fix the symlink
665 rm -rf "${D}/usr/bin/gmplayer"
666 dosym mplayer /usr/bin/gmplayer
667 fi
668
669 if ! use ass && ! use truetype; then
670 dodir /usr/share/mplayer/fonts
671 local x=
672 # Do this generic, as the mplayer people like to change the structure
673 # of their zips ...
674 for x in $(find "${WORKDIR}/" -type d -name 'font-arial-*')
675 do
676 cp -pPR "${x}" "${D}/usr/share/mplayer/fonts"
677 done
678 # Fix the font symlink ...
679 rm -rf "${D}/usr/share/mplayer/font"
680 dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
681 fi
682
683 insinto /etc/mplayer
684 newins "${S}/etc/example.conf" mplayer.conf
685
686 if use ass || use truetype; then
687 cat >> "${D}/etc/mplayer/mplayer.conf" << EOT
688 fontconfig=1
689 subfont-osd-scale=4
690 subfont-text-scale=3
691 EOT
692 fi
693
694 # bug 256203
695 if use rar; then
696 cat >> "${D}/etc/mplayer/mplayer.conf" << EOT
697 unrarexec=/usr/bin/unrar
698 EOT
699 fi
700
701 dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
702
703 newbin "${S}/TOOLS/midentify.sh" midentify
704
705 insinto /usr/share/mplayer
706 doins "${S}/etc/input.conf"
707 doins "${S}/etc/menu.conf"
708 }
709
710 pkg_preinst() {
711
712 if [[ -d ${ROOT}/usr/share/mplayer/Skin/default ]]
713 then
714 rm -rf "${ROOT}/usr/share/mplayer/Skin/default"
715 fi
716 }
717
718 pkg_postrm() {
719
720 # Cleanup stale symlinks
721 if [ -L "${ROOT}/usr/share/mplayer/font" -a \
722 ! -e "${ROOT}/usr/share/mplayer/font" ]
723 then
724 rm -f "${ROOT}/usr/share/mplayer/font"
725 fi
726
727 if [ -L "${ROOT}/usr/share/mplayer/subfont.ttf" -a \
728 ! -e "${ROOT}/usr/share/mplayer/subfont.ttf" ]
729 then
730 rm -f "${ROOT}/usr/share/mplayer/subfont.ttf"
731 fi
732 }