diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-06-08 09:04:53 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-06-08 09:04:53 +0100 |
commit | 73c318acdaf6f8309d68bd266051e6dd1f1bd787 (patch) | |
tree | 2878053f3e7faed19a1f82c733d3bd29df69991e /app-crypt/libb2/libb2-0.98.1-r1.ebuild | |
parent | 2018227e9344edb9da15fc6a4a8298086cc2aa77 (diff) |
gentoo resync : 08.06.2019
Diffstat (limited to 'app-crypt/libb2/libb2-0.98.1-r1.ebuild')
-rw-r--r-- | app-crypt/libb2/libb2-0.98.1-r1.ebuild | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/app-crypt/libb2/libb2-0.98.1-r1.ebuild b/app-crypt/libb2/libb2-0.98.1-r1.ebuild new file mode 100644 index 000000000000..9224a54ad537 --- /dev/null +++ b/app-crypt/libb2/libb2-0.98.1-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools toolchain-funcs + +DESCRIPTION="C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp" +HOMEPAGE="https://github.com/BLAKE2/libb2" +GITHASH="73d41c8255a991ed2adea41c108b388d9d14b449" +SRC_URI="https://github.com/BLAKE2/libb2/archive/${GITHASH}.tar.gz -> ${P}.tar.gz" + +LICENSE="CC0-1.0" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~mips ~ppc64 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="static-libs native-cflags openmp" + +DEPEND=" + openmp? ( + || ( >=sys-devel/gcc-4.2:*[openmp] sys-devel/clang-runtime:*[openmp] ) + ) +" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${PN}-${GITHASH} + +pkg_setup() { + if [[ ${MERGE_TYPE} != "binary" ]] && use openmp && ! tc-has-openmp; then + ewarn "You are using a compiler without OpenMP support" + die "Need an OpenMP capable compiler" + fi +} + +src_prepare() { + default + # fix bashism + sed -i -e 's/ == / = /' configure.ac || die + # https://github.com/BLAKE2/libb2/pull/28 + echo 'libb2_la_LDFLAGS = -no-undefined' >> src/Makefile.am || die + eautoreconf # upstream doesn't make releases +} + +src_configure() { + econf \ + $(use_enable static-libs static) \ + $(use_enable native-cflags native) \ + $(use_enable openmp) +} + +do_make() { + # respect our CFLAGS when native-cflags is not in effect + local openmp=$(use openmp && echo -fopenmp) + emake $(use native-cflags && echo no)CFLAGS="${CFLAGS} ${openmp}" "$@" +} + +src_compile() { + do_make +} + +src_test() { + do_make check +} + +src_install() { + default + use static-libs || find "${ED}" -name '*.la' -type f -delete || die +} |