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