blob: 77705b4f55e9f5c2e745260c31a43d4aeee1b340 (
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-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
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/ada
virtual/latex-base
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 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}
}
|