diff options
Diffstat (limited to 'dev-libs/libntru')
-rw-r--r-- | dev-libs/libntru/Manifest | 3 | ||||
-rw-r--r-- | dev-libs/libntru/libntru-0.4.1-r1.ebuild | 64 | ||||
-rw-r--r-- | dev-libs/libntru/metadata.xml | 8 |
3 files changed, 75 insertions, 0 deletions
diff --git a/dev-libs/libntru/Manifest b/dev-libs/libntru/Manifest new file mode 100644 index 000000000000..8e93fcddb203 --- /dev/null +++ b/dev-libs/libntru/Manifest @@ -0,0 +1,3 @@ +DIST libntru-0.4.1.tar.gz 97284 BLAKE2B 1384f96627c02f0b3981b25f8f080ae87606cbbf855358d40ccfb46abd22834c0af03f518bdfd23fbe17bdc40fc57cd1066db9e3bedb9a7529e2cf1130c6a5af SHA512 c49251a194614f02124c90c08b886f89d0dacbed2088eb2e306946666af3b8bc3f9c2dc2c7f5e4c0560af66fca31a640fa853b3142dcfb2ee2b0dfe9a0d41f61 +EBUILD libntru-0.4.1-r1.ebuild 1427 BLAKE2B eb86e9b3c56da03eec4ba9f365dcbe451229d7ffcfcc2fe4ee942e6e5b7ce467fc1c5b60d8c282d064a0f2fe4afa2028710b0993f39a6b99705dd1e4ba307dc3 SHA512 3ea44cdbcd5e3b9379e715b89a79e4b5f18e34fa6a4bb379afcf1f6e2ccdaad545b942b0e3f80e23956bfa6c722177502bedf86c032c301d587b538c8646938d +MISC metadata.xml 246 BLAKE2B 539591427eb235ea24426e19f5fd86c40a9f74939f0252d96ba84bc8ea50ff6563be0d923150635b49736e3ee92b95ea12ae21c6fa6458d0836541e8fd587848 SHA512 d0b4f22c4207d647b24be3a25c4154aa30cf75727f0add14c9c1177f60fc264d1d9d60520518d16f5d5df3373d0a78643c650ab6925baf5255eab1a7e9fcebc3 diff --git a/dev-libs/libntru/libntru-0.4.1-r1.ebuild b/dev-libs/libntru/libntru-0.4.1-r1.ebuild new file mode 100644 index 000000000000..7625c4a96d4b --- /dev/null +++ b/dev-libs/libntru/libntru-0.4.1-r1.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +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() { + default + + 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 +} diff --git a/dev-libs/libntru/metadata.xml b/dev-libs/libntru/metadata.xml new file mode 100644 index 000000000000..83d560b32b49 --- /dev/null +++ b/dev-libs/libntru/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="github">tbuktu/libntru</remote-id> + </upstream> +</pkgmetadata> |