dev-util/cyclo: add 2.1_pre1 from overlay
authorStephen L Arnold <nerdboy@gentoo.org>
Fri, 23 Oct 2015 01:16:16 +0000 (18:16 -0700)
committerAnthony G. Basile <blueness@gentoo.org>
Fri, 23 Oct 2015 08:47:00 +0000 (04:47 -0400)
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@gentoo.org>
dev-util/cyclo/Manifest [new file with mode: 0644]
dev-util/cyclo/cyclo-2.1_pre1.ebuild [new file with mode: 0644]
dev-util/cyclo/metadata.xml [new file with mode: 0644]

diff --git a/dev-util/cyclo/Manifest b/dev-util/cyclo/Manifest
new file mode 100644 (file)
index 0000000..d9986c9
--- /dev/null
@@ -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 (file)
index 0000000..1281a4f
--- /dev/null
@@ -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 (file)
index 0000000..78c0d13
--- /dev/null
@@ -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>nerdboy@gentoo.org</email>
+       <name>Steve Arnold</name>
+</maintainer>
+<upstream>
+       <remote-id type="github">sarnold/cyclo</remote-id>
+</upstream>
+</pkgmetadata>