dev-libs/ppl: amd64 stable wrt bug #717570
[gentoo.git] / dev-libs / ppl / ppl-1.2-r2.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
7
8 DESCRIPTION="The Parma Polyhedra Library for numerical analysis of complex systems"
9 HOMEPAGE="http://bugseng.com/products/ppl"
10 SRC_URI="http://bugseng.com/products/ppl/download/ftp/releases/${PV}/${P}.tar.xz"
11
12 LICENSE="GPL-3"
13 SLOT="0/4.14" # SONAMEs
14 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 sparc ~x86 ~amd64-linux ~sparc-solaris"
15 IUSE="cdd +cxx doc lpsol pch static-libs test"
16
17 RDEPEND=">=dev-libs/gmp-6[cxx]
18         lpsol? ( sci-mathematics/glpk )"
19 DEPEND="${RDEPEND}
20         app-arch/xz-utils
21         sys-devel/m4"
22
23 RESTRICT="!test? ( test )"
24
25 PATCHES=(
26         "${FILESDIR}/disable-mipproblem2.patch"
27         "${FILESDIR}/disable-containsintegerpoint1.patch"
28         "${FILESDIR}/disable-boeing-tests.patch"
29 )
30
31 src_prepare() {
32         default
33
34         # The patch should do this, but then the diff makes it run
35         # afoul of the Gentoo patch size limit.
36         rm demos/ppl_lpsol/examples/boeing[12].mps || die
37
38         eautoreconf
39 }
40
41 src_configure() {
42         local interfaces=( c )
43         use cxx && interfaces+=( cxx )
44         econf \
45                 --disable-debugging \
46                 --disable-optimization \
47                 $(use_enable doc documentation) \
48                 $(use_enable cdd ppl_lcdd) \
49                 $(use_enable lpsol ppl_lpsol) \
50                 $(use_enable pch) \
51                 $(use_enable static-libs static) \
52                 --enable-interfaces="${interfaces[*]}" \
53                 $(use test && echo --enable-check=quick)
54 }
55
56 src_install() {
57         default
58         if ! use static-libs; then
59                 find "${ED}"/usr -name 'libppl*.la' -delete || die
60         fi
61
62         pushd "${ED}/usr/share/doc/${PF}" >/dev/null || die
63         rm gpl* fdl* || die
64         if ! use doc ; then
65                 rm -r *-html/ *.ps.gz *.pdf || die
66         fi
67 }