1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit flag-o-matic toolchain-funcs
8 DESCRIPTION="Method of four russian for inversion (M4RI)"
9 HOMEPAGE="https://bitbucket.org/malb/m4ri"
10 SRC_URI="https://bitbucket.org/malb/${PN}/downloads/${P}.tar.gz"
14 KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
15 IUSE="debug openmp cpu_flags_x86_sse2 png static-libs"
17 BDEPEND="virtual/pkgconfig"
18 DEPEND="png? ( media-libs/libpng:= )"
21 # NEWS and ChangeLog are empty as of 2020-01-01, and README.md
22 # didn't make it into the release tarball.
26 use openmp && tc-check-openmp
30 # when using openmp and -O0 the testsuite fails
31 # https://github.com/cschwan/sage-on-gentoo/issues/475
32 # Still current as of 20200115
33 use openmp && replace-flags -O0 -O1
37 $(use_enable openmp) \
39 $(use_enable cpu_flags_x86_sse2 sse2) \
40 $(use_enable static-libs static)
45 find "${ED}" -name '*.la' -delete || die