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
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
-rw-r--r--dev-util/cccc/Manifest2
-rw-r--r--dev-util/cccc/cccc-3.1.4-r1.ebuild48
-rw-r--r--dev-util/cccc/cccc-3.1.5.ebuild71
-rw-r--r--dev-util/cccc/metadata.xml16
4 files changed, 86 insertions, 51 deletions
diff --git a/dev-util/cccc/Manifest b/dev-util/cccc/Manifest
index 6f70191c212e..42d83a87b176 100644
--- a/dev-util/cccc/Manifest
+++ b/dev-util/cccc/Manifest
@@ -1 +1 @@
-DIST cccc-3.1.4.tar.gz 632007 SHA256 27b3eca9a83a66799332363a80cc4bcd6db9869eddbda1a59a25cdace3ff4dbf SHA512 54b8838e228cd435497bac1fd3f1fe3bf2043871fe1046dd80b4382b08a7b249009aa5b06d5318868bbded31c31b45ec705c70abf3969f02b9680c3adb72a231 WHIRLPOOL bc432ad8247bf2da146db7d7a58af1c7344f5701198d8d9da8bc6e0491aa18fa901e70bb009aceb0356dc52059959d0045c848ec8f3bfe30aeb09cff973e18e2
+DIST cccc-3.1.5.tar.gz 662760 SHA256 6fe91eae83ad0ff4c1fe4277aabb6e7554a4dec1bb266b5657c064ef48a23142 SHA512 61544669a75ff7bd99c6ff5bb1e6ec163f2a09f4538493fe60e8f9f95eab7ba19ad6d39b6717ae010a223b8efe48c497a4feb8ead218e350ee2ab91b9c52c969 WHIRLPOOL 085d897eec29bc6de7fee35261bcde2228bb76e85799a6528d7ff9364712489368ad5f899f8c170169fb9b01931e4b846fd5c63b98b640c733640d10685c100f
diff --git a/dev-util/cccc/cccc-3.1.4-r1.ebuild b/dev-util/cccc/cccc-3.1.4-r1.ebuild
deleted file mode 100644
index 4a2492e9a21a..000000000000
--- a/dev-util/cccc/cccc-3.1.4-r1.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2015 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 code metrics (line counts, complexity, etc) for Java and C++"
-HOMEPAGE="http://cccc.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
-IUSE="doc"
-
-RDEPEND=""
-DEPEND="${RDEPEND}"
-
-MAKEOPTS="-j1"
-
-src_prepare() {
- # fix new C++ syntax error
- epatch "${FILESDIR}"/${P}-whitespace-and-unqualified-lookup.patch
-
- sed -i -e "/^CFLAGS/s|=|+=|" pccts/antlr/makefile
- sed -i -e "/^CFLAGS/s|=|+=|" pccts/dlg/makefile
- sed -i -e "/^CFLAGS/s|=|+=|" \
- -e "/^LD_OFLAG/s|-o|-o |" \
- -e "/^LDFLAGS/s|=|+=|" cccc/posixgcc.mak
- #LD_OFLAG: ld on Darwin needs a space after -o
-}
-
-src_compile() {
- emake CCC=$(tc-getCXX) LD=$(tc-getCXX) pccts
-
- append-cflags "-std=c++98"
- emake CCC=$(tc-getCXX) LD=$(tc-getCXX) cccc
-}
-
-src_install() {
- dodoc readme.txt changes.txt
- use doc && dohtml cccc/*.html
- cd install || die
- dodir /usr
- emake -f install.mak INSTDIR="${ED}"/usr/bin
-}
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
+}
diff --git a/dev-util/cccc/metadata.xml b/dev-util/cccc/metadata.xml
index 095797bdec3b..08fec3d474ac 100644
--- a/dev-util/cccc/metadata.xml
+++ b/dev-util/cccc/metadata.xml
@@ -1,8 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
+ <herd>dev-tools</herd>
+ <maintainer type="person">
+ <email>nerdboy@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ cccc provides source code metrics (line counts, complexity,
+ object-oriented, and structural metrics) for Java and C++
+ </longdescription>
<upstream>
- <remote-id type="sourceforge">cccc</remote-id>
- <bugs-to>http://sourceforge.net/tracker/?group_id=7763</bugs-to>
+ <remote-id type="github">sarnold/cccc</remote-id>
+ <bugs-to>https://github.com/sarnold/cccc/issues</bugs-to>
</upstream>
+ <use>
+ <flag name="apidoc">Build software docs with doxygen/graphviz and metrics with cccc</flag>
+ <flag name="mfc">Add patch for MFC dialect options</flag>
+ </use>
</pkgmetadata>