dev-qt/qttest: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / dev-libs / libgcrypt / libgcrypt-1.8.3-r1.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 flag-o-matic multilib-minimal
7
8 DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
9 HOMEPAGE="http://www.gnupg.org/"
10 SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
11
12 LICENSE="LGPL-2.1 MIT"
13 SLOT="0/20" # subslot = soname major version
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~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="doc o-flag-munging static-libs"
16
17 RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
18 DEPEND="${RDEPEND}"
19 BDEPEND="doc? ( virtual/texi2dvi )"
20
21 PATCHES=(
22         "${FILESDIR}"/${PN}-1.6.1-uscore.patch
23         "${FILESDIR}"/${PN}-multilib-syspath.patch
24 )
25
26 MULTILIB_CHOST_TOOLS=(
27         /usr/bin/libgcrypt-config
28 )
29
30 src_prepare() {
31         default
32         eautoreconf
33 }
34
35 multilib_src_configure() {
36         if [[ ${CHOST} == *86*-solaris* ]] ; then
37                 # ASM code uses GNU ELF syntax, divide in particular, we need to
38                 # allow this via ASFLAGS, since we don't have a flag-o-matic
39                 # function for that, we'll have to abuse cflags for this
40                 append-cflags -Wa,--divide
41         fi
42         local myeconfargs=(
43                 --enable-noexecstack
44                 $(use_enable o-flag-munging O-flag-munging)
45                 $(use_enable static-libs static)
46
47                 # disabled due to various applications requiring privileges
48                 # after libgcrypt drops them (bug #468616)
49                 --without-capabilities
50
51                 # http://trac.videolan.org/vlc/ticket/620
52                 # causes bus-errors on sparc64-solaris
53                 $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
54                 $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
55
56                 GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config"
57         )
58         ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
59                 $("${S}/configure" --help | grep -- '--without-.*-prefix' | sed -e 's/^ *\([^ ]*\) .*/\1/g')
60 }
61
62 multilib_src_compile() {
63         default
64         multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
65 }
66
67 multilib_src_install() {
68         emake DESTDIR="${D}" install
69         multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
70 }
71
72 multilib_src_install_all() {
73         default
74         find "${D}" -name '*.la' -delete || die
75 }