summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2012-02-13 11:14:48 +0000
committerAlexis Ballier <aballier@gentoo.org>2012-02-13 11:14:48 +0000
commit0b91a69773f72613f4ce5924acec23d40cbb81ac (patch)
tree96dbb0b64e442bff5b8b6b98f89dfe952e5a023b /media-video
parentVersion bump. (diff)
downloadhistorical-0b91a69773f72613f4ce5924acec23d40cbb81ac.tar.gz
historical-0b91a69773f72613f4ce5924acec23d40cbb81ac.tar.bz2
historical-0b91a69773f72613f4ce5924acec23d40cbb81ac.zip
bump a new snapshot, should fix bugs #402235 and #401315
Package-Manager: portage-2.2.0_alpha86/cvs/Linux x86_64 RepoMan-Options: --force
Diffstat (limited to 'media-video')
-rw-r--r--media-video/mplayer/ChangeLog8
-rw-r--r--media-video/mplayer/Manifest15
-rw-r--r--media-video/mplayer/files/ffmpeg.patch17
-rw-r--r--media-video/mplayer/mplayer-1.0_rc4_p20120213.ebuild649
4 files changed, 682 insertions, 7 deletions
diff --git a/media-video/mplayer/ChangeLog b/media-video/mplayer/ChangeLog
index b81c0b5404c2..cd1c48f2e301 100644
--- a/media-video/mplayer/ChangeLog
+++ b/media-video/mplayer/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-video/mplayer
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.838 2012/02/05 15:41:41 tomka Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.839 2012/02/13 11:14:48 aballier Exp $
+
+*mplayer-1.0_rc4_p20120213 (13 Feb 2012)
+
+ 13 Feb 2012; Alexis Ballier <aballier@gentoo.org>
+ +mplayer-1.0_rc4_p20120213.ebuild, +files/ffmpeg.patch:
+ bump a new snapshot, should fix bugs #402235 and #401315
05 Feb 2012; Thomas Kahle <tomka@gentoo.org>
mplayer-1.0_rc4_p20120128.ebuild:
diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest
index ca6904284d2c..5c8f03987301 100644
--- a/media-video/mplayer/Manifest
+++ b/media-video/mplayer/Manifest
@@ -1,7 +1,8 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
+Hash: SHA1
AUX dump_ffmpeg.sh 2494 RMD160 49af8d85dd18122496f32035864e0d87d6446140 SHA1 ca108f8ef69ff16e42faadaa0a6c64deed445d3e SHA256 1f29ad94e1910baba6183a40b8066df2c989f63cbd48f78dc4c6f3e3ccbde8e4
+AUX ffmpeg.patch 650 RMD160 1eff7d1cb9b39a3add2754cadba9441853ee7219 SHA1 280a253b707c4da5b1e3055c0502530a995160de SHA256 70170f747f6f26700394a7646c8258aab5dcd9b96c17cb797d9d6e7d7bb02f52
AUX mplayer-1.0_rc4_p20110322-gcc46.patch 657 RMD160 a327aa565f55102be2d6f73f12e08862418023e9 SHA1 560e41e7c5c147e8656ec0216f4272e1421e887c SHA256 4c57d5c4c79db87796b6b1b4a485f4d0a8ed95f3ae71040592a0bd5f3dc070b2
AUX mplayer-1.0_rc4_p20110322-sami_subtitle_parsing.patch 417 RMD160 d72bf30164ed6acfac7113ac4c78ff36ebce884e SHA1 4bb165cf52e176201dad512dd4a50cd04a08b228 SHA256 413876d32509c5e09df58b6f833036cb16d1073fcfecb17e0be9dc355d0e7160
AUX prepare_mplayer.sh 758 RMD160 008741cb14819858a7f08ba752d722ee44907666 SHA1 d60af28ae9025b1cd2f468701ab9732329a9ed38 SHA256 d8a92d83db920a3e47b864b24e78407c1ef5b2c523e91dceae2d96f5bcce435e
@@ -14,19 +15,21 @@ DIST mplayer-1.0_rc4_p20111215.tar.xz 5209748 RMD160 294a0a6aaf773c0c59e772e0595
DIST mplayer-1.0_rc4_p20120105.tar.xz 5212728 RMD160 53511facf6fac5b7923a6952d356f2e5a8cd232b SHA1 d6631a7ce2771df109b84d184bb5900a778137ae SHA256 2967a4ecbfbb1661db199368167460a61f7d78d74b05e1152f30cfadd12e8242
DIST mplayer-1.0_rc4_p20120109.tar.xz 5401772 RMD160 40d27e68caef3354ecb7b2e7b5d66fa5ec4fe4b7 SHA1 9c731450e66caab0f3c6f3aa653aa8a7b80353d7 SHA256 2f282b7b2f2f42bf8868e66f6a95745554b5dba7cadbe3781d6cd24538eb85d4
DIST mplayer-1.0_rc4_p20120128.tar.xz 5451004 RMD160 754dd2b7d112a888923cad52797d583e67cc3d5a SHA1 5b4a966d6f035d1aca1e116b79c99d1bf260f13c SHA256 ea8eea96889b1efe424db7b03fa3a426d4a9d11b3fe9fd4431c2ec5d053065a7
+DIST mplayer-1.0_rc4_p20120213.tar.xz 5451168 RMD160 ebfa2e7f4ab5bc180eea0b2206e6194d678befa5 SHA1 846ab4a7624987d30d64a546a78952fe6f36203d SHA256 28080ae63b282d717ad85a30ab8f481c1d965c8400621528ee87c7bc7d6bc890
EBUILD mplayer-1.0_rc4_p20110322-r1.ebuild 20381 RMD160 19bc9b09ce7902b4a7b16d5b5bd2215dc07a7f1e SHA1 08e9ca9249683695feab78ca3644dcfa1cc586b8 SHA256 1322ed59489cec383d7dac04c752cd083132c21711183e5bc02d70b2a525ab94
EBUILD mplayer-1.0_rc4_p20111215.ebuild 19483 RMD160 a9ab1ecb51f1c6535793726a8aebbc31285e59a1 SHA1 acbddba711723cc1f725ec5d706444622b6ad547 SHA256 7d02da4cd49e6097cba15204570d507ab09d6f4e2e1270eb749327b53650889d
EBUILD mplayer-1.0_rc4_p20120105.ebuild 17710 RMD160 67be98e8b2ff9b12e3b2cec11d59a2dfcdbb09ab SHA1 bd573c7d623910fdcc57636ced8ce46fc1717ae8 SHA256 6d2135854130be9f5dfeae100064cc638d2e8c3a6261d325dd83a8dec7fa1f92
EBUILD mplayer-1.0_rc4_p20120109.ebuild 17710 RMD160 d5b164cc0a61cc862327d6e939b34728315598d6 SHA1 6a05e6a273c88b47640f64dadc090a95e6746e2e SHA256 633de7ff43ec2f58cb95b171202704a07158dcfe1c73d80ac6555553e45617a8
EBUILD mplayer-1.0_rc4_p20120128.ebuild 17711 RMD160 a2e6f04ffb2648b77bd8b0e9abdc1a9bbda00f2c SHA1 24822bb1764e864ac96200b7ae1dec4cecb1d589 SHA256 8f279fe736268d54aa4a3bf817bcdfd27e2505a50b41630dfdda39b9ccd158d6
+EBUILD mplayer-1.0_rc4_p20120213.ebuild 17754 RMD160 bfbcaad5a8e7e496e267bb961dbadf2634f0d3ad SHA1 8a259224899b2fb0c2cd052fb46b9a3417fe52d2 SHA256 3ca9f49267b88e1d61c65a02321656339d206b9c60841b46c2315312358ce027
EBUILD mplayer-9999.ebuild 17740 RMD160 f545bd8f1946fffcecaddda52e3424783983877d SHA1 e871cac2610a47426f11b19096cd4669975b085e SHA256 3dd12c175745f89976449ae53ac0ee6fb7be8b7afebb934db1e3295e9818e530
-MISC ChangeLog 39469 RMD160 4511044bba4da24447a95c1d0f664cd734eedb9d SHA1 d0144d215fcea1192fe3ea4b95fb6e9f42a67a9e SHA256 9a20bf8194fba7b55d633dcc13718cf3109a880d31d758c0ffed70564d8c7b0e
+MISC ChangeLog 39684 RMD160 1563ac10d503f0c6c004afd6dd09bde96c21584e SHA1 c4e1a487f1310861bccbc32233fbcbac7b629025 SHA256 b8e88883b71d2a6c1e1c6e268fc899c65c85386346bfaacebd70c20665d3ceda
MISC ChangeLog-2008 107064 RMD160 146604862227a837d1f463a96af6fe94d17421bf SHA1 5a18c910edcf540877f3b803fc85a9b74b503dd2 SHA256 d9949e0e21fd6fd00f1417201455ee399240ef1010dcf56611ac0fc1f6f9505b
MISC metadata.xml 3737 RMD160 7e18b891f225227f4ecad678e423777f5dd908a7 SHA1 daf40e426abbf0306e2ebeca72ebe54546d81e46 SHA256 dd83a6946f62cbeb84b0e65d2ba6289638d632b80a690714595a44aa3cf86c1a
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
+Version: GnuPG v2.0.18 (GNU/Linux)
-iF4EAREIAAYFAk8uozoACgkQodBTJSDyo641OwD/ef77ofOS3hb8QTDzLsrb9ti4
-rwnSbbpjvVJZZdhjemcA/3TNUeDqrWDQPVtinlhBAPA/qoUW0kPcnBqarjkqtA6T
-=FeMD
+iEYEARECAAYFAk848K0ACgkQvFcC4BYPU0q8lgCfRZir8Q/99ipQQUNA3wCCrz8/
+1BsAnRXO9T32V0kOtsukOc/0rZizyikL
+=X0Ol
-----END PGP SIGNATURE-----
diff --git a/media-video/mplayer/files/ffmpeg.patch b/media-video/mplayer/files/ffmpeg.patch
new file mode 100644
index 000000000000..e438ead57439
--- /dev/null
+++ b/media-video/mplayer/files/ffmpeg.patch
@@ -0,0 +1,17 @@
+Some guards so that it can still build with ffmpeg 0.10
+
+Index: mplayer-1.0_rc4_p20120213/fmt-conversion.c
+===================================================================
+--- mplayer-1.0_rc4_p20120213.orig/fmt-conversion.c
++++ mplayer-1.0_rc4_p20120213/fmt-conversion.c
+@@ -65,8 +65,10 @@ static const struct {
+ {IMGFMT_RGBA, PIX_FMT_RGB0},
+ {IMGFMT_RGB64LE, PIX_FMT_RGBA64LE},
+ {IMGFMT_RGB64BE, PIX_FMT_RGBA64BE},
++#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 35, 101)
+ {IMGFMT_444A, PIX_FMT_YUVA444P},
+ #endif
++#endif
+ #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 20, 1)
+ {IMGFMT_GBR24P, PIX_FMT_GBRP},
+ #endif
diff --git a/media-video/mplayer/mplayer-1.0_rc4_p20120213.ebuild b/media-video/mplayer/mplayer-1.0_rc4_p20120213.ebuild
new file mode 100644
index 000000000000..bbb7fd2fd733
--- /dev/null
+++ b/media-video/mplayer/mplayer-1.0_rc4_p20120213.ebuild
@@ -0,0 +1,649 @@
+# 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_p20120213.ebuild,v 1.1 2012/02/13 11:14:48 aballier 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 esd 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
+ >=media-video/ffmpeg-0.10
+ !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? ( media-tv/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 )
+ )
+ esd? ( media-sound/esound )
+ 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}
+ dev-util/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="~amd64 ~hppa ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+else
+ KEYWORDS=""
+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" )
+
+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 #
+ ################
+ uses="alsa esd 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
+
+ ./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"
+}