summaryrefslogtreecommitdiff
blob: 987d077c4e88574497a66fa26e30efa8957c96da (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/mini-xml/mini-xml-2.5.ebuild,v 1.1 2008/06/22 20:53:28 darkside Exp $

inherit autotools multilib

MY_P="${P/mini-xml/mxml}"

DESCRIPTION="Mini-XML is a small XML parsing library that you can use to read XML and XML-like data files in your application without requiring large non-standard libraries."
HOMEPAGE="http://www.easysw.com/~mike/mxml"
SRC_URI="http://ftp.easysw.com/pub/mxml/${PV}/${MY_P}.tar.gz"

LICENSE="Mini-XML"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE=""

DEPEND="dev-util/pkgconfig"
RDEPEND=""

S="${WORKDIR}/${MY_P}"

src_test() {
	emake testmxml
}

src_unpack() {
	unpack ${A}
	cd "${S}"

	sed -i -e "s:755 -s:755:" Makefile.in || die "sed failed"
	sed -i "/^TARGETS/s: testmxml::" Makefile.in || "sed failed"
	rm configure
	eautoreconf
}

src_compile() {
	econf --enable-shared  --libdir="/usr/$(get_libdir)" --with-docdir="/usr/share/doc/${PF}/html"
	emake libmxml.a  libmxml.so.1.4 mxmldoc doc/mxml.man
}

src_install() {
	emake DSTROOT="${D}" install || die "install failed"
	dodoc ANNOUNCEMENT CHANGES README
	rm "${D}/usr/share/doc/${PF}/html/"{CHANGES,COPYING,README}
}

src_test() {
	make testmxml || die "make testmxml failed"
}