nettle-3.3.ebuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit autotools 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 ~sparc64-solaris ~x64-solaris ~x86-solaris"
  11. IUSE="doc +gmp neon static-libs test cpu_flags_x86_aes"
  12. DEPEND="gmp? ( >=dev-libs/gmp-5.0: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. DOCS=()
  23. HTML_DOCS=()
  24. pkg_setup() {
  25. use doc && DOCS+=(
  26. nettle.pdf
  27. )
  28. use doc && HTML_DOCS+=(
  29. nettle.html
  30. )
  31. }
  32. src_prepare() {
  33. default
  34. sed -e '/CFLAGS=/s: -ggdb3::' \
  35. -e 's/solaris\*)/sunldsolaris*)/' \
  36. -i configure.ac || die
  37. # conditionally build tests and examples required by tests
  38. use test || sed -i '/SUBDIRS/s/testsuite examples//' Makefile.in || die
  39. eautoreconf
  40. }
  41. multilib_src_configure() {
  42. # --disable-openssl bug #427526
  43. ECONF_SOURCE="${S}" econf \
  44. --libdir="${EPREFIX}"/usr/$(get_libdir) \
  45. --disable-openssl \
  46. --disable-fat \
  47. $(use_enable gmp public-key) \
  48. $(use_enable static-libs static) \
  49. $(tc-is-static-only && echo --disable-shared) \
  50. $(use_enable doc documentation) \
  51. $(use_enable neon arm-neon) \
  52. $(use_enable cpu_flags_x86_aes x86-aesni)
  53. }