Merge remote-tracking branch 'github/pr/674'.
[gentoo.git] / dev-libs / cloog / cloog-9999.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6
7 inherit eutils multilib-minimal
8
9 if [[ ${PV} == "9999" ]] ; then
10         EGIT_REPO_URI="git://repo.or.cz/cloog.git"
11         inherit autotools git-2
12 else
13         KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
14         SRC_URI="http://www.bastoul.net/cloog/pages/download/${P}.tar.gz"
15 fi
16
17 DESCRIPTION="A loop generator for scanning polyhedra"
18 HOMEPAGE="http://www.bastoul.net/cloog/"
19
20 LICENSE="LGPL-2.1"
21 SLOT="0/4"
22 IUSE="static-libs"
23
24 RDEPEND=">=dev-libs/gmp-6.0.0[${MULTILIB_USEDEP}]
25         >=dev-libs/isl-0.15:0=[${MULTILIB_USEDEP}]
26         !dev-libs/cloog-ppl"
27 DEPEND="${DEPEND}
28         virtual/pkgconfig"
29
30 DOCS=( README )
31
32 src_prepare() {
33         if [[ ${PV} == "9999" ]] ; then
34                 ./get_submodules.sh
35                 eautoreconf -i
36         else
37                 # m4/ax_create_pkgconfig_info.m4 includes LDFLAGS
38                 # sed to avoid eautoreconf
39                 sed -i -e '/Libs:/s:@LDFLAGS@ ::' configure || die
40         fi
41
42         # Make sure we always use the system isl.
43         rm -rf isl
44 }
45
46 multilib_src_configure() {
47         ECONF_SOURCE="${S}" econf \
48                 --with-gmp=system \
49                 --with-isl=system \
50                 --with-osl=no \
51                 $(use_enable static-libs static)
52 }
53
54 # The default src_test() fails, so we'll just run these directly
55 multilib_src_test () {
56         echo ">>> Test phase [check]: ${CATEGORY}/${PF}"
57         emake -j1 check
58 }
59
60 multilib_src_install_all() {
61         einstalldocs
62         prune_libtool_files
63 }