dev-libs/libgpg-error: New upstream version 1.24
[gentoo.git] / dev-libs / libgpg-error / libgpg-error-1.21.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 inherit eutils libtool multilib-minimal toolchain-funcs
8
9 DESCRIPTION="Contains error handling functions used by GnuPG software"
10 HOMEPAGE="http://www.gnupg.org/related_software/libgpg-error"
11 SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
12
13 LICENSE="GPL-2 LGPL-2.1"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~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="common-lisp nls static-libs +threads"
17
18 RDEPEND="nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )
19         abi_x86_32? (
20                 !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
21                 !<=app-emulation/emul-linux-x86-baselibs-20131008-r12
22         )"
23 DEPEND="${RDEPEND}
24         nls? ( sys-devel/gettext )"
25
26 MULTILIB_CHOST_TOOLS=(
27         /usr/bin/gpg-error-config
28 )
29 MULTILIB_WRAPPED_HEADERS=(
30         /usr/include/gpg-error.h
31 )
32
33 src_prepare() {
34         epatch_user
35         elibtoolize
36 }
37
38 multilib_src_configure() {
39         local myeconfargs=(
40                 CC_FOR_BUILD=$(tc-getBUILD_CC)
41                 $(use_enable nls)
42                 $(use_enable static-libs static)
43                 $(use_enable threads)
44                 $(use_enable common-lisp languages)
45         )
46
47         multilib_is_native_abi || myeconfargs+=(
48                 --disable-languages
49         )
50
51         ECONF_SOURCE=${S} \
52                 econf "${myeconfargs[@]}"
53 }
54
55 multilib_src_install_all() {
56         einstalldocs
57
58         # library has no dependencies, so it does not need the .la file
59         prune_libtool_files --all
60 }