1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools flag-o-matic ltprune multilib-minimal
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"
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"
17 RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
19 doc? ( virtual/texi2dvi )"
22 "${FILESDIR}"/${PN}-1.6.1-uscore.patch
23 "${FILESDIR}"/${PN}-multilib-syspath.patch
26 MULTILIB_CHOST_TOOLS=(
27 /usr/bin/libgcrypt-config
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
44 $(use_enable o-flag-munging O-flag-munging)
45 $(use_enable static-libs static)
47 # disabled due to various applications requiring privileges
48 # after libgcrypt drops them (bug #468616)
49 --without-capabilities
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")
56 GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config"
58 ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
61 multilib_src_compile() {
63 multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
66 multilib_src_install() {
67 emake DESTDIR="${D}" install
68 multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
71 multilib_src_install_all() {