dev-libs/libsodium: sparc stable wrt bug #599198
[gentoo.git] / dev-libs / libsodium / libsodium-1.0.10.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=6
6
7 inherit eutils autotools
8
9 DESCRIPTION="A portable fork of NaCl, a higher-level cryptographic library"
10 HOMEPAGE="https://github.com/jedisct1/libsodium"
11 SRC_URI="http://download.libsodium.org/${PN}/releases/${P}.tar.gz"
12
13 LICENSE="ISC"
14 SLOT="0/18"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
16 IUSE="+asm minimal static-libs +urandom cpu_flags_x86_sse4_1 cpu_flags_x86_aes"
17
18 PATCHES=( "${FILESDIR}"/${P}-cpuflags.patch )
19
20 src_prepare() {
21         default
22         eautoreconf
23 }
24
25 src_configure() {
26         local myconf
27
28         # --disable-pie needed on x86, bug #512734
29         use x86 && myconf="${myconf} --disable-pie"
30
31         econf \
32                 $(use_enable asm) \
33                 $(use_enable minimal) \
34                 $(use_enable !urandom blocking-random) \
35                 $(use_enable static-libs static) \
36                 $(use_enable cpu_flags_x86_sse4_1 sse4_1) \
37                 $(use_enable cpu_flags_x86_aes aesni) \
38                 ${myconf}
39 }
40
41 src_install() {
42         default
43         prune_libtool_files
44 }