# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION=".lng files for the Opera web browser" HOMEPAGE="http://www.opera.com/download/languagefiles/?platform=linux" SLOT="0" LICENSE="OPERA-9.0" KEYWORDS="~x86" RESTRICT="nomirror" OPERA_URI="http://www.opera.com/download/lng/" DEPEND="www-client/opera" RDEPEND="${DEPEND}" LANGS="bg cs zh-cn zh-tw hr da nl en-GB en-US fi fr fr-CA fy ka de el hu it ja ko lt nn nb pl pt pt-BR pa ru es-LA es-ES sv tr" for X in ${LANGS} ; do X_LOWER="$(echo ${X} | tr "[:upper:]" "[:lower:]")" SRC_URI="${SRC_URI} linguas_${X_LOWER}? ( ${OPERA_URI}${PV/.}/ouw${PV/.}_${X}.lng )" IUSE="${IUSE} linguas_${X_LOWER} " done # All American Spanish linguas: for X in cl co do ec gt hn mx pa pe pr py sv us uy ve; do SRC_URI="${SRC_URI} linguas_es-${X}? ( ${OPERA_URI}${PV/.}/ouw${PV/.}_es-LA.lng )" IUSE="${IUSE} linguas_es-${X} " done S="${WORKDIR}" src_unpack() { true } src_install() { local X cd ${S} insinto /opt/opera/share/opera/locale for X in ${A}; do doins ${DISTDIR}/${X} done } pkg_postinst() { elog "To set the language file in Opera, choose Preferences in the Tools menu." elog "On the \"General\" tab, click on the \"Details\" button. Click on the \"Choose\" " elog "button and select one of the files in /opt/opera/share/opera/locale." elog "Click on \"Open\", then twice on \"OK\", and you're done." }