Skip to content

Commit

Permalink
dev-util/cppcheck: version bump to 2.2
Browse files Browse the repository at this point in the history
Thanks to Bernd Buschinski for the initial ebuild

Closes: https://bugs.gentoo.org/693352
Bug: https://bugs.gentoo.org/699594
Package-Manager: Portage-3.0.11, Repoman-3.0.2
Signed-off-by: Matthias Maier <[email protected]>
  • Loading branch information
tamiko committed Dec 4, 2020
1 parent 7759a42 commit f631b78
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-util/cppcheck/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DIST cppcheck-1.86.tar.gz 2184186 BLAKE2B 8b488ec72d0998d6b037de2b1204373c8b3de475ad165bf108bb331399356cb0d1e20a7bc6f368f1a038ec886ad7a84ad694172d0a96a203a6877f3838c21001 SHA512 59cec55b8408e8f2e2e7172bce69350c248bc3185a0938b523c44a58f98b344e11aef957ec1b7a7b2bc7a876660b2683e51f54b76f0b550f9549497c29453655
DIST cppcheck-1.87.tar.gz 2243258 BLAKE2B ffe42bfb2e896163678c5bb24e46ae2391ba8254cbe7c1c19c3c1b16cd38adf9c773de6aaefe70af08b9c1dca8b0b0b5e9939323368a2f81491fd6981ff18139 SHA512 b0149002b40260c1488904929296403722a66b84263b41d0097c3caed28265332766c114f0d1f378ea6c7e73ab973ea71ab89c6744f6cc818f22de08933e6766
DIST cppcheck-1.88.tar.gz 2364053 BLAKE2B b688974ff83019422cc5b2ec575d9838bdff4ada17d71fb3d436f07eea50429490c222659163b845667d98c0ec186b3288464827894e379fd017dd0c3fea645f SHA512 fa4ede0665546341af0ba3dae09a00b6efae09ec7838c616c580be01ff6902594d61168a059539779be0c78e1708d2bd9c8e7987dd0bb67dc8fa332a10d1de6a
DIST cppcheck-2.2.tar.gz 3561406 BLAKE2B e436de4bec5412a18f013c8557a966c28c14edcd07fbb80eb53a897848d15f32afc180798ea1a074742f896b15d4020755c104b87dc8f82252121b58a92b92dc SHA512 d766187a69d6aa839e072e3c0ed44009621ca8492504257288ca2f49774f705a1ebcf2957f0801ac6eab2ffbdd845e9237f1213f85c6d0fcdbf16b1e7c690327
80 changes: 80 additions & 0 deletions dev-util/cppcheck/cppcheck-2.2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
PYTHON_COMPAT=( python{3_6,3_7,3_8,3_9} )
inherit distutils-r1 toolchain-funcs cmake-utils

DESCRIPTION="Static analyzer of C/C++ code"
HOMEPAGE="https://github.com/danmar/cppcheck"
SRC_URI="https://github.com/danmar/cppcheck/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~sparc ~x86"
IUSE="htmlreport pcre qt5 +z3"

RDEPEND="
htmlreport? ( dev-python/pygments[${PYTHON_USEDEP}] )
pcre? ( dev-libs/libpcre )
qt5? (
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtprintsupport:5
)
"
DEPEND="${RDEPEND}
app-text/docbook-xsl-stylesheets
dev-libs/libxslt
virtual/pkgconfig
z3? ( sci-mathematics/z3 )
"

src_prepare() {
cmake-utils_src_prepare
}

src_configure() {

local mycmakeargs=(
-DHAVE_RULES="$(usex pcre)"
-DBUILD_GUI="$(usex qt5)"
-DUSE_Z3="$(usex z3)"
-DFILESDIR="${EROOT}/usr/share/${PN}/"
-ENABLE_OSS_FUZZ=OFF
)
cmake-utils_src_configure
}

src_compile() {
cmake-utils_src_compile

if use htmlreport ; then
pushd htmlreport || die
distutils-r1_src_compile
popd || die
fi
}

src_install() {
# it's not autotools-based, so "${ED}" here, not "${D}", bug 531760
emake install DESTDIR="${ED}" \
FILESDIR="${EROOT}/usr/share/${PN}/"

insinto "/usr/share/${PN}/cfg"
doins cfg/*.cfg
if use qt5 ; then
dobin "${WORKDIR}/${P}_build/bin/${PN}-gui"
dodoc gui/{projectfile.txt,gui.${PN}}
fi
if use htmlreport ; then
pushd htmlreport || die
distutils-r1_src_install
popd || die
find "${D}" -name "*.egg-info" -delete
else
rm "${ED}/usr/bin/cppcheck-htmlreport" || die
fi

dodoc -r tools/triage
}
3 changes: 3 additions & 0 deletions dev-util/cppcheck/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
</maintainer>
<use>
<flag name="htmlreport">install cppcheck-htmlreport</flag>
<flag name="z3">
Enable support for <pkg>sci-mathematics/z3</pkg> backend
</flag>
</use>
<upstream>
<remote-id type="sourceforge">cppcheck</remote-id>
Expand Down
4 changes: 4 additions & 0 deletions profiles/arch/hppa/package.use.mask
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# NOTE: When masking a USE flag due to missing keywords, please file a keyword
# request bug for the hppa arch.

# Matthias Maier <[email protected]> (2020-12-03)
# Requires sci-mathematics/z3.
dev-util/cppcheck z3

# Michał Górny <[email protected]> (2020-11-18)
# Requires dev-python/coverage, bug #743355.
dev-python/nose coverage
Expand Down
4 changes: 4 additions & 0 deletions profiles/arch/sparc/package.use.mask
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Matthias Maier <[email protected]> (2020-12-03)
# Requires sci-mathematics/z3.
dev-util/cppcheck z3

# Mart Raudsepp <[email protected]> (2020-11-26)
# dev-libs/libmanette not keyworded, limited usefulness
net-libs/webkit-gtk gamepad
Expand Down

0 comments on commit f631b78

Please sign in to comment.