dev-libs/ppl: stable 1.2 for ia64, bug #632277
[gentoo.git] / dev-libs / ppl / ppl-1.2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 DESCRIPTION="The Parma Polyhedra Library for numerical analysis of complex systems"
7 HOMEPAGE="http://bugseng.com/products/ppl"
8 SRC_URI="http://bugseng.com/products/ppl/download/ftp/releases/${PV}/${P}.tar.xz"
9
10 LICENSE="GPL-3"
11 SLOT="0/4.14" # SONAMEs
12 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~sparc-solaris"
13 IUSE="+cxx doc lpsol pch static-libs test"
14
15 RDEPEND=">=dev-libs/gmp-6[cxx]
16         lpsol? ( sci-mathematics/glpk )
17         !dev-libs/cloog-ppl"
18 DEPEND="${RDEPEND}
19         app-arch/xz-utils
20         sys-devel/m4"
21
22 pkg_setup() {
23         if use test ; then
24                 ewarn "The PPL testsuite will be run."
25                 ewarn "Note that this can take several hours to complete on a fast machine."
26         fi
27 }
28
29 src_configure() {
30         local interfaces=( c )
31         use cxx && interfaces+=( cxx )
32         econf \
33                 --docdir="${EPREFIX}"/usr/share/doc/${PF} \
34                 --disable-debugging \
35                 --disable-optimization \
36                 $(use_enable doc documentation) \
37                 $(use_enable lpsol ppl_lpsol) \
38                 $(use_enable pch) \
39                 $(use_enable static-libs static) \
40                 --enable-interfaces="${interfaces[*]}" \
41                 $(use test && echo --enable-check=quick)
42 }
43
44 src_test() {
45         # default src_test runs with -j1, overriding it here saves about
46         # 30 minutes and is recommended by upstream
47         emake check
48 }
49
50 src_install() {
51         default
52         use static-libs || find "${ED}"/usr -name 'libppl*.la' -delete
53
54         pushd "${ED}/usr/share/doc/${PF}" >/dev/null || die
55         rm gpl* fdl* || die
56         if ! use doc ; then
57                 rm -r *-html/ *.ps.gz *.pdf || die
58         fi
59 }