summaryrefslogtreecommitdiff
blob: 165f09a1b178aaec56706d5357cd5311431abef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/manpages-es/manpages-es-1.55.ebuild,v 1.5 2005/07/31 13:19:39 ferdy Exp $

manpages=man-pages-es-${PV}
manpagesextra=man-pages-es-extra-0.8a

S1=${WORKDIR}/${manpages}
S2=${WORKDIR}/${manpagesextra}

DESCRIPTION="A somewhat comprehensive collection of Linux spanish man page translations"
SRC_URI="http://ditec.um.es/~piernas/manpages-es/${manpages}.tar.bz2
	http://ditec.um.es/~piernas/manpages-es/${manpagesextra}.tar.gz"
HOMEPAGE="http://ditec.um.es/~piernas/manpages-es/index.html"
IUSE="unicode"
KEYWORDS="alpha ~amd64 ~hppa ~ppc x86"

DEPEND=""
RDEPEND="sys-apps/man"
LICENSE="GPL-2"
SLOT="0"

src_compile() {
	# Default src_compile breaks
	:;
}

src_install() {
	local d f toencoding

	# Wipe useless files
	rm -f {${S1},${S2}}/man?/{LEAME,README}

	dodir /usr/share/man/es/man{1,2,3,4,5,6,7,8}

	useq unicode && toencoding=utf-8 || toencoding=iso8859-1

	# This is needed because manpages-es has broken encodings upstream
	for d in {${S1},${S2}} ; do
		cd ${d}
		file -i man?/* | while read f ; do
			iconv -f ${f##*=} \
				-t ${toencoding} ${d}/${f%%:*} \
				-o ${D}/usr/share/man/es/${f%%:*}
		done
	done
}