# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit rpm font # The Fedora folks don't call the package Lohit MY_PN="fonts-indic" MY_PV=${PV} MY_PR="1.fc7" # The first array represents the language directories in the tarball, and the # second is for the corresponding USE-expanded LINGUAS setting MY_LANGS=("bengali" "gujarati" "hindi" "kannada" "malayalam" "oriya" "punjabi" "tamil" "telugu") MY_LINGUAS=("linguas_bn" "linguas_gu" "linguas_hi" "linguas_kn" "linguas_ml" "linguas_or" "linguas_pa" "linguas_ta" "linguas_te") DESCRIPTION="The Lohit family of indic fonts" HOMEPAGE="http://fedoraproject.org/wiki/Lohit" LICENSE="GPL-2" SRC_URI="http://redhat.download.fedoraproject.org/pub/fedora/linux/core/development/source/SRPMS/${MY_PN}-${MY_PV}-${MY_PR}.src.rpm" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" for __lohit_linguas in $(seq 0 $((${#MY_LINGUAS[@]} - 1))); do IUSE="${IUSE} ${MY_LINGUAS[__lohit_linguas]}" done FONT_SUFFIX="ttf" pkg_setup() { local nolang=1 local i for i in $(seq 0 $((${#MY_LINGUAS[@]} - 1))); do if use ${MY_LINGUAS[i]}; then nolang=0 fi done if [ ${nolang} -eq 1 ]; then eerror "You must specify at least one language for which fonts are to" eerror "be installed. You can do this using the LINGUAS environment" eerror "variable (in the shell or in make.conf), or by setting the" eerror "appropriate USE flag (such as linguas_hi for Hindi)." eerror "The available languages are: ${MY_LANGS}" die fi } src_unpack() { rpm_src_unpack ${A} mv ${MY_PN}-${PV} ${P} cd ${P} for i in $(seq 0 $((${#MY_LINGUAS[@]} - 1))); do if use ${MY_LINGUAS[i]}; then mv -f ${MY_LANGS[i]}/*ttf . fi done } # Only installs fonts RESTRICT="strip binchecks"