Gentoo Archives: gentoo-commits

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