1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools flag-o-matic 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 ~riscv s390 ~sh ~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 BDEPEND="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
43 --disable-dependency-tracking
45 $(use_enable o-flag-munging O-flag-munging)
46 $(use_enable static-libs static)
48 # disabled due to various applications requiring privileges
49 # after libgcrypt drops them (bug #468616)
50 --without-capabilities
52 # http://trac.videolan.org/vlc/ticket/620
53 # causes bus-errors on sparc64-solaris
54 $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
55 $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
57 GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config"
59 ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
60 $("${S}/configure" --help | grep -- '--without-.*-prefix' | sed -e 's/^ *\([^ ]*\) .*/\1/g')
63 multilib_src_compile() {
65 multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
68 multilib_src_install() {
69 emake DESTDIR="${D}" install
70 multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
73 multilib_src_install_all() {
75 find "${D}" -name '*.la' -delete || die