summaryrefslogtreecommitdiff
blob: 17f0a1594f78c55d031d33c1ac314f48b8bac02f (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/texinfo/texinfo-4.2-r5.ebuild,v 1.10 2002/12/09 04:37:27 manson Exp $

IUSE="nls build"

S="${WORKDIR}/${P}"
DESCRIPTION="The GNU info program and utilities"
SRC_URI="mirror://gnu/texinfo/${P}.tar.gz
	mirror://gentoo/distfiles/texinfo/${P}.tar.gz"
HOMEPAGE="http://www.gnu.org/software/texinfo/"

KEYWORDS="x86 ppc sparc  alpha"
SLOT="0"
LICENSE="GPL-2"

DEPEND="virtual/glibc 
	!build? ( >=sys-libs/ncurses-5.2-r2
	          nls? ( sys-devel/gettext ) )"
RDEPEND="virtual/glibc 
	!build? ( >=sys-libs/ncurses-5.2-r2 )"

src_unpack() {
	unpack ${A}

	cd ${S}/doc
	cp texinfo.txi texinfo.txi.orig
	sed -e 's:setfilename texinfo:setfilename texinfo.info:' \
		texinfo.txi.orig > texinfo.txi
	cp Makefile.in Makefile.in.orig
	sed -e 's:INFO_DEPS = texinfo:INFO_DEPS = texinfo.info:' \
		Makefile.in.orig > Makefile.in
}

src_compile() {
	local myconf=""
	if [ -z "`use nls`" ] || [ "`use build`" ] ; then
		myconf="--disable-nls"
	fi

	export WANT_AUTOMAKE_1_6=1
	./configure --host=${CHOST} \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		${myconf} || die
	
	make ${MAKEOPTS} || die 
}

src_install() {
	if [ "`use build`" ] ; then
		dobin makeinfo/makeinfo util/{install-info,texi2dvi,texindex}
	else
		make DESTDIR=${D} \
			infodir=/usr/share/info \
			install || die
			
		exeinto /usr/sbin
		doexe ${FILESDIR}/mkinfodir

		if [ ! -f ${D}/usr/share/info/texinfo.info ] ; then
			die "Could not install texinfo.info!!!"
		fi

		dodoc AUTHORS ChangeLog COPYING INTRODUCTION NEWS README TODO 
		docinto info
		dodoc info/README
		docinto makeinfo
		dodoc makeinfo/README
	fi
}