summaryrefslogtreecommitdiff
blob: 00e743dba5afd9056cb9a700a447d0fae63238af (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-doc/NaturalDocs/NaturalDocs-1.22-r1.ebuild,v 1.5 2004/07/15 12:18:52 jmglov Exp $

DESCRIPTION="Extensible, multi-language source code documentation generator"
HOMEPAGE="http://www.naturaldocs.org/"
SRC_URI="mirror://sourceforge/naturaldocs/${P}.zip mirror://sourceforge/naturaldocs/${P}-Patch-3.zip"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ~ppc"

IUSE=""
RESTRICT="nomirror"

RDEPEND="dev-lang/perl"
DEPEND="${RDEPEND}"

src_unpack() {
	mkdir ${P} || die "could not create directory ${P}"
	cd ${P}
	unzip ${DISTDIR}/${P}.zip

	# See if we have a patch. If we have more than one, use the highest-
	# numbered one *only*
	local patch=`ls -r ${DISTDIR}/${P}-Patch-?.zip | head -n -1`

	# If we have a patch, it is actually a whole new Perl module. Just
	# unzip it over top of the original one.
	if [ -n "${patch}" ]; then
		einfo Applying patch: `basename ${patch}`
		unzip -o ${patch}
	fi
}

src_compile() {
	einfo "Nothing to compile"
}

src_install() {
	# Install Perl script, modules, and other supporting stuff
	dodir /usr/share/NaturalDocs
	cp -a NaturalDocs ${D}/usr/share/NaturalDocs/
	cp -ar Modules Project Styles ${D}/usr/share/NaturalDocs/

	# Make the Perl script executable
	chmod a+x ${D}/usr/share/NaturalDocs/NaturalDocs

	# Symlink the Perl script into /usr/bin
	dodir /usr/bin
	dosym /usr/share/NaturalDocs/NaturalDocs /usr/bin/NaturalDocs

	# Documentation
	dodoc *.txt
	dohtml -r Help/*
}