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