1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils multilib toolchain-funcs
9 DESCRIPTION="A free stand-alone ini file parsing library"
10 HOMEPAGE="https://github.com/ndevilla/iniparser"
11 SRC_URI="https://github.com/ndevilla/iniparser/archive/v${PV}.tar.gz -> ${P}.tar.gz"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
16 IUSE="doc examples static-libs"
18 DEPEND="doc? ( app-doc/doxygen )"
21 DOCS=( AUTHORS README.md )
24 "${FILESDIR}"/${P}-cflags.patch
25 "${FILESDIR}"/${P}-soname.patch
28 _newlib_so_with_symlinks() {
29 local source="${1}" base="${2}" current="${3}" revision="${4}" age="${5}"
30 local libdir="$(get_libdir)"
32 newlib.so ${source} ${base}.so.${current}.${revision}.${age}
33 for i in ".${current}" '' ; do
34 dosym ${base}.so.${current}.${revision}.${age} /usr/${libdir}/${base}.so${i}
39 epatch "${PATCHES[@]}"
44 emake CC="$(tc-getCC)" V=1
48 newlib.a lib${PN}.a lib${PN}${SLOT}.a
49 _newlib_so_with_symlinks lib${PN}.so lib${PN}${SLOT} 1 0 0
51 insinto /usr/include/${PN}${SLOT}
59 if use examples ; then
60 local examplesdir="/usr/share/doc/${PF}/examples"
61 insinto "${examplesdir}"
63 docompress -x "${examplesdir}"
70 emake -C test CC="$(tc-getCC)" V=1