From: Chris White Date: Tue, 9 Nov 2004 22:15:45 +0000 (+0000) Subject: Lots of fancy bash scripting to make MPlayer deal with the normal (and proper) LINGUA... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dd99ada1262db7fd54cecb07bec0a08b93607699;p=gentoo.git Lots of fancy bash scripting to make MPlayer deal with the normal (and proper) LINGUAS format. Closes bug #49710. --- diff --git a/media-video/mplayer/ChangeLog b/media-video/mplayer/ChangeLog index 4c3a38712d8d..2beaf639ff73 100644 --- a/media-video/mplayer/ChangeLog +++ b/media-video/mplayer/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-video/mplayer # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.229 2004/11/09 15:17:49 chriswhite Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.230 2004/11/09 22:15:45 chriswhite Exp $ + + 10 Nov 2004; Chris White mplayer-1.0_pre5-r4.ebuild: + Lots of fancy bash scripting to make MPlayer deal with the normal (and proper) + LINGUAS format. Closes bug #49710. 10 Nov 2004; Chris White mplayer-1.0_pre5-r4.ebuild: Added a message about the alsa -ao format to postinstall. Closes bug #57256. diff --git a/media-video/mplayer/Manifest b/media-video/mplayer/Manifest index e76550037f97..e9dfc0534a44 100644 --- a/media-video/mplayer/Manifest +++ b/media-video/mplayer/Manifest @@ -1,12 +1,12 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 6e6e57f934807ae22f9fadd50105e1a8 ChangeLog 42659 +MD5 73a56cddc780c4889fb266a7d97d0bea ChangeLog 42857 MD5 31018765c8c65a239dba78a98c405543 metadata.xml 224 MD5 7b3d6f8c50162d684190424cf0204409 mplayer-1.0_pre4-r7.ebuild 12498 MD5 7f21528ccfbe447640072fedef9ed751 mplayer-1.0_pre5-r2.ebuild 14058 MD5 ce04980bd31a5121057431003181a885 mplayer-1.0_pre5-r3.ebuild 14889 -MD5 ee62ba08bf07cc15b082361b6adcc1ec mplayer-1.0_pre5-r4.ebuild 15476 +MD5 32a1efc7dd4de455b42ec51de3e89d8c mplayer-1.0_pre5-r4.ebuild 16981 MD5 1f9260386b063367f192b6d5d65d6aea files/real_demux.patch 3107 MD5 34f948b8f242a2aadb53a1e2b00e3155 files/vuln02-fix.diff 467 MD5 3e0467a312a41645fdc9e65b1caf6e83 files/digest-mplayer-1.0_pre5-r4 510 @@ -36,7 +36,7 @@ MD5 d77341e4aea32e3e992f01ce5cc12ae0 files/mplayer-1.0_pre5-r1-conf_locale.patch -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) -iD8DBQFBkN+yFdQwWVoAgN4RAq6oAKCfbv8NjL7v31C3VfrPosw1kjieNACg20DF -qVhSMYqXBrABeswINTK985I= -=on+K +iD8DBQFBkUGqFdQwWVoAgN4RAjv2AKCf+7Q+2GL42uBQ3tPFDYvvUYTjgwCg0IWG +MyjFcuDyUWAI25WshaQYtP8= +=U4s+ -----END PGP SIGNATURE----- diff --git a/media-video/mplayer/mplayer-1.0_pre5-r4.ebuild b/media-video/mplayer/mplayer-1.0_pre5-r4.ebuild index 607d1ea66dba..36df4ea401a7 100644 --- a/media-video/mplayer/mplayer-1.0_pre5-r4.ebuild +++ b/media-video/mplayer/mplayer-1.0_pre5-r4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_pre5-r4.ebuild,v 1.20 2004/11/09 15:17:49 chriswhite Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_pre5-r4.ebuild,v 1.21 2004/11/09 22:15:45 chriswhite Exp $ inherit eutils flag-o-matic kernel-mod @@ -166,8 +166,70 @@ src_unpack() { epatch ${FILESDIR}/${P}-bio2jack.patch } +linguas_warn() { + ewarn "Language ${LANG[0]} or ${LANG_CC} not avaliable" + ewarn "Language set to English" + ewarn "If this is a mistake, please set the" + ewarn "First LINGUAS language to one of the following" + ewarn "" + ewarn "bg - Bulgarian" + ewarn "cz - Czech" + ewarn "de - German" + ewarn "dk - Swedish" + ewarn "el - Greek" + ewarn "en - English" + ewarn "es - Spanish" + ewarn "fr - French" + ewarn "hu - Hungarian" + ewarn "ja - Japanese" + ewarn "ko - Korean" + ewarn "mk - FYRO Macedonian" + ewarn "nl - Dutch" + ewarn "no - Norwegian" + ewarn "pl - Polish" + ewarn "pt_BR - Portuguese - Brazil" + ewarn "ro - Romanian" + ewarn "ru - Russian" + ewarn "sk - Slovak" + ewarn "tr - Turkish" + ewarn "uk - Ukranian" + ewarn "zh_CN - Chinese - China" + ewarn "zh_TW - Chinese - Taiwan" + export LINGUAS="en ${LINGUAS}" +} + src_compile() { + # have fun with LINGUAS variable + if [[ -n $LINGUAS ]] + then + # LINGUAS has stuff in it, start the logic + LANG=( $LINGUAS ) + if [ -e ${S}/help/help_mp-${LANG[0]}.h ] + then + einfo "Setting MPlayer messages to language: ${LANG[0]}" + else + LANG_CC=${LANG[0]} + if [ ${#LANG_CC} -ge 2 ] + then + LANG_CC=${LANG_CC:0:2} + if [ -e ${S}/help/help_mp-${LANG_CC}.h ] + then + einfo "Setting MPlayer messages to language ${LANG_CC}" + export LINGUAS="${LANG_CC} ${LINGUAS}" + else + linguas_warn + fi + else + linguas_warn + fi + fi + else + # sending blank LINGUAS, make it default to en + einfo "No LINGUAS given, defaulting to English" + export LINGUAS="en ${LINGUAS}" + fi + # let's play the filtration game! MPlayer hates on all! filter-flags -fPIE -fPIC -fstack-protector -fforce-addr -momit-leaf-frame-pointer -msse2 -falign-functions