summaryrefslogtreecommitdiff
path: root/media-video/mplayer
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2012-05-22 06:58:09 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2012-05-22 06:58:09 +0300
commita96000b2ed99031cc1925a2e4a03efc63d1e9fe6 (patch)
tree31e78fcc761ef48a8bb4c123e1ca2ed666a4260b /media-video/mplayer
parent91700fb0bcb9efd03d5b380fb874498f029b25f4 (diff)
deleted: media-video/mplayer/mplayer-9999-r20.ebuild
new file: media-video/mplayer/mplayer-9999.ebuild new file: media-video/mplayer2/mplayer2-9999.ebuild
Diffstat (limited to 'media-video/mplayer')
-rw-r--r--media-video/mplayer/mplayer-9999-r20.ebuild600
-rw-r--r--media-video/mplayer/mplayer-9999.ebuild654
2 files changed, 654 insertions, 600 deletions
diff --git a/media-video/mplayer/mplayer-9999-r20.ebuild b/media-video/mplayer/mplayer-9999-r20.ebuild
deleted file mode 100644
index ea52fbc..0000000
--- a/media-video/mplayer/mplayer-9999-r20.ebuild
+++ /dev/null
@@ -1,600 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI="1"
-inherit eutils flag-o-matic multilib subversion
-
-RESTRICT="strip"
-IUSE="X 3dfx 3dnow 3dnowext +a52 +aac -aalib +alsa altivec amrnb amrwb -arts +ass
- bidi bindist bl cddb cdio cdparanoia cpudetection -custom-cflags debug
- dga dirac doc dvb directfb dts +dvd dv dvdnav eac3 enca encode esd
- fbcon fpm ftp gif ggi -gtk i8x0 ipv6 ivtv jack joystick jpeg ladspa
- libcaca lirc live livecd lzo matrox mga mmx mmxext +mp2 +mp3 +mpeg musepack
- nas nemesi nls nut nvidia openal opengl oss +png pnm pulseaudio pvr quicktime
- radio rar -real rtc samba schroedinger sdl speex sse sse2 ssse3 svga tga
- +theora tivo +truetype +unicode v4l v4l2 vidix +vorbis -win32codecs +x264
- xanim xinerama +xscreensaver +xv +xvid xvmc zoran"
-
-VIDEO_CARDS="s3virge mga tdfx vesa"
-
-for x in ${VIDEO_CARDS} ; do
- IUSE="${IUSE} video_cards_${x}"
-done
-
-S="${WORKDIR}/${PN}"
-SRC_URI="mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
- mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
- svga? ( mirror://mplayer/contrib/svgalib/svgalib_helper-1.9.17-mplayer.tar.bz2 )
- gtk? ( mirror://mplayer/Skin/productive-1.0.tar.bz2 )"
- # Only install Skin if GUI should be build (gtk as USE flag)
-
-ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
-ESVN_PROJECT="mplayer"
-
-DESCRIPTION="A very versatile media player"
-HOMEPAGE="http://www.mplayerhq.hu/"
-
-# 'encode' in USE for MEncoder.
-RDEPEND="sys-libs/ncurses
- !bindist? (
- x86? (
- win32codecs? ( media-libs/win32codecs )
- real? ( media-libs/win32codecs
- media-video/realplayer )
- )
- amd64? ( real? ( media-libs/amd64codecs ) )
- amrnb? ( media-libs/opencore-amr )
- amrwb? ( media-libs/opencore-amr )
- )
- aalib? ( media-libs/aalib )
- alsa? ( media-libs/alsa-lib )
- arts? ( kde-base/arts )
- bidi? ( dev-libs/fribidi )
- cdio? ( dev-libs/libcdio )
- cdparanoia? ( media-sound/cdparanoia )
- dga? ( x11-libs/libXxf86dga )
- dirac? ( media-video/dirac )
- directfb? ( dev-libs/DirectFB )
- dts? ( media-libs/libdca )
- dvb? ( media-tv/linuxtv-dvb-headers )
- dvdnav? ( >=media-libs/libdvdnav-9999
- media-libs/libdvdread )
- enca? ( app-i18n/enca )
- encode? (
- aac? ( media-libs/faac )
- dv? ( media-libs/libdv )
- mp2? ( media-sound/twolame )
- mp3? ( media-sound/lame )
- x264? ( media-libs/x264 )
- )
- esd? ( media-sound/esound )
- fontconfig? ( media-libs/fontconfig )
- gif? ( media-libs/giflib )
- ggi? ( media-libs/libggi )
- gtk? ( media-libs/libpng
- x11-libs/libXxf86vm
- x11-libs/libXext
- x11-libs/libXi
- x11-libs/gtk+:2 )
- jpeg? ( media-libs/jpeg )
- ladspa? ( media-libs/ladspa-sdk )
- libcaca? ( media-libs/libcaca )
- lirc? ( app-misc/lirc )
- live? ( >=media-plugins/live-2007.02.20 )
- lzo? ( =dev-libs/lzo-1* )
- mp3? ( media-libs/libmad )
- nas? ( media-libs/nas )
- nls? ( virtual/libintl )
- openal? ( media-libs/openal )
- opengl? ( virtual/opengl )
- png? ( media-libs/libpng )
- pulseaudio? ( media-sound/pulseaudio )
- quicktime? ( media-libs/libquicktime )
- samba? ( >=net-fs/samba-2.2.8a )
- schroedinger? ( media-libs/schroedinger )
- sdl? ( media-libs/libsdl )
- speex? ( media-libs/speex )
- svga? ( media-libs/svgalib )
- theora? ( media-libs/libtheora )
- vidix? ( x11-libs/libXxf86vm
- x11-libs/libXext )
- vorbis? ( media-libs/libvorbis )
- xscreensaver? ( x11-libs/libXScrnSaver )
- truetype? ( >=media-libs/freetype-2.1
- media-libs/fontconfig )
- xanim? ( media-video/xanim )
- xinerama? ( x11-libs/libXinerama
- x11-libs/libXxf86vm
- x11-libs/libXext )
- xvid? ( media-libs/xvid )
- xv? ( x11-libs/libXv
- x11-libs/libXxf86vm
- x11-libs/libXext
- xvmc? ( x11-libs/libXvMC ) )
- X? ( x11-libs/libXxf86vm
- x11-libs/libXext
- joystick? ( x11-drivers/xf86-input-joystick ) )
-"
-DEPEND="${RDEPEND}
- app-arch/unzip
- >=sys-apps/portage-2.1.2
- doc? ( >=app-text/docbook-sgml-dtd-4.1.2
- app-text/docbook-xml-dtd
- >=app-text/docbook-xml-simple-dtd-1.50.0 )
- jack? ( >=media-libs/bio2jack-0.4 )
- nls? ( sys-devel/gettext )
- dga? ( x11-proto/xf86dgaproto )
- xinerama? ( x11-proto/xineramaproto )
- xscreensaver? ( x11-proto/scrnsaverproto )
- xv? ( x11-proto/videoproto
- x11-proto/xf86vidmodeproto )
- gtk? ( x11-proto/xextproto
- x11-proto/xf86vidmodeproto )
- X? ( x11-proto/xextproto
- x11-proto/xf86vidmodeproto )
- unicode? ( virtual/libiconv )"
-
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS=""
-
-pkg_setup() {
-
- if use ass && ! use truetype ; then
- echo
- ewarn "You enabled the 'ass' USE flag, but text subtitle support will be"
- ewarn "disabled unless you also use 'truetype'!"
- echo
- fi
-
- if use truetype && ! use unicode ; then
- echo
- ewarn "You enabled the 'truetype' USE flag, but support will be"
- ewarn "disabled unless you also use 'unicode'!"
- echo
- fi
-
- if use gtk ; then
- echo
- ewarn "The gtk useflag enables mplayer's gui (gmplayer), which is"
- ewarn "unmaintained upstream. You are encouraged to use a modern"
- ewarn "frontend, such as gnome-mplayer, kmplayer or smplayer instead."
- echo
- fi
-
-
- if [[ -n ${LINGUAS} ]]; then
- echo
- elog "For MPlayer's language support, the configuration will"
- elog "use your LINGUAS variable from /etc/make.conf. If you have more"
- elog "than one language enabled, then the first one in the list will"
- elog "be used to output the messages, if a translation is available."
- elog "man pages will be created for all languages where translations"
- elog "are also available."
- echo
- fi
-
- if use x86 || use amd64; then
- if ! use mmx && use custom-cflags; then
- echo
- ewarn "You have the 'mmx' use flag disabled for this package, which"
- ewarn "means that no CPU optimizations will be used at all."
- ewarn "The build will either break or encode very slowly. Check your"
- ewarn "/proc/cpuinfo for possible CPU optimization flags that"
- ewarn "apply to this ebuild (mmx, mmxext, 3dnow, 3dnowext, sse, sse2, ssse3)."
- echo
- fi
- fi
-}
-
-src_unpack() {
-
- subversion_src_unpack
-
- cd "${WORKDIR}"
- if ! use truetype || ! use unicode ; then
- unpack font-arial-iso-8859-1.tar.bz2 \
- font-arial-iso-8859-2.tar.bz2 \
- font-arial-cp1250.tar.bz2
- fi
-
- use svga && unpack svgalib_helper-1.9.17-mplayer.tar.bz2
-
- use gtk && unpack productive-1.0.tar.bz2
-
- # For Version Branding
- cd "${ESVN_STORE_DIR}/${ESVN_CO_DIR}/${ESVN_PROJECT}/${ESVN_REPO_URI##*/}"
- ./version.sh
- mv version.h "${S}"
-
- cd "${S}"
-
-# epatch "${FILESDIR}/disable-version-rebranding.patch"
-
- # eac3 patches from the GSoC project
- if use eac3
- then
- cd "${WORKDIR}"
- einfo "Fetching eac3 sources..."
- svn co svn://svn.mplayerhq.hu/soc/eac3 eac3
- cd "${S}"
- einfo "Applying eac3 patches..."
- epatch "${WORKDIR}/eac3/ffmpeg.patch"
- cp ../eac3/*.c ./libavcodec/ || die "copying eac3 files failed"
- fi
-
- # Fix hppa compilation
- [ "${ARCH}" = "hppa" ] && sed -i -e "s/-O4/-O1/" "${S}/configure"
-
- if use svga
- then
- echo
- einfo "Enabling vidix non-root mode."
- einfo "(You need a proper svgalib_helper.o module for your kernel"
- einfo " to actually use this)"
- echo
-
- mv "${WORKDIR}/svgalib_helper" "${S}/libdha"
- fi
-
- # Fix polish spelling errors
- [[ -n ${LINGUAS} ]] && sed -e 's:Zarządano:Zażądano:' -i help/help_mp-pl.h
-}
-
-src_compile() {
-
- local myconf=" --disable-tv-bsdbt848"
-
- # broken upstream, won't work with recent kernels
- myconf="${myconf} --disable-ivtv"
-
- # MPlayer reads in the LINGUAS variable from make.conf, and sets
- # the languages accordingly. Some will have to be altered to match
- # upstream's naming scheme.
- [[ -n $LINGUAS ]] && LINGUAS=${LINGUAS/da/dk}
-
- #####################
- # Optional features #
- #####################
- if use cpudetection || use livecd || use bindist
- then
- myconf="${myconf} --enable-runtime-cpudetection"
- fi
-
- if use unicode
- then
- myconf="${myconf} --charset=UTF-8"
- else
- myconf="${myconf} --disable-iconv"
- myconf="${myconf} --charset=noconv"
- fi
-
- # libcdio support: prefer libcdio over cdparanoia
- # don't check for cddb w/cdio
- if use cdio; then
- myconf="${myconf} --disable-cdparanoia"
- else
- myconf="${myconf} --disable-libcdio"
- use cdparanoia || myconf="${myconf} --disable-cdparanoia"
- use cddb || myconf="${myconf} --disable-cddb"
- fi
-
- use ass || myconf="${myconf} --disable-ass"
- use bidi || myconf="${myconf} --disable-fribidi"
- use bl && myconf="${myconf} --enable-bl"
- use enca || myconf="${myconf} --disable-enca"
- use ftp || myconf="${myconf} --disable-ftp"
- use nemesi || myconf="${myconf} --disable-nemesi"
- use nut || myconf="${myconf} --disable-libnut"
- use tivo || myconf="${myconf} --disable-vstream"
- use xscreensaver || myconf="${myconf} --disable-xss"
-
- # DVD support
- # dvdread and libdvdcss are internal libs
- # http://www.mplayerhq.hu/DOCS/HTML/en/dvd.html
- # You can optionally use external dvdread support, but against
- # upstream's suggestion. Normally, we don't, but we're using
- # external dvdread for dvdnav.
- # For this overlay ebuild, we're compiling both libdvdnav
- # and this mplayer against external dvdread.
- if ! use dvd; then
- myconf="${myconf} --disable-dvdnav --disable-dvdread"
- use a52 || myconf="${myconf} --disable-liba52"
- fi
- if use dvd && use dvdnav; then
- myconf="${myconf} --disable-dvdread-internal \
- --with-dvdread-config=/usr/bin/dvdread-config \
- --with-dvdnav-config=/usr/bin/dvdnav-config"
- fi
-
- if use encode ; then
- myconf="${myconf} --enable-mencoder"
- use dv || myconf="${myconf} --disable-libdv"
- use mp2 || myconf="${myconf} --disable-twolame --disable-toolame"
- use mp3 || myconf="${myconf} --disable-mp3lame --disable-mp3lame-lavc"
- use x264 || myconf="${myconf} --disable-x264"
- use xvid || myconf="${myconf} --disable-xvid --disable-xvid-lavc"
- else
- myconf="${myconf} --disable-mencoder --disable-libdv --disable-x264"
- fi
-
- if use !gtk && use !X && use !xv && use !xinerama; then
- myconf="${myconf} --disable-gui --disable-x11 --disable-xv \
- --disable-xmga --disable-xinerama --disable-vm --disable-xvmc"
- else
- #note we ain't touching --enable-vm. That should be locked down in the future.
- myconf="${myconf} $(use_enable gtk gui) $(use_enable gtk xshape) \
- $(use_enable X x11) $(use_enable xinerama) $(use_enable xv)"
- fi
-
- myconf="${myconf} $(use_enable joystick)"
- use lirc || myconf="${myconf} --disable-lirc --disable-lircc"
- use live || myconf="${myconf} --disable-live"
- myconf="${myconf} $(use_enable radio) $(use_enable radio radio-capture)"
- use ipv6 || myconf="${myconf} --disable-inet6"
- use rar || myconf="${myconf} --disable-unrarexec"
- use rtc || myconf="${myconf} --disable-rtc"
- use samba || myconf="${myconf} --disable-smb"
- myconf="${myconf} $(use_enable truetype freetype)"
- use truetype || myconf="${myconf} --disable-fontconfig"
-
- # DVB / Video4Linux / Radio support
- if { use dvb || use pvr || use v4l || use v4l2 || use radio; }; then
- use dvb || myconf="${myconf} --disable-dvb"
- use v4l || myconf="${myconf} --disable-tv-v4l1"
- use v4l2 || myconf="${myconf} --disable-tv-v4l2"
- use teletext || myconf="${myconf}"
- if use radio && { use dvb || use v4l || use v4l2; }; then
- myconf="${myconf} --enable-radio $(use_enable encode radio-capture)"
- else
- myconf="${myconf} --disable-radio-v4l2 --disable-radio-bsdbt848"
- fi
- else
- myconf="${myconf} --disable-tv --disable-tv-v4l1 --disable-tv-v4l2 \
- --disable-radio --disable-radio-v4l2 --disable-radio-bsdbt848 \
- --disable-dvb \
- --disable-pvr"
- fi
-
- ##########
- # Codecs #
- ##########
- for x in gif jpeg ladspa live musepack pnm speex theora xanim; do
- use ${x} || myconf="${myconf} --disable-${x}"
- done
- use aac || myconf="${myconf} --disable-faad-internal --enable-faad --enable-faac"
- use aac && use fpm && myconf="${myconf} --enable-faad-fixed"
- use dirac || myconf="${myconf} --disable-libdirac-lavc"
- use schroedinger || myconf="${myconf} --disable-libschroedinger-lavc"
- use dts || myconf="${myconf} --disable-libdca"
- ! use png && ! use gtk && myconf="${myconf} --disable-png"
- use lzo || myconf="${myconf} --disable-liblzo"
- use mpeg || myconf="${myconf} --disable-libmpeg2"
- use mp3 || myconf="${myconf} --disable-mp3lib --disable-mad"
- use vorbis || myconf="${myconf} --disable-libvorbis"
- use xanim && myconf="${myconf} --xanimcodecsdir=/usr/lib/xanim/mods"
- if use x86 || use amd64; then
- # Real codec support, only available on x86, amd64
- if use real ; then
- myconf="${myconf} --enable-real"
- else
- myconf="${myconf} --disable-real"
- fi
- if ! use livecd && ! use bindist ; then
- myconf="${myconf} $(use_enable win32codecs win32dll)"
- fi
- fi
- # bug 213836
- if ! use x86 || ! use win32codecs; then
- use quicktime || myconf="${myconf} --disable-qtx"
- fi
-
-
- ################
- # Video Output #
- ################
- use aalib || myconf="${myconf} --disable-aa"
- use dga || myconf="${myconf} --disable-dga1 --disable-dga2"
- use fbcon || myconf="${myconf} --disable-fbdev"
- use fbcon && use video_cards_s3virge && myconf="${myconf} --enable-s3fb"
- myconf="${myconf} $(use_enable directfb)"
- myconf="${myconf} $(use_enable ggi)"
- myconf="${myconf} $(use_enable libcaca caca)"
- myconf="${myconf} $(use_enable matrox mga)"
- myconf="${myconf} $(use_enable opengl gl)"
- myconf="${myconf} $(use_enable sdl)"
- use video_cards_vesa || myconf="${myconf} --disable-vesa"
- use vidix || myconf="${myconf} --disable-vidix --disable-vidix-pcidb"
- use zoran || myconf="${myconf} --disable-zr"
-
- if use xv; then
- if use xvmc; then
- myconf="${myconf} --enable-xvmc --with-xvmclib=XvMCW"
- else
- myconf="${myconf} --disable-xvmc"
- fi
- else
- myconf="${myconf} --disable-xv --disable-xvmc"
- fi
-
- if ! use kernel_linux && ! use video_cards_mga; then
- myconf="${myconf} --disable-mga --disable-xmga"
- fi
-
- if use video_cards_tdfx; then
- myconf="${myconf} $(use_enable video_cards_tdfx tdfxvid) \
- $(use_enable fbcon tdfxfb)"
- else
- myconf="${myconf} --disable-3dfx --disable-tdfxvid --disable-tdfxfb"
- fi
-
- ################
- # Audio Output #
- ################
- use alsa || myconf="${myconf} --disable-alsa"
- use arts || myconf="${myconf} --disable-arts"
- use esd || myconf="${myconf} --disable-esd"
- use jack || myconf="${myconf} --disable-jack"
- use mp3 || myconf="${myconf} --disable-mad"
- use nas || myconf="${myconf} --disable-nas"
- use openal || myconf="${myconf} --disable-openal"
- use oss || myconf="${myconf} --disable-ossaudio"
- use pulseaudio || myconf="${myconf} --disable-pulse"
-
- ####################
- # Advanced Options #
- ####################
- # Platform specific flags, hardcoded on amd64 (see below)
- if use x86 || use amd64 || use ppc; then
- if use cpudetection || use bindist; then
- myconf="${myconf} --enable-runtime-cpudetection"
- fi
- fi
- # Letting users turn off optimizations results in epic build fail
- # across the board. MPlayer's build system by default will
- # detect them and use them just fine, so don't let them change
- # them unless they really know what they are doing anyway.
- if use custom-cflags; then
- if use mmx; then
- for x in 3dnow 3dnowext mmxext sse sse2 ssse3; do
- use ${x} || myconf="${myconf} --disable-${x}"
- done
- else
- myconf="${myconf} --disable-mmx --disable-mmxext --disable-sse \
- --disable-sse2 --disable-ssse3 --disable-3dnow \
- --disable-3dnowext"
- fi
- fi
-
- use debug && myconf="${myconf} --enable-debug=3"
- myconf="${myconf} $(use_enable altivec)"
-
- if use custom-cflags; then
- # let's play the filtration game! MPlayer hates on all!
- strip-flags
- # ugly optimizations cause MPlayer to cry on x86 systems!
- if use x86 ; then
- replace-flags -O* -O2
- filter-flags -fPIC -fPIE
- use debug || append-flags -fomit-frame-pointer
- fi
- append-flags -D__STDC_LIMIT_MACROS
- else
- unset CFLAGS CXXFLAGS
- fi
-
- myconf="--cc=$(tc-getCC) \
- --host-cc=$(tc-getBUILD_CC) \
- --prefix=/usr \
- --confdir=/etc/mplayer \
- --datadir=/usr/share/mplayer \
- --libdir=/usr/$(get_libdir) \
- --enable-menu \
- ${myconf}"
- CFLAGS="${CFLAGS}" ./configure ${myconf} || die "configure died"
-
- emake || die "Failed to build MPlayer!"
- use doc && make -C DOCS/xml html-chunked
-}
-
-src_install() {
- make prefix=${D}/usr \
- BINDIR=${D}/usr/bin \
- LIBDIR=${D}/usr/$(get_libdir) \
- CONFDIR=${D}/usr/share/mplayer \
- DATADIR=${D}/usr/share/mplayer \
- MANDIR=${D}/usr/share/man \
- install || die "Failed to install MPlayer!"
-
- dodoc AUTHORS Changelog README etc/codecs.conf
- # Install the documentation; DOCS is all mixed up not just html
- if use doc ; then
- find "${S}/DOCS" -type d | xargs -- chmod 0755
- find "${S}/DOCS" -type f | xargs -- chmod 0644
- cp -r "${S}/DOCS" "${D}/usr/share/doc/${PF}/" || die "cp docs died"
- fi
-
- # Copy misc tools to documentation path, as they're not installed directly
- # and yes, we are nuking the +x bit.
- find "${S}/TOOLS" -type d | xargs -- chmod 0755
- find "${S}/TOOLS" -type f | xargs -- chmod 0644
- cp -r "${S}/TOOLS" "${D}/usr/share/doc/${PF}/" || die "cp tools died"
-
- # Install the default Skin and Gnome menu entry
- if use gtk; then
- dodir /usr/share/mplayer/skins
- cp -r "${WORKDIR}/productive" "${D}"/usr/share/mplayer/skins/default || die "cp skin died"
-
- # Fix the symlink
- rm -rf "${D}"/usr/bin/gmplayer
- dosym mplayer /usr/bin/gmplayer
-
- insinto /usr/share/pixmaps
- newins "${S}"/gui/mplayer/pixmaps/logo.xpm mplayer.xpm
- insinto /usr/share/applications
- doins "${FILESDIR}/mplayer.desktop"
- fi
-
- if ! use truetype || ! use unicode; then
- dodir /usr/share/mplayer/fonts
- local x=
- # Do this generic, as the mplayer people like to change the structure
- # of their zips ...
- for x in $(find ${WORKDIR}/ -type d -name 'font-arial-*')
- do
- cp -pPR ${x} "${D}"/usr/share/mplayer/fonts
- done
- # Fix the font symlink ...
- rm -rf "${D}"/usr/share/mplayer/font
- dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
- fi
-
- insinto /etc/mplayer
- newins "${S}"/etc/example.conf mplayer.conf
- dosed -e 's/fs=yes/fs=no/' /etc/mplayer.conf
- if use truetype && use unicode ; then
- cat >> "${D}"/etc/mplayer/mplayer.conf << EOT
-fontconfig=1
-subfont-osd-scale=4
-subfont-text-scale=3
-EOT
- fi
- dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
-
- # copy the midentify script to /usr/bin
- cp "${D}"/usr/share/doc/${PF}/TOOLS/midentify "${D}"/usr/bin
- chmod a+x "${D}"/usr/bin/midentify
-
- insinto /usr/share/mplayer
- doins "${S}"/etc/input.conf
- doins "${S}"/etc/menu.conf
-
- # add codec configuration for eac3
- use eac3 && cat "${FILESDIR}/eac3-id.conf" >> "${D}"/usr/share/mplayer/codecs.conf
-}
-
-pkg_preinst() {
-
- if [ -d "${ROOT}/usr/share/mplayer/Skin/default" ]
- then
- rm -rf "${ROOT}"/usr/share/mplayer/Skin/default
- fi
-}
-
-pkg_postrm() {
-
- # Cleanup stale symlinks
- if [ -L "${ROOT}"/usr/share/mplayer/font -a \
- ! -e "${ROOT}"/usr/share/mplayer/font ]
- then
- rm -f "${ROOT}"/usr/share/mplayer/font
- fi
-
- if [ -L "${ROOT}"/usr/share/mplayer/subfont.ttf -a \
- ! -e "${ROOT}"/usr/share/mplayer/subfont.ttf ]
- then
- rm -f "${ROOT}"/usr/share/mplayer/subfont.ttf
- fi
-}
diff --git a/media-video/mplayer/mplayer-9999.ebuild b/media-video/mplayer/mplayer-9999.ebuild
new file mode 100644
index 0000000..b9ddcf6
--- /dev/null
+++ b/media-video/mplayer/mplayer-9999.ebuild
@@ -0,0 +1,654 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20120405.ebuild,v 1.5 2012/05/05 08:58:52 jdhore Exp $
+
+EAPI=4
+
+EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
+ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
+[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
+
+inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
+
+IUSE="3dnow 3dnowext +a52 aalib +alsa altivec aqua +ass bidi bindist bl bluray
+bs2b cddb +cdio cdparanoia cpudetection debug dga
+directfb doc +dts +dv dvb +dvd +dvdnav dxr3 +enca +encode faac +faad fbcon
+ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
+libcaca libmpeg2 lirc +live lzo mad md5sum +mmx mmxext mng +mp3 nas
++network nut openal +opengl +osdmenu oss png pnm pulseaudio pvr +quicktime
+radio +rar +real +rtc rtmp samba +shm sdl +speex sse sse2 ssse3
+tga +theora +tremor +truetype +toolame +twolame +unicode v4l vdpau vidix
++vorbis win32codecs +X +x264 xanim xinerama +xscreensaver +xv +xvid xvmc
+zoran"
+
+VIDEO_CARDS="s3virge mga tdfx"
+for x in ${VIDEO_CARDS}; do
+ IUSE+=" video_cards_${x}"
+done
+
+FONT_URI="
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
+ mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
+"
+if [[ ${PV} == *9999* ]]; then
+ RELEASE_URI=""
+else
+ RELEASE_URI="mirror://gentoo/${P}.tar.xz"
+fi
+SRC_URI="${RELEASE_URI}
+ !truetype? ( ${FONT_URI} )"
+
+DESCRIPTION="Media Player for Linux"
+HOMEPAGE="http://www.mplayerhq.hu/"
+
+FONT_RDEPS="
+ virtual/ttf-fonts
+ media-libs/fontconfig
+ >=media-libs/freetype-2.2.1:2
+"
+X_RDEPS="
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+"
+# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
+# nemesi? ( net-libs/libnemesi )
+RDEPEND+="
+ sys-libs/ncurses
+ app-arch/bzip2
+ sys-libs/zlib
+ virtual/ffmpeg
+ !bindist? (
+ x86? (
+ win32codecs? ( media-libs/win32codecs )
+ )
+ )
+ a52? ( media-libs/a52dec )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ ass? ( >=media-libs/libass-0.9.10[enca?] )
+ bidi? ( dev-libs/fribidi )
+ bluray? ( >=media-libs/libbluray-0.2.1 )
+ bs2b? ( media-libs/libbs2b )
+ cdio? ( dev-libs/libcdio )
+ cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
+ dga? ( x11-libs/libXxf86dga )
+ directfb? ( dev-libs/DirectFB )
+ dts? ( media-libs/libdca )
+ dv? ( media-libs/libdv )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? ( >=media-libs/libdvdread-4.1.3 )
+ dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
+ encode? (
+ !twolame? ( toolame? ( media-sound/toolame ) )
+ twolame? ( media-sound/twolame )
+ faac? ( media-libs/faac )
+ mp3? ( media-sound/lame )
+ x264? ( >=media-libs/x264-0.0.20100423 )
+ xvid? ( media-libs/xvid )
+ )
+ enca? ( app-i18n/enca )
+ faad? ( media-libs/faad2 )
+ ggi? ( media-libs/libggi media-libs/libggiwmh )
+ gif? ( media-libs/giflib )
+ gsm? ( media-sound/gsm )
+ iconv? ( virtual/libiconv )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg )
+ jpeg2k? ( media-libs/openjpeg )
+ ladspa? ( media-libs/ladspa-sdk )
+ libcaca? ( media-libs/libcaca )
+ libmpeg2? ( media-libs/libmpeg2 )
+ lirc? ( app-misc/lirc )
+ live? ( media-plugins/live )
+ lzo? ( >=dev-libs/lzo-2 )
+ mad? ( media-libs/libmad )
+ mng? ( media-libs/libmng )
+ mp3? ( media-sound/mpg123 )
+ nas? ( media-libs/nas )
+ nut? ( >=media-libs/libnut-661 )
+ openal? ( media-libs/openal )
+ opengl? ( virtual/opengl )
+ png? ( media-libs/libpng )
+ pnm? ( media-libs/netpbm )
+ pulseaudio? ( media-sound/pulseaudio )
+ rar? (
+ || (
+ app-arch/unrar
+ app-arch/rar
+ )
+ )
+ rtmp? ( media-video/rtmpdump )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl )
+ speex? ( media-libs/speex )
+ theora? ( media-libs/libtheora[encode?] )
+ truetype? ( ${FONT_RDEPS} )
+ vdpau? ( x11-libs/libvdpau )
+ vorbis? ( media-libs/libvorbis )
+ X? ( ${X_RDEPS} )
+ xanim? ( media-video/xanim )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ xvmc? ( x11-libs/libXvMC )
+"
+
+X_DEPS="
+ x11-proto/videoproto
+ x11-proto/xf86vidmodeproto
+"
+ASM_DEP="dev-lang/yasm"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dga? ( x11-proto/xf86dgaproto )
+ dxr3? ( media-video/em8300-libraries )
+ X? ( ${X_DEPS} )
+ xinerama? ( x11-proto/xineramaproto )
+ xscreensaver? ( x11-proto/scrnsaverproto )
+ amd64? ( ${ASM_DEP} )
+ doc? (
+ dev-libs/libxslt app-text/docbook-xml-dtd
+ app-text/docbook-xsl-stylesheets
+ )
+ x86? ( ${ASM_DEP} )
+ x86-fbsd? ( ${ASM_DEP} )
+"
+
+SLOT="0"
+LICENSE="GPL-2"
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+else
+ KEYWORDS="~amd64"
+fi
+
+# faac codecs are nonfree, win32codecs are nonfree
+# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
+# dvd navigation requires dvd read support
+# ass and freetype font require iconv and ass requires freetype fonts
+# unicode transformations are usefull only with iconv
+# libvorbis require external tremor to work
+# radio requires oss or alsa backend
+# xvmc requires xvideo support
+REQUIRED_USE="bindist? ( !faac !win32codecs )
+ dvdnav? ( dvd )
+ ass? ( truetype )
+ truetype? ( iconv )
+ dxr3? ( X )
+ ggi? ( X )
+ xinerama? ( X )
+ dga? ( X )
+ opengl? ( X )
+ osdmenu? ( X )
+ vdpau? ( X )
+ vidix? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+ xvmc? ( xv )"
+
+PATCHES=(
+# "${FILESDIR}/ffmpeg.patch"
+# "${FILESDIR}/ffmpeg2.patch"
+ "${FILESDIR}/${PN}-1.0_rc4-pkg-config.patch"
+)
+
+pkg_setup() {
+ if [[ ${PV} == *9999* ]]; then
+ elog
+ elog "This is a live ebuild which installs the latest from upstream's"
+ elog "subversion repository, and is unsupported by Gentoo."
+ elog "Everything but bugs in the ebuild itself will be ignored."
+ elog
+ fi
+
+ if use cpudetection; then
+ ewarn
+ ewarn "You've enabled the cpudetection flag. This feature is"
+ ewarn "included mainly for people who want to use the same"
+ ewarn "binary on another system with a different CPU architecture."
+ ewarn "MPlayer will already detect your CPU settings by default at"
+ ewarn "buildtime; this flag is used for runtime detection."
+ ewarn "You won't need this turned on if you are only building"
+ ewarn "mplayer for this system. Also, if your compile fails, try"
+ ewarn "disabling this use flag."
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} = *9999* ]]; then
+ subversion_src_unpack
+ cd "${WORKDIR}"
+ rm -rf "${WORKDIR}/${P}/ffmpeg/"
+ ( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack )
+ cd "${S}"
+ cp "${FILESDIR}/dump_ffmpeg.sh" . || die
+ chmod +x dump_ffmpeg.sh
+ ./dump_ffmpeg.sh || die
+ else
+ unpack ${A}
+ fi
+
+ if ! use truetype; then
+ unpack font-arial-iso-8859-1.tar.bz2 \
+ font-arial-iso-8859-2.tar.bz2 \
+ font-arial-cp1250.tar.bz2
+ fi
+}
+
+src_prepare() {
+ local svf=snapshot_version
+ if [[ ${PV} = *9999* ]]; then
+ # Set SVN version manually
+ subversion_wc_info
+ printf "${ESVN_WC_REVISION}" > $svf
+ fi
+ [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
+ local sv=$(<$svf)
+ printf "SVN-r${sv} (Gentoo)" > VERSION
+
+ # fix path to bash executable in configure scripts
+ sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
+
+ base_src_prepare
+}
+
+src_configure() {
+ local myconf=""
+ local uses i
+
+ # set LINGUAS
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
+
+ # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
+ # compilation in almost every situation. The reason for this is
+ # because if --enable is used, it will force the build of that option,
+ # regardless of whether the dependency is available or not.
+
+ ###################
+ #Optional features#
+ ###################
+ # disable svga since we don't want it
+ # disable arts since we don't have kde3
+ # always disable internal ass
+ myconf+="
+ --disable-svga --disable-svgalib_helper
+ --disable-ass-internal
+ --disable-arts
+ --disable-kai
+ $(use_enable network networking)
+ $(use_enable joystick)
+ "
+ uses="ass bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild
+ myconf+=" --disable-nemesi" # nemesi automagic disable
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use bidi || myconf+=" --disable-fribidi"
+ use ipv6 || myconf+=" --disable-inet6"
+ use nut || myconf+=" --disable-libnut"
+ use rar || myconf+=" --disable-unrarexec"
+ use samba || myconf+=" --disable-smb"
+ use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir"
+
+ # libcdio support: prefer libcdio over cdparanoia
+ # don't check for cddb w/cdio
+ if use cdio; then
+ myconf+=" --disable-cdparanoia"
+ else
+ myconf+=" --disable-libcdio"
+ use cdparanoia || myconf+=" --disable-cdparanoia"
+ use cddb || myconf+=" --disable-cddb"
+ fi
+
+ ################################
+ # DVD read, navigation support #
+ ################################
+ #
+ # dvdread - accessing a DVD
+ # dvdnav - navigation of menus
+ #
+ # use external libdvdcss, dvdread and dvdnav
+ myconf+=" --disable-dvdread-internal --disable-libdvdcss-internal"
+ use dvd || myconf+=" --disable-dvdread"
+ use dvdnav || myconf+=" --disable-dvdnav"
+
+ #############
+ # Subtitles #
+ #############
+ #
+ # SRT/ASS/SSA (subtitles) requires freetype support
+ # freetype support requires iconv
+ # iconv optionally can use unicode
+ use truetype || myconf+=" --disable-freetype"
+ use iconv || myconf+=" --disable-iconv --charset=noconv"
+ use iconv && use unicode && myconf+=" --charset=UTF-8"
+
+ #####################################
+ # DVB / Video4Linux / Radio support #
+ #####################################
+ myconf+=" --disable-tv-bsdbt848"
+ # broken upstream, won't work with recent kernels
+ myconf+=" --disable-ivtv"
+ # gone since linux-headers-2.6.38
+ myconf+=" --disable-tv-v4l1"
+ if { use dvb || use v4l || use pvr || use radio; }; then
+ use dvb || myconf+=" --disable-dvb"
+ use pvr || myconf+=" --disable-pvr"
+ use v4l || myconf+=" --disable-tv-v4l2"
+ if use radio && { use dvb || use v4l; }; then
+ myconf+="
+ --enable-radio
+ $(use_enable encode radio-capture)
+ "
+ else
+ myconf+="
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ "
+ fi
+ else
+ myconf+="
+ --disable-tv
+ --disable-tv-v4l2
+ --disable-radio
+ --disable-radio-v4l2
+ --disable-radio-bsdbt848
+ --disable-dvb
+ --disable-v4l2
+ --disable-pvr"
+ fi
+
+ ##########
+ # Codecs #
+ ##########
+ myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support
+ myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2
+ use dts || myconf+=" --disable-libdca"
+ # Disable internal mp3lib, bug #384849
+ # Samuli Suominen: Looks like MPlayer in Portage is using internal mp3lib by
+ # default, where as mpg123 upstream has incorporated all the optimizations
+ # from mplayer's mp3lib in libmpg123 and more.
+ # It makes very little sense to use the internal copy as default anymore.
+ myconf+=" --disable-mp3lib"
+ if ! use mp3; then
+ myconf+="
+ --disable-mp3lame
+ --disable-mpg123
+ "
+ fi
+ uses="a52 bs2b dv gsm lzo rtmp"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-lib${i}"
+ done
+
+ uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora xanim"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use jpeg2k || myconf+=" --disable-libopenjpeg"
+ if use vorbis || use tremor; then
+ use tremor || myconf+=" --disable-tremor-internal"
+ use vorbis || myconf+=" --disable-libvorbis"
+ else
+ myconf+="
+ --disable-tremor-internal
+ --disable-tremor
+ --disable-libvorbis
+ "
+ fi
+ # Encoding
+ uses="faac x264 xvid toolame twolame"
+ if use encode; then
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ else
+ myconf+=" --disable-mencoder"
+ for i in ${uses}; do
+ myconf+=" --disable-${i}"
+ use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled."
+ done
+ fi
+
+ #################
+ # Binary codecs #
+ #################
+ # bug 213836
+ if ! use x86 || ! use win32codecs; then
+ use quicktime || myconf+=" --disable-qtx"
+ fi
+
+ ######################
+ # RealPlayer support #
+ ######################
+ # Realplayer support shows up in four places:
+ # - libavcodec (internal)
+ # - win32codecs
+ # - realcodecs (win32codecs libs)
+ # - realcodecs (realplayer libs)
+
+ # internal
+ use real || myconf+=" --disable-real"
+
+ # Real binary codec support only available on x86, amd64
+ if use real; then
+ use x86 && myconf+=" --codecsdir=/opt/RealPlayer/codecs"
+ use amd64 && myconf+=" --codecsdir=/usr/$(get_libdir)/codecs"
+ fi
+ myconf+=" $(use_enable win32codecs win32dll)"
+
+ ################
+ # Video Output #
+ ################
+ uses="directfb md5sum sdl"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use aalib || myconf+=" --disable-aa"
+ use fbcon || myconf+=" --disable-fbdev"
+ use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
+ use libcaca || myconf+=" --disable-caca"
+ use zoran || myconf+=" --disable-zr"
+
+ if ! use kernel_linux || ! use video_cards_mga; then
+ myconf+=" --disable-mga --disable-xmga"
+ fi
+
+ if use video_cards_tdfx; then
+ myconf+="
+ $(use_enable video_cards_tdfx tdfxvid)
+ $(use_enable fbcon tdfxfb)
+ "
+ else
+ myconf+="
+ --disable-3dfx
+ --disable-tdfxvid
+ --disable-tdfxfb
+ "
+ fi
+
+ # sun card, disable by default, see bug #258729
+ myconf+=" --disable-xvr100"
+
+ ################
+ # Audio Output #
+ ################
+ myconf+=" --disable-esd"
+ uses="alsa jack ladspa nas openal"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use pulseaudio || myconf+=" --disable-pulse"
+ if ! use radio; then
+ use oss || myconf+=" --disable-ossaudio"
+ fi
+
+ ####################
+ # Advanced Options #
+ ####################
+ # Platform specific flags, hardcoded on amd64 (see below)
+ use cpudetection && myconf+=" --enable-runtime-cpudetection"
+
+ uses="3dnow 3dnowext altivec mmx mmxext shm sse sse2 ssse3"
+ for i in ${uses}; do
+ myconf+=" $(use_enable ${i})"
+ done
+
+ use debug && myconf+=" --enable-debug=3"
+
+ if use x86 && gcc-specs-pie; then
+ filter-flags -fPIC -fPIE
+ append-ldflags -nopie
+ fi
+
+ ###########################
+ # X enabled configuration #
+ ###########################
+ myconf+=" --disable-gui"
+ myconf+=" --disable-vesa"
+ uses="dxr3 ggi vdpau xinerama xv"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use dga || myconf+=" --disable-dga1 --disable-dga2"
+ use opengl || myconf+=" --disable-gl"
+ use osdmenu && myconf+=" --enable-menu"
+ use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
+ use xscreensaver || myconf+=" --disable-xss"
+ use X || myconf+=" --disable-x11"
+ if use xvmc; then
+ myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
+ else
+ myconf+=" --disable-xvmc"
+ fi
+
+ ############################
+ # OSX (aqua) configuration #
+ ############################
+ if use aqua; then
+ myconf+="
+ --enable-macosx-finder
+ --enable-macosx-bundle
+ "
+ fi
+
+ tc-export PKG_CONFIG
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --host-cc="$(tc-getBUILD_CC)" \
+ --prefix="${EPREFIX}/usr" \
+ --bindir="${EPREFIX}/usr/bin" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --confdir="${EPREFIX}/etc/mplayer" \
+ --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
+ --mandir="${EPREFIX}/usr/share/man" \
+ --disable-ffmpeg_a \
+ ${myconf} || die
+}
+
+src_compile() {
+ base_src_compile
+ # Build only user-requested docs if they're available.
+ if use doc ; then
+ # select available languages from $LINGUAS
+ LINGUAS=${LINGUAS/zh/zh_CN}
+ local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
+ local BUILT_DOCS=""
+ for i in ${LINGUAS} ; do
+ has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
+ done
+ if [[ -z $BUILT_DOCS ]]; then
+ emake -j1 html-chunked
+ else
+ for i in ${BUILT_DOCS}; do
+ emake -j1 html-chunked-${i}
+ done
+ fi
+ fi
+}
+
+src_install() {
+ local i
+
+ emake \
+ DESTDIR="${D}" \
+ INSTALLSTRIP="" \
+ install
+
+ dodoc AUTHORS Changelog Copyright README etc/codecs.conf
+
+ docinto tech/
+ dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
+ docinto TOOLS/
+ dodoc -r TOOLS
+ if use real; then
+ docinto tech/realcodecs/
+ dodoc DOCS/tech/realcodecs/*
+ fi
+ docinto tech/mirrors/
+ dodoc DOCS/tech/mirrors/*
+
+ if use doc; then
+ docinto html/
+ dohtml -r "${S}"/DOCS/HTML/*
+ fi
+
+ if ! use truetype; then
+ dodir /usr/share/mplayer/fonts
+ # Do this generic, as the mplayer people like to change the structure
+ # of their zips ...
+ for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
+ cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
+ done
+ # Fix the font symlink ...
+ rm -rf "${ED}/usr/share/mplayer/font"
+ dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
+ fi
+
+ insinto /etc/mplayer
+ newins "${S}/etc/example.conf" mplayer.conf
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+# Config options can be section specific, global
+# options should go in the default section
+[default]
+_EOF_
+ doins "${S}/etc/input.conf"
+ if use osdmenu; then
+ doins "${S}/etc/menu.conf"
+ fi
+
+ if use truetype; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+fontconfig=1
+subfont-osd-scale=4
+subfont-text-scale=3
+_EOF_
+ fi
+
+ # bug 256203
+ if use rar; then
+ cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
+unrarexec=${EPREFIX}/usr/bin/unrar
+_EOF_
+ fi
+
+ dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
+ newbin "${S}/TOOLS/midentify.sh" midentify
+}
+
+pkg_preinst() {
+ [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
+ rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
+}
+
+pkg_postrm() {
+ # Cleanup stale symlinks
+ [ -L "${EROOT}/usr/share/mplayer/font" -a \
+ ! -e "${EROOT}/usr/share/mplayer/font" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/font"
+
+ [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
+ ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
+ rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
+}