diff options
author | 2016-02-10 10:32:16 -0800 | |
---|---|---|
committer | 2016-02-10 10:32:16 -0800 | |
commit | 72966c640ce0acf1767a62a2e0031dd079ddb44d (patch) | |
tree | db4be7935ce1c51f746c03057268dc8fe90e1e1c /dev-util/cyclo/cyclo-2.1.0.ebuild | |
parent | net-p2p/syncthing: add systemd unit files (fixes bug 574186) (diff) | |
download | gentoo-72966c640ce0acf1767a62a2e0031dd079ddb44d.tar.gz gentoo-72966c640ce0acf1767a62a2e0031dd079ddb44d.tar.bz2 gentoo-72966c640ce0acf1767a62a2e0031dd079ddb44d.zip |
dev-util/cyclo: update to current release (2.1.0)
This version also adds a simple test and example usage.
Package-Manager: portage-2.2.26
Diffstat (limited to 'dev-util/cyclo/cyclo-2.1.0.ebuild')
-rw-r--r-- | dev-util/cyclo/cyclo-2.1.0.ebuild | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/dev-util/cyclo/cyclo-2.1.0.ebuild b/dev-util/cyclo/cyclo-2.1.0.ebuild new file mode 100644 index 000000000000..4f7bcdc4eb60 --- /dev/null +++ b/dev-util/cyclo/cyclo-2.1.0.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils toolchain-funcs + +DESCRIPTION="Computes cyclomatic complexity metrics on C source code." +HOMEPAGE="https://github.com/sarnold/cyclo" + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="https://github.com/sarnold/cyclo.git" + inherit git-r3 +else + SRC_URI="https://github.com/sarnold/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +fi + +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +SLOT="0" +LICENSE="GPL-2" +IUSE="debug" + +DEPEND="sys-devel/flex" + +src_compile() { + local my_opts + my_opts="CC=$(tc-getCC) CXX=$(tc-getCXX)" + + if ! use debug ; then + DBG="" emake ${my_opts} || die "make failed" + else + export STRIP_MASK="*/bin/*" + if [ -n "${DEBUG}" ] ; then + DBG="${DEBUG}" emake ${my_opts} \ + || die "make debug failed" + else + emake ${my_opts} || die "make debug failed" + fi + fi +} + +src_test() { + make -f Makefile.test test +} + +src_install() { + emake PREFIX=/usr DESTDIR="${ED}" install +} |