summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2015-06-13 11:08:06 +0000
committerPacho Ramos <pacho@gentoo.org>2015-06-13 11:08:06 +0000
commit43ac3e9dccf452c9b2a6ff45719266fdb575f15b (patch)
tree55688fa087fa6ad204aa883f96c64de7bf369e01 /media-video
parentStable for ppc. Bug #551832. (diff)
downloadhistorical-43ac3e9dccf452c9b2a6ff45719266fdb575f15b.tar.gz
historical-43ac3e9dccf452c9b2a6ff45719266fdb575f15b.tar.bz2
historical-43ac3e9dccf452c9b2a6ff45719266fdb575f15b.zip
Let it work with pulseaudio-6.0, bug #549680 by Matthew Stapleton
Package-Manager: portage-2.2.20/cvs/Linux x86_64 Manifest-Sign-Key: 0xA188FBD4
Diffstat (limited to 'media-video')
-rw-r--r--media-video/mplayer/ChangeLog9
-rw-r--r--media-video/mplayer/Manifest10
-rw-r--r--media-video/mplayer/files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch33
-rw-r--r--media-video/mplayer/mplayer-1.2_pre20150214-r1.ebuild633
4 files changed, 680 insertions, 5 deletions
diff --git a/media-video/mplayer/ChangeLog b/media-video/mplayer/ChangeLog
index 36ec5c04deef..eab0c54c7a27 100644
--- a/media-video/mplayer/ChangeLog
+++ b/media-video/mplayer/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-video/mplayer
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.939 2015/05/29 04:44:15 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.940 2015/06/13 11:08:02 pacho Exp $
+
+*mplayer-1.2_pre20150214-r1 (13 Jun 2015)
+
+ 13 Jun 2015; Pacho Ramos <pacho@gentoo.org>
+ +files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch,
+ +mplayer-1.2_pre20150214-r1.ebuild:
+ Let it work with pulseaudio-6.0, bug #549680 by Matthew Stapleton
29 May 2015; Jeroen Roovers <jer@gentoo.org> mplayer-1.2_pre20150214.ebuild:
Stable for HPPA (bug #547668).
diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest
index 22eea407f35d..c83cca3ec736 100644
--- a/media-video/mplayer/Manifest
+++ b/media-video/mplayer/Manifest
@@ -12,6 +12,7 @@ AUX mplayer-1.1-planaraudio.patch 4832 SHA256 dea33823a30ca6bd8fc197254ceeb9902d
AUX mplayer-1.1.1-avcodecidsubrip.patch 678 SHA256 d19e3a37ebdeb34af160ef5e1f5fc67c36f79b373fb2dbacbd36c803da4bc5bd SHA512 881cda24e9d67cf56aefd570b79ef30293f7a85b025f290d622e8c1515f8066e440a61a9b49b34a92f0ae2bebbb7e7361a788c358d6e5575e09525dba88e5239 WHIRLPOOL 84239a770ce67dd339b4c46f4c354e1b1df392307da68509ba1abecdf1b754941bf5cc100e273945d9298dacaaae923b4154bd77d64d84009576741515778d81
AUX mplayer-1.1.1-codecidsubrip.patch 686 SHA256 8246822d9570e70e3e50bb640636764b666215770d6a15b01ce7362765f042d9 SHA512 1fa0d0d376b23d350f8d693c0f9fd5ad2ad7876621c2c0d713eba56f742cbc72209458d879fcd73466ccce45b5cf53f8ba9ef7f536b8998fa90e141dae0ed9fd WHIRLPOOL a59606991b6f9adb84a654fd9ee5e98255aa1f3b203ce77d8b142805880585f76cc62636cc9fb4dec755cb2850aadddac1f14a8f1f4aa9e28fde1489bfa2bffe
AUX mplayer-1.2_pre20130729-compat.patch 3005 SHA256 a66d27d0ae2b4222d2379179e8168e7cc6d16a62cfbdaf1281e138a9e021a2c7 SHA512 e78a51d6027d5657f5a878de54d853a8d50e45e47df3effc15948cbd6b1c0903076127aaaf851cb5d9e1e6a0c4a868819dbd4da2f0898d69bdc1cfb7a72245ad WHIRLPOOL 0ca442f532e8a99a4eef5631a022bd4b06a03cc73b89a81e2391778f22447e544f5389e7a6c3f0ac490c690ca4b92f576cad3f57fd05c02735e4ad757d09f471
+AUX mplayer-1.2_pre20150214-pulseaudio-6.0.patch 1138 SHA256 62b7df9842ac552eb781bbf8f9316a8a5117dca5b6ad59857e54b266bbed05ad SHA512 924f29590d7c898904a79afed307b12d0b9a2d32ff3272d27fa8476c6816465afc948161ea00de53ce090441e511a87c32e8b74d69fc62dffa8d9c91a2cfb836 WHIRLPOOL 1fc4d3c2a90722408d75985f1b2d5604c88e034bcb7b40223317f0e30b55d87bc28b24a18881f7c50bd3f215f0c3dd15e32e6c0b5765168b32fbc25503c582e4
AUX prepare_mplayer.sh 757 SHA256 ee4c0765b2cbab5bcc99408c4864669647fb0ad42517e0a51a6524c12b55804f SHA512 0add0707e15d58cee331fc82f884a44b29908c503f9ddcbb63dc01e237e2f457f599bae8644ce49f1af2cc7b3183529364ce30e6748889355c17cb96cecee71a WHIRLPOOL a4de2ff8e6ecfe66e41881664a84bc8ad91147e7b559e2ec334f9ad6671d9892de01bddfdba514b9c2b0589956b38d22fc8d2ce6ff00c267bded4bfb6c3ef6f0
DIST MPlayer-1.1.1.tar.xz 11202492 SHA256 ce8fc7c3179e6a57eb3a58cb7d1604388756b8a61764cc93e095e7aff3798c76 SHA512 06371d47b02caec83c7662f6bb4a827eafb7f3309f6cda959a0f49b647df031166a6e7c5d530b57b580104289ee260aa96f3f43cbfffcef816cea776b0d5aed0 WHIRLPOOL 3cd0f3845cd45961b778c384a322bc628cc9cd6fef3801b62389bd616a443ba5270c378a889412a7dc72d37ff26704d5d989d2c995a2a4a6540f6313ccacbb63
DIST font-arial-cp1250.tar.bz2 249705 SHA256 423a07e780bb130cd8e4730715545c5d919c248dda595aab7a0a01de3c83fd12 SHA512 4f77ff5ceb8ec6e5d9f8f34d8950a6a6276d1fd5a947772fcbdb6554988b1ea665c12b82f45164f91fb7bd08000cb4afc26fa35beb4c760464160e22b9b8c340 WHIRLPOOL d635f54be65b0ca1047d943b6f6da433cda9fce6ed74fcab993501cf7f6b443eb711e182cd7fff09e553d251b5fd1c60196aa22e8370cba99fa175ed5ecdb47f
@@ -23,15 +24,16 @@ DIST mplayer-1.2_pre20150214.tar.xz 5240936 SHA256 1b252ad20a77bc1ade022deaeb5e1
EBUILD mplayer-1.1.1-r1.ebuild 18462 SHA256 ded60f7a077b3ba72f79c5e55ab4c3f7bb4ed2193cc7b768ea430c4b132eac8f SHA512 1dd5bfc4ae154f2a9069e294ade5d101b5453cdb2b7f01e8bab86074e9297283916169f8d089b4eb09f17e367ad32df159237eae6d0a3817a377dd85efba9b60 WHIRLPOOL 20e69aa53fffce5ed840ae997b9e580260d26848acf4b8d10370d3f0c20f88241998c1df84fcc4cbfaf2bebb6002b35aee1db4545c6bef82af25736e4b4235a6
EBUILD mplayer-1.2_pre20130729.ebuild 17539 SHA256 a0bbece1cac73683ea38ede178dcd162a295453776f5543022d9e0b897ce6838 SHA512 f6dd9c0765d2f5b68dbda05f725a6b09e9bebfb0c309c1801398e9e66371e71f6bf8c77842ff1a594e1f822f2bdd8a368d8463fc754a5c929b2425636e7a6c29 WHIRLPOOL 3150dc24e5d091c8fa65c05b568b1bba760f40191d9676870ead1af39e1cb1dfbd681a5d040a24a0b601c3f17e6bbe6d3461bf5ba36a9d2cffba93beb0af880f
EBUILD mplayer-1.2_pre20141011.ebuild 17384 SHA256 fa1304335d694507f685cb87024dfd42ad3fa1a3d8adebecc6eb9d0d850cba16 SHA512 2b45978dcc2183f4a1cda1ee0b3a5edaab03753f6092ed2976ffad0df7ada8299d5e49e5c86d442c9cb6d2d1104bdf55cebb9887a2c4a88ccc5f7f482e354634 WHIRLPOOL b85d5326a11db4943e23c51cb371632c7beb60b619823eda1ae2b5d4456a6f92fe642669235714127a95dcfae0a739efa7ccde0fd1ee23b376d96bb39b81ff2a
+EBUILD mplayer-1.2_pre20150214-r1.ebuild 17467 SHA256 1a352b7048770d1134c08f5e4242bcd6d0a72709507f835fb9c83a965e7b9c56 SHA512 a41e6900dbc210ee69144691ddb45afa2b8bfc556b89c57265d0f5686a5ed1e82cff4c0d2459e78db613bff830dbec712a5308e7715a9ef807b52432ef0634cb WHIRLPOOL 434dda285e5de17820eba3d372fe45a7d056d6a23ee377e9f609c5bdeb12e99032f003872874ede311e16aac04e97e6762daccc29fe278cba958c518703783ca
EBUILD mplayer-1.2_pre20150214.ebuild 17307 SHA256 c7cd9ec8bf897cda10bf529cfe8bebb37169eab8f25a5ec954f345ac90ca15fe SHA512 19dc570b6547cd417a1b0277af4c48955a8e1e8fc340a40c150dc630f9d8705741f39de569d9fdc0b5197a3de901f4e509583981166e8ea13d9a8421050f2df5 WHIRLPOOL 4f384f8bd8e449f1cfab91fe773375e75b4486d674a2dff25bcc40c1faf5469f116460532c02276713c1ef1d09106bcfa823abd6cb638c9ee000788aba5cc5a9
EBUILD mplayer-9999.ebuild 17305 SHA256 d4a695dea61e7f446b4b0683d349d941b8b9d6b7a37f948c2004a1bd821d46f5 SHA512 70db2a61d8ffc061d98016b1f1dd34f9f4ba84d6bb2095a7e670198cbb8f25682a766124afac8b03369891333ddaba3edc9488ed02a4176d641c82aadc44e0fe WHIRLPOOL e6eb0bd8bf6fb99de2e31f3d6b6ddaa514863e66211313a371948095ad7afb2c299eaad5c5901297427a050ab303f04e5e42b41c34fd873816909381c1bfdba0
-MISC ChangeLog 55398 SHA256 1dea306087226b03dba1257d5e11ea221c6f9a0f2b9cfd2ba6f2b7b05d200a22 SHA512 917401743fb99cd2947bf73984d74ab34ecb721a7acbf34b735a83db8892648efc8c8ca8125b4ab897e2d24a07c41b6dd0362c74b42d958111a0c2aa676a253a WHIRLPOOL d1d038ef5164493cb51bd41ff00a3c223336d5b03816f9a43686997621c399ee95f443b23918d3a3d1cd6f293207ed820c20f358b40462622cd1194536496ffd
+MISC ChangeLog 55651 SHA256 fe6a27f208a9220e5bdeee0da7831e4ec24f726ed4bc82e9c52a8c89872449b2 SHA512 c2b43709e10490f9553d1093480e25092045662cb824eacbd690cbca02b7f26ad04fad1a14d501b10860d628a6737d53e9ae910bee7bb3cd9424d2ba03b9d4e6 WHIRLPOOL ca93a2b5dec260ed4fcc0b048cb0ee406987e617085e9d375e0ef899d2e82bea2d93a10cf851265b3ca5b30453d34ddcd2996ec349e8841072cca67ad901a5a7
MISC ChangeLog-2008 107064 SHA256 d9949e0e21fd6fd00f1417201455ee399240ef1010dcf56611ac0fc1f6f9505b SHA512 622543b379b4c44f5845566b4e697bd92dd3e864e2f01a1b0f303c8ae5c7fb5de24839f6503765d51b4a3bfa777d175a7e410383e62ef2bbacf3e87cdc28c705 WHIRLPOOL e731af47505ffa646c92386dfb14acaffc2bb14ab4da74520c0b4dbc15ca5c20aacadbb53c4b91ba8d126a75bf7d2fb61877eeda354064e20c48cf4137bf6a74
MISC metadata.xml 2494 SHA256 42d5b15b5dc7dba48769422e47023ede8909df10939cded423925888391bfcd6 SHA512 536240119b02f03666aeb2e4f21c01b6c1da55b740dbcdea868de2adacc09725b57baa84d20df3c5665b7d074ece67790134f63b4119d759c09a2e588c857c4f WHIRLPOOL 7275bd0762ef93bfb29953fc4e7d7c5df4b76bc816a9fe64696c265e1a9330cba34e117356ee2af746c1d06b3f0004d10e8c10ef6d49239b009b01a6179fbe53
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-iEYEAREIAAYFAlVn7qAACgkQVWmRsqeSphMKSACfdfsZMt9BbTbP53KIRpxcKiSf
-SPEAniOqZgnVXoov40R6SQRMwAlAU3uE
-=wHX3
+iEYEAREIAAYFAlV8DxYACgkQCaWpQKGI+9RrKQCdE3tfBmn6mqi1BqlTjvDv8gSS
+18oAnRTqqpvaVWrc+/IrqN8CWj0oQmT9
+=VUlR
-----END PGP SIGNATURE-----
diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch b/media-video/mplayer/files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch
new file mode 100644
index 000000000000..578d6fa52277
--- /dev/null
+++ b/media-video/mplayer/files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch
@@ -0,0 +1,33 @@
+diff -Naur mplayer-1.2_pre20150214/libao2/ao_pulse.c mplayer-1.2_pre20150214_2/libao2/ao_pulse.c
+--- mplayer-1.2_pre20150214/libao2/ao_pulse.c 2015-02-15 06:30:21.000000000 +1000
++++ mplayer-1.2_pre20150214_2/libao2/ao_pulse.c 2015-05-17 14:07:07.615640169 +1000
+@@ -53,6 +53,8 @@
+
+ static int broken_pause;
+
++static size_t bytes_per_sample;
++
+ LIBAO_EXTERN(pulse)
+
+ #define GENERIC_ERR_MSG(ctx, str) \
+@@ -201,6 +203,8 @@
+ }
+
+ pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_ALSA);
++ bytes_per_sample = af_fmt2bits(ao_data.format) / 8;
++ bytes_per_sample *= ao_data.channels;
+ ao_data.bps = pa_bytes_per_second(&ss);
+
+ if (!(mainloop = pa_threaded_mainloop_new())) {
+@@ -297,6 +301,11 @@
+
+ /** Play the specified data to the pulseaudio server */
+ static int play(void* data, int len, int flags) {
++ //Align length to frame size
++ len=len - (len % bytes_per_sample);
++ if (len==0) {
++ return 0;
++ }
+ pa_threaded_mainloop_lock(mainloop);
+ if (pa_stream_write(stream, data, len, NULL, 0, PA_SEEK_RELATIVE) < 0) {
+ GENERIC_ERR_MSG(context, "pa_stream_write() failed");
diff --git a/media-video/mplayer/mplayer-1.2_pre20150214-r1.ebuild b/media-video/mplayer/mplayer-1.2_pre20150214-r1.ebuild
new file mode 100644
index 000000000000..f96e6fca01d3
--- /dev/null
+++ b/media-video/mplayer/mplayer-1.2_pre20150214-r1.ebuild
@@ -0,0 +1,633 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.2_pre20150214-r1.ebuild,v 1.1 2015/06/13 11:08:02 pacho Exp $
+
+EAPI=5
+
+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="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray
+bs2b cddb +cdio cdparanoia cpudetection debug dga
+directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon
+ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
++libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas
++network nut openal opengl +osdmenu oss png pnm pulseaudio pvr
+radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3
+tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix
+vorbis +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=""
+elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then
+ MY_P="MPlayer-${PV}"
+ S="${WORKDIR}/${MY_P}"
+ RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz"
+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-2.0:0
+ a52? ( media-libs/a52dec )
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ 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:0 )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ ladspa? ( media-libs/ladspa-sdk )
+ libass? ( >=media-libs/libass-0.9.10:=[enca?] )
+ 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:0= )
+ 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?] )
+ tremor? ( media-libs/tremor )
+ truetype? ( ${FONT_RDEPS} )
+ vdpau? ( x11-libs/libvdpau )
+ vorbis? ( !tremor? ( 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 )
+ 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} )
+"
+RDEPEND+="
+ selinux? ( sec-policy/selinux-mplayer )
+"
+
+SLOT="0"
+LICENSE="GPL-2"
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+else
+ KEYWORDS="~hppa"
+fi
+
+# faac codecs 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
+# radio requires oss or alsa backend
+# xvmc requires xvideo support
+REQUIRED_USE="
+ dga? ( X )
+ dvdnav? ( dvd )
+ enca? ( iconv )
+ ggi? ( X )
+ libass? ( truetype )
+ opengl? ( X )
+ osdmenu? ( X )
+ truetype? ( iconv )
+ vdpau? ( X )
+ vidix? ( X )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+ xvmc? ( xv )"
+RESTRICT="faac? ( bindist )"
+
+PATCHES=(
+ # Work with pulseaudio-6, bug #549680, https://trac.mplayerhq.hu/ticket/2241
+ "${FILESDIR}"/${PN}-1.2_pre20150214-pulseaudio-6.0.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
+
+ if has_version 'media-video/libav' ; then
+ ewarn "Please note that upstream uses media-video/ffmpeg."
+ ewarn "media-video/libav should be fine in theory but if you"
+ ewarn "experience any problem, try to move to media-video/ffmpeg."
+ 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 )
+ else
+ unpack ${A}
+ fi
+
+ if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then
+ cd "${S}"
+ cp "${FILESDIR}/dump_ffmpeg.sh" . || die
+ chmod +x dump_ffmpeg.sh
+ ./dump_ffmpeg.sh || die
+ 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
+ if [ ! -f VERSION ] ; then
+ [ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?"
+ local sv=$(<$svf)
+ printf "SVN-r${sv} (Gentoo)" > VERSION
+ fi
+
+ # fix path to bash executable in configure scripts
+ sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die
+
+ base_src_prepare
+
+ # Use sane default for >=virtual/udev-197
+ sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die
+}
+
+src_configure() {
+ local myconf=""
+ local uses i
+
+ # set LINGUAS
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
+ [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968
+
+ # 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
+ # disable opus and ilbc since it only controls support in internal
+ # ffmpeg which we do not use
+ myconf+="
+ --disable-svga --disable-svgalib_helper
+ --disable-ass-internal
+ --disable-arts
+ --disable-kai
+ --disable-libopus
+ --disable-libilbc
+ $(use_enable network networking)
+ $(use_enable joystick)
+ "
+ uses="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 libass || myconf+=" --disable-ass"
+ 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 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"
+ if ! use mp3; then
+ myconf+="
+ --disable-mp3lame
+ --disable-mpg123
+ "
+ fi
+ uses="a52 bs2b dv gsm lzo rtmp vorbis"
+ 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 tremor xanim"
+ for i in ${uses}; do
+ use ${i} || myconf+=" --disable-${i}"
+ done
+ use jpeg2k || myconf+=" --disable-libopenjpeg"
+
+ # 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 #
+ #################
+ myconf+=" --disable-qtx --disable-real --disable-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 mmx mmxext sse sse2 ssse3"
+ for i in ${uses}; do
+ myconf+=" $(use_enable cpu_flags_x86_${i} ${i})"
+ done
+
+ uses="altivec shm"
+ 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="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
+ 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
+ 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"
+}