dev-cpp/pangomm: stable 2.42.1 for hppa, bug #717144
[gentoo.git] / sci-libs / m4ri / m4ri-20200115.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools flag-o-matic toolchain-funcs
7
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"
11
12 LICENSE="GPL-2+"
13 SLOT="0"
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"
16
17 BDEPEND="virtual/pkgconfig"
18 DEPEND="png? ( media-libs/libpng:= )"
19 RDEPEND="${DEPEND}"
20
21 # NEWS and ChangeLog are empty as of 2020-01-01, and README.md
22 # didn't make it into the release tarball.
23 DOCS=( AUTHORS )
24
25 PATCHES=(
26         "${FILESDIR}"/${PN}-20200115-memory_violation.patch
27         "${FILESDIR}"/${PN}-20200115-libm_underlinking.patch
28 )
29
30 pkg_pretend() {
31         use openmp && tc-check-openmp
32 }
33
34 src_prepare() {
35         default
36
37         eautoreconf
38 }
39
40 src_configure() {
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
45
46         econf \
47                 $(use_enable debug) \
48                 $(use_enable openmp) \
49                 $(use_enable png) \
50                 $(use_enable cpu_flags_x86_sse2 sse2) \
51                 $(use_enable static-libs static)
52 }
53
54 src_install() {
55         default
56         find "${ED}" -name '*.la' -delete || die
57 }