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

EAPI=6

inherit autotools

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

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}/${MY_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
}