dev-libs/*: Update Manifest hashes
[gentoo.git] / dev-libs / gf2x / gf2x-1.2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit eutils autotools
7
8 PACKAGEID=36934 # inriaforge hardcoded ID
9
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"
13
14 LICENSE="GPL-2"
15 SLOT="0/1"
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_}"
20
21 src_prepare() {
22         default
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
27         eautoreconf
28 }
29
30 src_configure() {
31         econf \
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)
39 }
40
41 src_compile() {
42         emake
43         if use custom-tune; then
44                 einfo "Starting tuning"
45                 emake tune-lowlevel
46                 emake tune-toom
47                 use fft && emake tune-fft
48         fi
49 }
50
51 src_install() {
52         default
53         use static-libs || prune_libtool_files --all
54 }