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

inherit gnat versionator

IUSE=""

DESCRIPTION="XML library for Ada"
HOMEPAGE="http://libre.adacore.com/xmlada/"
SRC_URI="mirror://gentoo/${P}.tar.bz2"

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

DEPEND="virtual/gnat
	virtual/tetex
	sys-apps/texinfo
	>=sys-apps/sed-4"
RDEPEND=""

lib_compile()
{
	econf || die "econf failed"
	emake || die "make failed"
}

# NOTE: we are using $1 - the passed gnat profile name
lib_install() {
	make PREFIX=${DL} install || die "install failed"

	# fix xmlada-config hardsets locations
	sed -i -e "s:\${prefix}/include/xmlada:${AdalibSpecsDir}/${PN}:" \
		-e "s:\${prefix}/lib/xmlada:${AdalibLibTop}/$1/${PN}/lib:" \
		-e "s:\${prefix}/lib:${AdalibLibTop}/$1/${PN}/lib:g" \
		${DL}/bin/xmlada-config

	# now move stuff to proper location and delete extras
#	mv ${DL}/bin/xmlada-config ${DL}/lib/* ${DL}/include/${PN}/*.ali ${DL}
	rm -rf ${DL}/include ${DL}/share
}

src_install ()
{
	cd ${S}
	dodir ${AdalibSpecsDir}/${PN}
	insinto ${AdalibSpecsDir}/${PN}
	doins dom/*.ad? input_sources/*.ad? sax/*.ad? unicode/*.ad? schema/*.ad?

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

	gnat_src_install

	dodoc AUTHORS COPYING README TODO features
	dohtml docs/*.html
	doinfo docs/*.info
	# give a proper name to the info file
	mv ${D}/usr/share/info/xml.info.gz ${D}/usr/share/info/${PN}.info.gz
	insinto /usr/share/doc/${PF}
	doins docs/*.pdf distrib/xmlada_gps.py

	dodir /usr/share/doc/${PF}/examples
	insinto /usr/share/doc/${PF}/examples
	doins -r docs/{dom,sax,schema}
}