dev-util/cccc: add 3.2.0

Closes: https://bugs.gentoo.org/944003
Closes: https://bugs.gentoo.org/880613
Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>
Part-of: https://github.com/gentoo/gentoo/pull/45319
Closes: https://github.com/gentoo/gentoo/pull/45319
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Alexey Sokolov
2026-01-10 13:42:41 +00:00
committed by Sam James
parent 1e9c49c966
commit 5c7120c262
2 changed files with 73 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST cccc-3.1.6.tar.gz 663731 BLAKE2B 28c2a3c29d549bb10fb0e905a0c3397ab7fcffa5f4a0e8a7b9ab0e91cfbfffd7312891c646c00e4b7687b1fc4a5766b9c9d45fce0175dc403e816d2deab24545 SHA512 4966d590dd479448392611b57758a1b0378e91c505f258db643a256c3c60b9908574e22aecbc57635248694959d429de5f356328f298f1260920ef4b6fb306e4
DIST cccc-3.2.0.tar.gz 683895 BLAKE2B 65162a0584c18618ba3b798cdbf39a56baa26c3ee8724fc8ce1d59ddba883bfdb3143fc7b75b0b95326a34b7b66cef53b97da947856cce750e2644360be8440f SHA512 3fb8ff4c80f97b2b328d50ca611b87998907f419f0d05d01eba1d99121f93f2654127666b033c24299593576f02cc772de3ba8784e96bd7a01cc3d20a58862f3

View File

@@ -0,0 +1,72 @@
# Copyright 1999-2026 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"
IUSE="apidoc debug doc mfc"
BDEPEND="apidoc? ( app-text/doxygen[dot] )"
src_prepare() {
default
use mfc && eapply "${FILESDIR}"/${PN}-c_dialect.patch
tc-is-lto && filter-flags -fuse-linker-plugin
filter-lto
# https://bugs.gentoo.org/944003
append-cflags -std=gnu89 -fno-strict-aliasing
}
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
}