1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils autotools
8 PACKAGEID=36934 # inriaforge hardcoded ID
10 DESCRIPTION="C/C++ routines for fast arithmetic in GF(2)[x]"
11 HOMEPAGE="http://gf2x.gforge.inria.fr/"
12 SRC_URI="http://gforge.inria.fr/frs/download.php/${PACKAGEID}/${P}.tar.gz"
16 KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
17 IUSE="fft static-libs custom-tune"
18 IUSE_CPU_FLAGS=" pclmul sse2 sse3 sse4_1 ssse3"
19 IUSE+=" ${IUSE_CPU_FLAGS// / cpu_flags_x86_}"
23 # fix for cross-compiling, avoid ABI detection
24 sed -e 's/VERIFY_WORDSIZE(\[$ABI\].*/echo "skipping ABI check"/' \
25 -e 's/AC_MSG_ERROR(\[already_t.*/echo "skipping ABI check"/' \
26 -i configure.ac || die
32 $(use_enable cpu_flags_x86_sse2 sse2) \
33 $(use_enable cpu_flags_x86_sse3 sse3) \
34 $(use_enable cpu_flags_x86_ssse3 ssse3) \
35 $(use_enable cpu_flags_x86_sse4_1 sse41) \
36 $(use_enable cpu_flags_x86_pclmul pclmul) \
37 $(use_enable fft fft-interface) \
38 $(use_enable static-libs static)
43 if use custom-tune; then
44 einfo "Starting tuning"
47 use fft && emake tune-fft
53 use static-libs || prune_libtool_files --all