summaryrefslogtreecommitdiff
blob: f973f45b72e43241a68e61d373a02ac1d638560f (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
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

DESCRIPTION="A C-library for parsing and writing XML 1.0/1.1 files or streams"
HOMEPAGE="https://www.autistici.org/bakunin/libnxml/doc/"
SRC_URI="https://www.autistici.org/bakunin/${PN}/${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~arm ~mips ~ppc ~sparc ~x86"
IUSE="doc examples"

RDEPEND="net-misc/curl"
DEPEND="${RDEPEND}"
BDEPEND="doc? ( app-doc/doxygen )"

src_prepare() {
	default

	# Fix lib dir in installed pkgconfig file
	sed -i -e "s:\${exec_prefix}/lib:\${exec_prefix}/$(get_libdir):" nxml.pc.in \
		|| die "Failed to correct pkgconfig file"
}

src_configure() {
	econf --disable-static
}

src_compile() {
	default

	if use doc; then
		ebegin "Creating documentation"
		doxygen doxy.conf || die "generating docs failed"
		# clean out doxygen gunk
		rm doc/html/*.{md5,map} || die
		HTML_DOCS=( doc/html/. )
		eend 0
	fi
}

src_install() {
	default

	if use examples; then
		docinto test
		dodoc test/*.c
	fi

	# no static archives
	find "${D}" -name '*.la' -delete || die
}