Merge remote-tracking branch 'remotes/sbraz/bashcomp'
[gentoo.git] / dev-libs / confuse / confuse-2.8.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=6
6
7 inherit eutils multilib-minimal
8
9 DESCRIPTION="a configuration file parser library"
10 HOMEPAGE="http://www.nongnu.org/confuse/"
11 SRC_URI="https://github.com/martinh/libconfuse/releases/download/v${PV}/${P}.tar.xz"
12
13 LICENSE="ISC"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
16
17 IUSE="nls static-libs"
18
19 DEPEND="sys-devel/flex
20         sys-devel/libtool
21         virtual/pkgconfig
22         nls? ( sys-devel/gettext )"
23 RDEPEND="nls? ( virtual/libintl[${MULTILIB_USEDEP}] )"
24
25 DOCS=( AUTHORS )
26
27 src_prepare() {
28         rm doc/man/man3/_* || die
29
30         eapply_user
31         multilib_copy_sources
32 }
33
34 multilib_src_configure() {
35         # examples are normally compiled but not installed. They
36         # fail during a mingw crosscompile.
37         local ECONF_SOURCE=${BUILD_DIR}
38         econf \
39                 --enable-shared \
40                 --disable-examples \
41                 $(use_enable nls) \
42                 $(use_enable static-libs static)
43 }
44
45 multilib_src_install_all() {
46         prune_libtool_files
47
48         doman doc/man/man3/*.3
49         dodoc -r doc/html
50
51         docinto examples
52         dodoc examples/*.{c,conf}
53 }