1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools 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 "${FILESDIR}"/${PN}-20200115-memory_violation.patch
27 "${FILESDIR}"/${PN}-20200115-libm_underlinking.patch
31 use openmp && tc-check-openmp
41 # when using openmp and -O0 the testsuite fails
42 # https://github.com/cschwan/sage-on-gentoo/issues/475
43 # Still current as of 20200115
44 use openmp && replace-flags -O0 -O1
48 $(use_enable openmp) \
50 $(use_enable cpu_flags_x86_sse2 sse2) \
51 $(use_enable static-libs static)
56 find "${ED}" -name '*.la' -delete || die