1 # Copyright 1999-2017 Gentoo Foundation
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 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
15 IUSE="doc static-libs"
17 RDEPEND=">=dev-libs/libgpg-error-1.12[${MULTILIB_USEDEP}]
19 !<=app-emulation/emul-linux-x86-baselibs-20131008-r19
20 !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
23 doc? ( virtual/texi2dvi )"
25 DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
28 "${FILESDIR}"/${PN}-1.6.1-uscore.patch
29 "${FILESDIR}"/${PN}-multilib-syspath.patch
32 MULTILIB_CHOST_TOOLS=(
33 /usr/bin/libgcrypt-config
41 multilib_src_configure() {
42 if [[ ${CHOST} == *86*-solaris* ]] ; then
43 # ASM code uses GNU ELF syntax, divide in particular, we need to
44 # allow this via ASFLAGS, since we don't have a flag-o-matic
45 # function for that, we'll have to abuse cflags for this
46 append-cflags -Wa,--divide
49 --disable-dependency-tracking
51 --disable-O-flag-munging
52 $(use_enable static-libs static)
54 # disabled due to various applications requiring privileges
55 # after libgcrypt drops them (bug #468616)
56 --without-capabilities
58 # http://trac.videolan.org/vlc/ticket/620
59 # causes bus-errors on sparc64-solaris
60 $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
61 $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
63 ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
66 multilib_src_compile() {
68 multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
71 multilib_src_install() {
72 emake DESTDIR="${D}" install
73 multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf