diff options
-rw-r--r-- | dev-libs/libntru/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/libntru/libntru-0.4.1.ebuild | 63 |
2 files changed, 64 insertions, 0 deletions
diff --git a/dev-libs/libntru/Manifest b/dev-libs/libntru/Manifest index 84817df976c6..504f9100e65d 100644 --- a/dev-libs/libntru/Manifest +++ b/dev-libs/libntru/Manifest @@ -1,2 +1,3 @@ DIST libntru-0.2.tar.gz 49832 SHA256 bc1d10dcd1755f836d4696b734ecc4bc8b047b7ea40d857657c03ecb31ac141f SHA512 4de4cc550fb74d53a26f1b6f94d27d6131756ab7f1b62ce5f1845e6e626581a357004efbd92881d1e180d75f4a92ec97e3c30926dcdf6ea23d87f1da81809f3a WHIRLPOOL 5e96d55f56f608e5ca24506bc8a122d2dff62c61fc0dab847913456d84d36fe13d615c8910b3915c0aa3881a236aaae45725842f9d062183906162df352fd396 DIST libntru-0.3.tar.gz 53364 SHA256 9ce6b6a20ca304c09d2ff853e3b5762880a8cb85728113b26eb8ca2e915e2a0a SHA512 b99fecf21104f73246a9494dce6caa6742b7a2e5219e9b2a46d639d3181588bb1580c0b03209f150e9294f721d2e1179157be0eab52f25b2664c1451aaae8712 WHIRLPOOL 1545da85003e0466354767388252a67d5ac9cb457e94baf9ed1862b2b2b28bfa6057202509a017765442ca502c888ca50c6724b8c67569b6e6f4fcb8d5b2fd8a +DIST libntru-0.4.1.tar.gz 97284 SHA256 a540763f12c496b057f75c7684274bafb4e62984e6b713720ceb7ea8f31229e5 SHA512 c49251a194614f02124c90c08b886f89d0dacbed2088eb2e306946666af3b8bc3f9c2dc2c7f5e4c0560af66fca31a640fa853b3142dcfb2ee2b0dfe9a0d41f61 WHIRLPOOL 9313e7659de9dd6cb4c13f76d5fad9bfad7bf0bf97dad24d66a910750c8df185ab356f6934c47b4371fc5295d811df181a9b756d687223869ef348852af9aa6d 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 +} |