summaryrefslogtreecommitdiff
path: root/dev-libs/gf2x/gf2x-1.3.0.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-14 11:09:11 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-14 11:09:11 +0100
commitdeba8115d2c2af26df42966b91ef04ff4dd79cde (patch)
tree9a48f42594e1a9e6b2020d5535a784314434d7a7 /dev-libs/gf2x/gf2x-1.3.0.ebuild
parent38423c67c8a23f6a1bc42038193182e2da3116eb (diff)
gentoo resync : 14.05.2020
Diffstat (limited to 'dev-libs/gf2x/gf2x-1.3.0.ebuild')
-rw-r--r--dev-libs/gf2x/gf2x-1.3.0.ebuild57
1 files changed, 57 insertions, 0 deletions
diff --git a/dev-libs/gf2x/gf2x-1.3.0.ebuild b/dev-libs/gf2x/gf2x-1.3.0.ebuild
new file mode 100644
index 000000000000..4763099d4a33
--- /dev/null
+++ b/dev-libs/gf2x/gf2x-1.3.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="C/C++ routines for fast arithmetic in GF(2)[x]"
+HOMEPAGE="https://gitlab.inria.fr/thome/gf2x/ http://gforge.inria.fr/projects/gf2x/"
+# The Gitlab release is missing the autotools files.
+SRC_URI="https://gforge.inria.fr/frs/download.php/38243/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/3" # soname major version, defined in configure.ac
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="fft static-libs custom-tune"
+IUSE_CPU_FLAGS=" pclmul sse2 sse3 sse4_1 ssse3"
+IUSE+=" ${IUSE_CPU_FLAGS// / cpu_flags_x86_}"
+
+PATCHES=( "${FILESDIR}/fno-common.patch" )
+
+src_prepare() {
+ default
+ # fix for cross-compiling, avoid ABI detection
+ sed -e 's/VERIFY_WORDSIZE(\[$ABI\].*/echo "skipping ABI check"/' \
+ -e 's/AC_MSG_ERROR(\[already_t.*/echo "skipping ABI check"/' \
+ -i configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable cpu_flags_x86_sse3 sse3) \
+ $(use_enable cpu_flags_x86_ssse3 ssse3) \
+ $(use_enable cpu_flags_x86_sse4_1 sse41) \
+ $(use_enable cpu_flags_x86_pclmul pclmul) \
+ $(use_enable fft fft-interface) \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake
+ if use custom-tune; then
+ einfo "Starting tuning"
+ emake tune-lowlevel
+ emake tune-toom
+ use fft && emake tune-fft
+ fi
+}
+
+src_install() {
+ default
+ if ! use static-libs; then
+ find "${ED}" -name '*.la' -delete || die
+ fi
+}