dev-libs/leatherman: 1.12.0 stable amd64/x86 with cleanup
[gentoo.git] / dev-libs / libgpg-error / libgpg-error-1.36.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools libtool multilib-minimal toolchain-funcs prefix
7
8 DESCRIPTION="Contains error handling functions used by GnuPG software"
9 HOMEPAGE="http://www.gnupg.org/related_software/libgpg-error"
10 SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
11
12 LICENSE="GPL-2 LGPL-2.1"
13 SLOT="0"
14 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
15 IUSE="common-lisp nls static-libs"
16
17 RDEPEND="nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )"
18 DEPEND="${RDEPEND}"
19 BDEPEND="nls? ( sys-devel/gettext )"
20
21 MULTILIB_CHOST_TOOLS=(
22         /usr/bin/gpg-error-config
23 )
24 MULTILIB_WRAPPED_HEADERS=(
25         /usr/include/gpg-error.h
26         /usr/include/gpgrt.h
27 )
28
29 PATCHES=( "${FILESDIR}/${PN}-1.36-gawk5-support.patch" )
30
31 src_prepare() {
32         default
33         # only necessary for as long as we run eautoreconf, configure.ac
34         # uses ./autogen.sh to generate PACKAGE_VERSION, but autogen.sh is
35         # not a pure /bin/sh script, so it fails on some hosts
36         hprefixify -w 1 autogen.sh
37         eautoreconf
38 }
39
40 multilib_src_configure() {
41         local myeconfargs=(
42                 $(multilib_is_native_abi || echo --disable-languages)
43                 $(use_enable common-lisp languages)
44                 $(use_enable nls)
45                 $(use_enable static-libs static)
46                 --enable-threads
47                 CC_FOR_BUILD="$(tc-getBUILD_CC)"
48                 $("${S}/configure" --help | grep -o -- '--without-.*-prefix')
49         )
50         ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
51 }
52
53 multilib_src_install_all() {
54         einstalldocs
55         find "${ED}" -type f -name '*.la' -delete || die
56 }