summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen L Arnold <nerdboy@gentoo.org>2016-02-12 10:54:48 -0800
committerStephen L Arnold <nerdboy@gentoo.org>2016-02-12 10:55:43 -0800
commitc9a88e4f6912f37f398e80689176b22a42956d71 (patch)
tree434b4a475b60d61b96fec10072b7a653026f6be9 /dev-util/cccc/cccc-3.1.5.ebuild
parentapp-misc/gcalcli: bump. (diff)
downloadgentoo-c9a88e4f6912f37f398e80689176b22a42956d71.tar.gz
gentoo-c9a88e4f6912f37f398e80689176b22a42956d71.tar.bz2
gentoo-c9a88e4f6912f37f398e80689176b22a42956d71.zip
dev-util/cccc: update to latest release (3.1.5)
This version also adds a simple test, and adds use flags for detailed software docs and metrics, plus a lovely (optional) MFC patch. Package-Manager: portage-2.2.26
Diffstat (limited to 'dev-util/cccc/cccc-3.1.5.ebuild')
-rw-r--r--dev-util/cccc/cccc-3.1.5.ebuild71
1 files changed, 71 insertions, 0 deletions
diff --git a/dev-util/cccc/cccc-3.1.5.ebuild b/dev-util/cccc/cccc-3.1.5.ebuild
new file mode 100644
index 000000000000..e0fb42320fd7
--- /dev/null
+++ b/dev-util/cccc/cccc-3.1.5.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Source metrics (line counts, complexity, etc) for Java and C++"
+HOMEPAGE="http://sarnold.github.io/cccc/"
+if [[ ${PV} = 9999* ]]; then
+ EGIT_REPO_URI="https://github.com/sarnold/cccc.git"
+ EGIT_BRANCH="master"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/sarnold/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="apidoc debug doc mfc"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ apidoc? ( app-doc/doxygen[dot] )
+ "
+
+MAKEOPTS="-j1"
+
+src_prepare() {
+ use mfc && epatch "${FILESDIR}"/${PN}-c_dialect.patch
+}
+
+src_compile() {
+ if use debug ; then
+ export STRIP_MASK="*/bin/*"
+ DEBUG="true" emake CCC=$(tc-getCXX) CC=$(tc-getCC) cccc
+ else
+ emake CCC=$(tc-getCXX) CC=$(tc-getCC) cccc
+ fi
+
+ use apidoc && emake CCC=$(tc-getCXX) metrics docs
+}
+
+src_test() {
+ emake CCC=$(tc-getCXX) test
+}
+
+src_install() {
+ dobin cccc/cccc
+
+ dodoc README.md
+
+ if use mfc ; then
+ dodoc "${FILESDIR}"/cccc-MFC-dialect.opt
+ docompress -x "/usr/share/doc/${PF}/cccc-MFC-dialect.opt"
+ fi
+
+ if use doc ; then
+ dodoc CHANGELOG.md HISTORY.md
+ dohtml cccc/*.html || die "html docs failed"
+ if use apidoc ; then
+ docinto api
+ dohtml -A svg -r doxygen/html || die "dox failed"
+ docompress -x "/usr/share/doc/${PF}/api"
+ docinto metrics
+ dohtml ccccout/* || die "metrics failed"
+ fi
+ fi
+}