summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2016-05-07 23:54:35 +0200
committerMichael Weber <xmw@gentoo.org>2016-05-07 23:55:24 +0200
commite3859c0744b6d20ed6022e6b12d2e682f2eaf2fb (patch)
tree72430cfc8dbf939c226f32da33b6d8505643b5f5 /dev-util/cppcheck
parentdev-util/cppcheck: Drop old. (diff)
downloadgentoo-e3859c0744b6d20ed6022e6b12d2e682f2eaf2fb.tar.gz
gentoo-e3859c0744b6d20ed6022e6b12d2e682f2eaf2fb.tar.bz2
gentoo-e3859c0744b6d20ed6022e6b12d2e682f2eaf2fb.zip
dev-util/cppcheck: Version bump (thanks Christian Strahl for the hint, bug 579758).
Package-Manager: portage-2.2.28
Diffstat (limited to 'dev-util/cppcheck')
-rw-r--r--dev-util/cppcheck/Manifest1
-rw-r--r--dev-util/cppcheck/cppcheck-1.73.ebuild105
2 files changed, 106 insertions, 0 deletions
diff --git a/dev-util/cppcheck/Manifest b/dev-util/cppcheck/Manifest
index 5deca44b4ccd..194836e07fec 100644
--- a/dev-util/cppcheck/Manifest
+++ b/dev-util/cppcheck/Manifest
@@ -1 +1,2 @@
DIST cppcheck-1.72.tar.bz2 1125775 SHA256 9460b184ff2d8dd15344f3e2f42f634c86e4dd3303e1e9b3f13dc67536aab420 SHA512 13b2348c97a3777feaad579f8620f18d90f6f934f92f5db712c7190af1f40042527500aefa4c8ccd348f7691b1c0d5f32115085c9385dec55460d5ba0804a410 WHIRLPOOL 790514f4b5b9c539a30daa691d268c6c5f1077743cde1af8834248eb4213224275e9f72cea46f3b378119a3d0944d7e8d63270c0cd47517c7f382c683a1938fe
+DIST cppcheck-1.73.tar.bz2 1147270 SHA256 36f68354734310203c285fac17aed47bb82131fc0487145b9c0386301cd5fe50 SHA512 a703cb47016982c27509bd46fa601b5baf359b0c44be188e2f5fe7d64b2accc392af5aa803a5e298b778f15b979585781ecd1459c8d2dd8b033f34cb1bad15a7 WHIRLPOOL 1ecbcd36f3ed36c0db3a9e6c99b730c164c5e4a680dfa1f6b3a84df5a9e4e7ca0ab902d34306dcaf12c9ffd686fbac4492f07b12b99d862d9152db6ffeac377c
diff --git a/dev-util/cppcheck/cppcheck-1.73.ebuild b/dev-util/cppcheck/cppcheck-1.73.ebuild
new file mode 100644
index 000000000000..34c8313daa1a
--- /dev/null
+++ b/dev-util/cppcheck/cppcheck-1.73.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
+
+inherit distutils-r1 eutils qt4-r2 toolchain-funcs flag-o-matic
+
+DESCRIPTION="static analyzer of C/C++ code"
+HOMEPAGE="http://cppcheck.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="htmlreport pcre qt4"
+
+RDEPEND="htmlreport? ( dev-python/pygments[${PYTHON_USEDEP}] )
+ >=dev-libs/tinyxml2-2
+ qt4? ( dev-qt/qtgui:4 )
+ pcre? ( dev-libs/libpcre )"
+DEPEND="${RDEPEND}
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ virtual/pkgconfig"
+
+src_prepare() {
+ append-cxxflags -std=c++0x
+
+ # Drop bundled libs, patch Makefile generator and re-run it
+ rm -r externals || die
+ epatch "${FILESDIR}"/${PN}-1.72-tinyxml2.patch
+ tc-export CXX
+ emake dmake
+ ./dmake || die
+
+ epatch_user
+}
+
+src_configure() {
+ if use pcre ; then
+ sed -e '/HAVE_RULES=/s:=no:=yes:' \
+ -i Makefile
+ fi
+ if use qt4 ; then
+ pushd gui
+ qt4-r2_src_configure
+ popd
+ fi
+}
+
+src_compile() {
+ export LIBS="$(pkg-config --libs tinyxml2)"
+ emake ${PN} man \
+ CFGDIR="${EROOT}usr/share/${PN}/cfg" \
+ DB2MAN="${EROOT}usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl"
+
+ if use qt4 ; then
+ pushd gui
+ qt4-r2_src_compile
+ popd
+ fi
+ if use htmlreport ; then
+ pushd htmlreport
+ distutils-r1_src_compile
+ popd
+ fi
+}
+
+src_test() {
+ # safe final version
+ mv -v ${PN}{,.final}
+ mv -v lib/library.o{,.final}
+ mv -v cli/cppcheckexecutor.o{,.final}
+ #trigger recompile with CFGDIR inside ${S}
+ emake check CFGDIR="${S}/cfg"
+ # restore
+ mv -v ${PN}{.final,}
+ mv -v lib/library.o{.final,}
+ mv -v cli/cppcheckexecutor.o{.final,}
+}
+
+src_install() {
+ # it's not autotools-based, so "${ED}" here, not "${D}", bug 531760
+ emake install DESTDIR="${ED}"
+
+ insinto "/usr/share/${PN}/cfg"
+ doins cfg/*.cfg
+ if use qt4 ; then
+ dobin gui/${PN}-gui
+ dodoc gui/{projectfile.txt,gui.${PN}}
+ fi
+ if use htmlreport ; then
+ pushd htmlreport
+ distutils-r1_src_install
+ popd
+ find "${D}" -name "*.egg-info" -delete
+ else
+ rm "${ED}/usr/bin/cppcheck-htmlreport" || die
+ fi
+ doman ${PN}.1
+ dodoc -r triage
+}