summaryrefslogtreecommitdiff
blob: f36fc6edfeca6d911176068eddf90e73c9e1d694 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="5"

inherit base eutils multilib-build git-2

DESCRIPTION="A portable fork of NaCl, a higher-level cryptographic library"
HOMEPAGE="https://github.com/jedisct1/libsodium"
SRC_URI=""

EGIT_REPO_URI="https://github.com/jedisct1/libsodium"
EGIT_BOOTSTRAP="./autogen.sh"

LICENSE="ISC"
SLOT="0"
KEYWORDS=""
IUSE="+asm +urandom"

src_prepare() {
	epatch_user
	multilib_copy_sources
}

sodium_src_configure() {
	cd "${BUILD_DIR}"

	econf \
			$(use_enable asm) \
			$(use_enable !urandom blocking-random)
}

sodium_src_compile() {
	cd "${BUILD_DIR}"
	base_src_compile
}

sodium_src_install() {
	cd "${BUILD_DIR}"
	base_src_install
}

src_configure() {
	multilib_parallel_foreach_abi sodium_src_configure
}

src_compile() {
	multilib_foreach_abi sodium_src_compile
}

src_install() {
	multilib_foreach_abi sodium_src_install
	multilib_check_headers
}