commit:     4839b6ba9ec5c6d5992d3870fe0127944f87405e
Author:     Stephen L Arnold <nerdboy <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 23 01:16:16 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri Oct 23 08:47:00 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4839b6ba

dev-util/cyclo: add 2.1_pre1 from overlay

Upstream changed to github, patches applied.  This tool calculates
per-function complexity metrics for C source (works where cccc has
trouble with various C dialects).

Package-Manager: portage-2.2.22
Signed-off-by: Stephen L Arnold <nerdboy <AT> gentoo.org>

 dev-util/cyclo/Manifest              |  1 +
 dev-util/cyclo/cyclo-2.1_pre1.ebuild | 46 ++++++++++++++++++++++++++++++++++++
 dev-util/cyclo/metadata.xml          | 12 ++++++++++
 3 files changed, 59 insertions(+)

diff --git a/dev-util/cyclo/Manifest b/dev-util/cyclo/Manifest
new file mode 100644
index 0000000..d9986c9
--- /dev/null
+++ b/dev-util/cyclo/Manifest
@@ -0,0 +1 @@
+DIST cyclo-2.1_pre1.tar.gz 30866 SHA256 
56c2c2ab2e684eb8d4c196835a2343b13ca3c26e1f1ca63ffd8c5bb2f485ad89 SHA512 
1b28c54b84d28ed9f72f57e8db1da74cd29be92947418bb3e9452afae1fc863ffb1110face3291f1abb34d1dcaed84d018bf9122ae25b4b67017e4990bb080b6
 WHIRLPOOL 
dcbbd1117a9f5ecdafbda40814ce47053b9653de251fd8384a4900765537fe61cd406b1eddfc890e79adce32da30f799c5a736b2ca246cab5505eac060f5e518

diff --git a/dev-util/cyclo/cyclo-2.1_pre1.ebuild 
b/dev-util/cyclo/cyclo-2.1_pre1.ebuild
new file mode 100644
index 0000000..1281a4f
--- /dev/null
+++ b/dev-util/cyclo/cyclo-2.1_pre1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 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/cyclo/archive/2.1_pre1.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_flags="CC=$(tc-getCC) CCPLUS=$(tc-getCXX)"
+
+       if ! use debug ; then
+               DBG="" make ${my_flags} all || die "make failed"
+       else
+               export STRIP_MASK="*/bin/*"
+               if [ -n "${DEBUG}" ] ; then
+                       DBG="${DEBUG}" make ${my_flags} all || die "make debug 
failed"
+               else
+                       make ${my_flags} all || die "make debug failed"
+               fi
+       fi
+}
+
+src_install() {
+       dobin cyclo mcstrip
+
+       doman cyclo.0 mcstrip.1 cyclo.1
+       dodoc README.rst mccabe.example || die "dodoc failed"
+}

diff --git a/dev-util/cyclo/metadata.xml b/dev-util/cyclo/metadata.xml
new file mode 100644
index 0000000..78c0d13
--- /dev/null
+++ b/dev-util/cyclo/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+<herd>dev-tools</herd>
+<maintainer>
+       <email>[email protected]</email>
+       <name>Steve Arnold</name>
+</maintainer>
+<upstream>
+       <remote-id type="github">sarnold/cyclo</remote-id>
+</upstream>
+</pkgmetadata>

Reply via email to