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