summaryrefslogtreecommitdiff
path: root/dev-util/cccc/cccc-3.1.6-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-10 19:28:02 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-10 19:28:02 +0100
commit62f7102650b24618880e8e6f08fcb8fbd235025b (patch)
tree914a3a8577147ada92d191ad5dd0c2b52d2673a5 /dev-util/cccc/cccc-3.1.6-r1.ebuild
parent0d7aefa5885e7552b4c2221df9f54e5930696228 (diff)
gentoo auto-resync : 10:07:2022 - 19:28:02
Diffstat (limited to 'dev-util/cccc/cccc-3.1.6-r1.ebuild')
-rw-r--r--dev-util/cccc/cccc-3.1.6-r1.ebuild69
1 files changed, 69 insertions, 0 deletions
diff --git a/dev-util/cccc/cccc-3.1.6-r1.ebuild b/dev-util/cccc/cccc-3.1.6-r1.ebuild
new file mode 100644
index 000000000000..17d9b4e8f1b9
--- /dev/null
+++ b/dev-util/cccc/cccc-3.1.6-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="Source metrics (line counts, complexity, etc) for Java and C++"
+HOMEPAGE="https://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 ~arm64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="apidoc debug doc mfc"
+
+BDEPEND="apidoc? ( app-doc/doxygen[dot] )"
+
+src_prepare() {
+ default
+
+ use mfc && eapply "${FILESDIR}"/${PN}-c_dialect.patch
+ is-flagq -flto* && filter-flags -flto* -fuse-linker-plugin
+}
+
+src_compile() {
+ tc-export CC CXX LD AS AR NM RANLIB STRIP OBJCOPY
+ if use debug ; then
+ DEBUG="true" emake -j1 CCC="$(tc-getCXX)" CC="$(tc-getCC)" cccc
+ else
+ emake -j1 CCC="$(tc-getCXX)" CC="$(tc-getCC)" cccc
+ fi
+
+ use apidoc && emake -j1 CCC="$(tc-getCXX)" metrics docs
+}
+
+src_test() {
+ emake -j1 CCC="$(tc-getCXX)" test
+}
+
+src_install() {
+ dobin cccc/cccc
+
+ dodoc README.md
+
+ if use mfc ; then
+ docinto examples
+ dodoc "${FILESDIR}"/cccc-MFC-dialect.opt
+ docompress -x "/usr/share/doc/${PF}/examples"
+ fi
+
+ if use doc ; then
+ docinto html
+ dodoc cccc/*.html
+ if use apidoc ; then
+ docinto html/api
+ dodoc -r doxygen/html/.
+
+ docinto html/metrics/
+ dodoc ccccout/*
+ fi
+ fi
+}