summaryrefslogtreecommitdiff
blob: 6a58f55a52bd37b0ce987bf0777c01ac02b02c05 (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
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit autotools

DESCRIPTION="A small XML parsing library that you can use to read XML data files or strings"
HOMEPAGE="https://github.com/michaelrsweet/mxml
	https://www.msweet.org/mxml/"
SRC_URI="https://github.com/michaelrsweet/mxml/releases/download/v${PV}/${P}.tar.gz"

KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
LICENSE="Mini-XML"
SLOT="0"
IUSE="static-libs test threads"

DEPEND="virtual/pkgconfig"

S="${WORKDIR}"

PATCHES=( "${FILESDIR}"/respect-users-flags.patch )

src_prepare() {
	default

	eautoconf
}

src_configure() {
	local myeconfopts=(
		$(use_enable threads)
	)

	econf "${myeconfopts[@]}"
}

src_compile() {
	emake libmxml.so.1.6 doc/mxml.man mxmldoc
}

src_test() {
	emake testmxml
}

src_install() {
	emake DSTROOT="${ED}" install

	if ! use static-libs; then
		rm "${ED%/}"/usr/$(get_libdir)/libmxml.a || die
	fi
}