summaryrefslogtreecommitdiff
blob: 178cca15d06f3033136993f93b4e259f4026dd81 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-ada/adadoc/adadoc-2.1.ebuild,v 1.4 2007/07/15 04:21:59 mr_bones_ Exp $

inherit eutils gnat

DESCRIPTION="A tool for Ada95 to create documentation from specification packages."

HOMEPAGE="http://adadoc.sourceforge.net"

SRC_URI="mirror://sourceforge/adadoc/${PN}-v${PV}.src.tar.bz2
	mirror://sourceforge/adadoc/UserGuide.pdf
	mirror://sourceforge/adadoc/HowToWriteModule.pdf"

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

IUSE=""

DEPEND="virtual/gnat
	>=dev-ada/xmlada-1.0-r2"

RDEPEND=""

S=${WORKDIR}/dev

lib_compile() {
	${ADAMAKE} adadoc -Itools -Iparser -Imodules -cargs ${ADACFLAGS} -bargs -shared \
		`xmlada-config` ||  die
}

lib_install() {
	cp adadoc ${DL}
}

src_install() {
	#set up environment
	echo "PATH=%DL%" > ${LibEnv}
	echo "LDPATH=%DL%" >> ${LibEnv}
	echo "ADA_OBJECTS_PATH=%DL%" >> ${LibEnv}
	echo "ADA_INCLUDE_PATH=/usr/include/ada/${PN}" >> ${LibEnv}

	gnat_src_install

	insinto /usr/share/doc/adadoc-${PV}
	doins ${DISTDIR}/UserGuide.pdf
	doins ${DISTDIR}/HowToWriteModule.pdf
	insinto /usr/share/adadoc
	doins adadoc_tags.cfg
}

pkg_postinst() {
	eselect gnat update
	elog "The environment has been set up to make gnat automatically find files for"
	elog "${PN}. In order to immediately activate these settings please do:"
	elog "env-update && source /etc/profile"
	elog "Otherwise the settings will become active next time you login"
}