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