Gentoo Archives: gentoo-commits

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