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