| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/app-text/iso-codes/iso-codes-3.30.ebuild,v 1.8 2012/03/25 14:52:47 armin76 Exp $ |
| 4 |
|
| 5 |
EAPI="4" |
| 6 |
|
| 7 |
inherit eutils |
| 8 |
|
| 9 |
DESCRIPTION="Provides the list of country and language names" |
| 10 |
HOMEPAGE="http://alioth.debian.org/projects/pkg-isocodes/" |
| 11 |
SRC_URI="http://pkg-isocodes.alioth.debian.org/downloads/${P}.tar.bz2" |
| 12 |
|
| 13 |
LICENSE="LGPL-2.1" |
| 14 |
SLOT="0" |
| 15 |
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris" |
| 16 |
IUSE="" |
| 17 |
|
| 18 |
RDEPEND="" |
| 19 |
DEPEND="sys-devel/gettext" |
| 20 |
|
| 21 |
# This ebuild does not install any binaries |
| 22 |
RESTRICT="binchecks strip" |
| 23 |
|
| 24 |
src_prepare() { |
| 25 |
local linguas_bak=${LINGUAS} |
| 26 |
local mylinguas="" |
| 27 |
|
| 28 |
for norm in iso_15924 iso_3166 iso_3166_2 iso_4217 iso_639 iso_639_3; do |
| 29 |
einfo "Preparing ${norm}" |
| 30 |
|
| 31 |
mylinguas="" |
| 32 |
LINGUAS=${linguas_bak} |
| 33 |
strip-linguas -i "${S}/${norm}" |
| 34 |
|
| 35 |
for loc in ${LINGUAS}; do |
| 36 |
mylinguas="${mylinguas} ${loc}.po" |
| 37 |
done |
| 38 |
|
| 39 |
if [ -n "${mylinguas}" ]; then |
| 40 |
sed -e "s:pofiles =.*:pofiles = ${mylinguas}:" \ |
| 41 |
-e "s:mofiles =.*:mofiles = ${mylinguas//.po/.mo}:" \ |
| 42 |
-i "${S}/${norm}/Makefile.am" "${S}/${norm}/Makefile.in" \ |
| 43 |
|| die "sed in ${norm} folder failed" |
| 44 |
fi |
| 45 |
done |
| 46 |
} |
| 47 |
|
| 48 |
src_install() { |
| 49 |
default |
| 50 |
dodoc ChangeLog README TODO || die "dodoc failed" |
| 51 |
} |