nettle-3.2.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit autotools eutils multilib-build multilib-minimal multilib toolchain-funcs
  5. DESCRIPTION="Low-level cryptographic library"
  6. HOMEPAGE="http://www.lysator.liu.se/~nisse/nettle/"
  7. SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
  8. LICENSE="|| ( LGPL-3 LGPL-2.1 )"
  9. SLOT="0/6" # subslot = libnettle soname version
  10. KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x86-solaris"
  11. IUSE="doc +gmp neon static-libs test cpu_flags_x86_aes"
  12. DEPEND="gmp? ( dev-libs/gmp:0[${MULTILIB_USEDEP}] )"
  13. RDEPEND="${DEPEND}
  14. abi_x86_32? (
  15. !<=app-emulation/emul-linux-x86-baselibs-20131008-r17
  16. !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
  17. )"
  18. MULTILIB_WRAPPED_HEADERS=(
  19. /usr/include/nettle/nettle-stdint.h
  20. /usr/include/nettle/version.h
  21. )
  22. src_prepare() {
  23. default
  24. sed -e '/CFLAGS=/s: -ggdb3::' \
  25. -e 's/solaris\*)/sunldsolaris*)/' \
  26. -i configure.ac || die
  27. # conditionally build tests and examples required by tests
  28. use test || sed -i '/SUBDIRS/s/testsuite examples//' Makefile.in || die
  29. eautoreconf
  30. }
  31. multilib_src_configure() {
  32. # --disable-openssl bug #427526
  33. ECONF_SOURCE="${S}" econf \
  34. --libdir="${EPREFIX}"/usr/$(get_libdir) \
  35. --disable-openssl \
  36. --disable-fat \
  37. $(use_enable gmp public-key) \
  38. $(use_enable static-libs static) \
  39. $(tc-is-static-only && echo --disable-shared) \
  40. $(use_enable doc documentation) \
  41. $(use_enable neon arm-neon) \
  42. $(use_enable cpu_flags_x86_aes x86-aesni)
  43. }
  44. multilib_src_install_all() {
  45. einstalldocs
  46. if use doc ; then
  47. dohtml nettle.html
  48. dodoc nettle.pdf
  49. fi
  50. }