dev-util/uncrustify: upstream switched to cmake, patch by Eugene Shalygin, bug #596448
[gentoo.git] / dev-util / uncrustify / uncrustify-0.63.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=6
6
7 if [[ $PV == *9999* ]]; then
8         EGIT_REPO_URI="git://github.com/uncrustify/uncrustify.git
9                 https://github.com/uncrustify/uncrustify.git"
10         KEYWORDS=""
11         SRC_URI=""
12         scm_eclass=git-r3
13 else
14         KEYWORDS="~amd64 ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris"
15         SRC_URI="https://github.com/uncrustify/${PN}/archive/${P}.tar.gz"
16         S=${WORKDIR}/${PN}-${P}
17 fi
18
19 inherit autotools ${scm_eclass}
20
21 PYTHON_COMPAT=( python2_7 )
22
23 inherit python-any-r1
24
25 DESCRIPTION="C/C++/C#/D/Java/Pawn code indenter and beautifier"
26 HOMEPAGE="http://uncrustify.sourceforge.net/"
27
28 LICENSE="GPL-2"
29 SLOT="0"
30 IUSE="test"
31
32 DEPEND="test? ( ${PYTHON_DEPS} )"
33
34 src_prepare() {
35         eautoreconf
36         default
37 }
38
39 python_test() {
40         cd tests
41         ${EPYTHON} run_tests.py || die "tests failed"
42 }