summaryrefslogtreecommitdiff
blob: 0fd96e42da7d4ed2bcd23f112454e2d477d77d30 (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit eutils toolchain-funcs multilib multilib-minimal

DESCRIPTION="C Implementation of NTRUEncrypt"
HOMEPAGE="https://github.com/tbuktu/libntru"
SRC_URI="https://github.com/tbuktu/libntru/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

src_prepare() {
	epatch "${FILESDIR}"/01-${P}-fix-build-on-macosx.patch \
		"${FILESDIR}"/02-${P}-add-warnings.patch \
		"${FILESDIR}"/03-${P}-install-rules.patch \
		"${FILESDIR}"/04-${P}-respect-flags.patch \
		"${FILESDIR}"/05-${P}-fix-memory-leak.patch

	multilib_copy_sources
}

multilib_src_compile() {
	emake CC="$(tc-getCC)"
}

multilib_src_install() {
	emake \
		DESTDIR="${ED}" \
		INST_LIBDIR="/usr/$(get_libdir)" \
		INST_DOCDIR="/usr/share/doc/${PF}" \
		install
}