summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-10-27 14:25:55 +0100
committerMichał Górny <mgorny@gentoo.org>2019-10-27 18:11:15 +0100
commit74cd8462dc9cbbe66f2d7fa8f1006581d3d6aace (patch)
treef1d598de234f70043f70b346b2066e005c11853d /app-crypt
parentprofiles: base: Drop obsolete app-text/mupdf[ssl] p.use.stable.mask (diff)
downloadgentoo-74cd8462dc9cbbe66f2d7fa8f1006581d3d6aace.tar.gz
gentoo-74cd8462dc9cbbe66f2d7fa8f1006581d3d6aace.tar.bz2
gentoo-74cd8462dc9cbbe66f2d7fa8f1006581d3d6aace.zip
app-crypt/libb2: Enable multilib support (needed for libarchive)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/libb2/libb2-0.98.1-r2.ebuild68
1 files changed, 68 insertions, 0 deletions
diff --git a/app-crypt/libb2/libb2-0.98.1-r2.ebuild b/app-crypt/libb2/libb2-0.98.1-r2.ebuild
new file mode 100644
index 000000000000..5473f617de93
--- /dev/null
+++ b/app-crypt/libb2/libb2-0.98.1-r2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools multilib-minimal 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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~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
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE=${S} \
+ 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}" "$@"
+}
+
+multilib_src_compile() {
+ do_make
+}
+
+multilib_src_test() {
+ do_make check
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${ED}" -name '*.la' -type f -delete || die
+}