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