diff options
author | Julian Ospald <hasufell@gentoo.org> | 2015-08-11 01:40:43 +0200 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2015-08-11 01:46:53 +0200 |
commit | 6e387e4171d5f6e9bcae30beaea9a16fd6c5a06a (patch) | |
tree | 028d248b90c836eb53cd0a200096a7b2ef89e937 /dev-libs/libntru/libntru-0.4.1.ebuild | |
parent | net-im/dianara: version bump to 1.3.1 (diff) | |
download | gentoo-6e387e4171d5f6e9bcae30beaea9a16fd6c5a06a.tar.gz gentoo-6e387e4171d5f6e9bcae30beaea9a16fd6c5a06a.tar.bz2 gentoo-6e387e4171d5f6e9bcae30beaea9a16fd6c5a06a.zip |
dev-libs/libntru: version bump to 0.4.1
Diffstat (limited to 'dev-libs/libntru/libntru-0.4.1.ebuild')
-rw-r--r-- | dev-libs/libntru/libntru-0.4.1.ebuild | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/dev-libs/libntru/libntru-0.4.1.ebuild b/dev-libs/libntru/libntru-0.4.1.ebuild new file mode 100644 index 000000000000..522ed01bdd36 --- /dev/null +++ b/dev-libs/libntru/libntru-0.4.1.ebuild @@ -0,0 +1,63 @@ +# 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="examples static-libs" + +DEPEND="dev-lang/perl" + +src_prepare() { + multilib_copy_sources + + _copy_test_dir() { + cp -pr "${BUILD_DIR}" "${BUILD_DIR}-test" || die + } + multilib_foreach_abi _copy_test_dir +} + +multilib_src_compile() { + CFLAGS="${CFLAGS}" \ + emake \ + CC="$(tc-getCC)" \ + $(usex static-libs "libntru.a libntru.so" "") \ + MACHINE="$(if [[ ${ABI} == x86 ]] ; then echo i386 ; else echo x86_64 ; fi)" +} + +src_test() { + _test() { + CFLAGS="${CFLAGS}" \ + emake CC="$(tc-getCC)" test -j1 -C "${BUILD_DIR}-test" \ + MACHINE="$(if [[ ${ABI} == x86 ]] ; then echo i386 ; else echo x86_64 ; fi)" + + } + + multilib_foreach_abi _test +} + +multilib_src_install() { + emake \ + DESTDIR="${ED}" \ + INST_LIBDIR="/usr/$(get_libdir)" \ + INST_DOCDIR="/usr/share/doc/${PF}" \ + MACHINE="$(if [[ ${ABI} == x86 ]] ; then echo i386 ; else echo x86_64 ; fi)" \ + install $(usex static-libs install-static-lib "") +} + +multilib_src_install_all() { + einstalldocs + if use examples ; then + docinto examples + dodoc src/hybrid.c + fi +} |