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

EAPI=7

inherit autotools multilib-minimal

DESCRIPTION="A free stand-alone ini file parsing library"
HOMEPAGE="http://ndevilla.free.fr/iniparser/"
SRC_URI="http://ndevilla.free.fr/iniparser/${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc examples"
# the tests are rather examples than tests, no point in running them
RESTRICT="test"

BDEPEND="doc? ( app-doc/doxygen )"

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

PATCHES=(
	"${FILESDIR}"/${PN}-3.0b-cpp.patch
	"${FILESDIR}"/${PN}-3.0-autotools.patch
	"${FILESDIR}"/${PN}-4.0-out-of-bounds-read.patch
)

src_prepare() {
	default
	eautoreconf
}

multilib_src_configure() {
	ECONF_SOURCE="${S}" econf \
		--disable-static
}

multilib_src_install_all() {
	if use doc; then
		emake -C doc
		HTML_DOCS=( html/. )
	fi

	einstalldocs

	if use examples; then
		docinto examples
		dodoc test/*.{c,ini,py}
		docompress -x /usr/share/doc/${PF}/examples
	fi

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