forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-util/cppcheck: Version bump (thanks Christian Strahl, bug 596854).
Package-Manager: portage-2.2.28
- Loading branch information
Showing
2 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
DIST cppcheck-1.72.tar.bz2 1125775 SHA256 9460b184ff2d8dd15344f3e2f42f634c86e4dd3303e1e9b3f13dc67536aab420 SHA512 13b2348c97a3777feaad579f8620f18d90f6f934f92f5db712c7190af1f40042527500aefa4c8ccd348f7691b1c0d5f32115085c9385dec55460d5ba0804a410 WHIRLPOOL 790514f4b5b9c539a30daa691d268c6c5f1077743cde1af8834248eb4213224275e9f72cea46f3b378119a3d0944d7e8d63270c0cd47517c7f382c683a1938fe | ||
DIST cppcheck-1.75.tar.bz2 1152511 SHA256 57c70043c1330ed915cbd1a17ecc5408f2637a05062970508e990b1ba28760a0 SHA512 74116a7a2cd1c8c9a06c81f3f4de3de281f24ee30692729de5506dc7572ed694e55c32d1ad72196a9b95005e9f8d749bd82655323f8ff56051997c2ffc4ed57f WHIRLPOOL a42979e35041d382b1df755b0cdfb4c51951388d2b097856fa08b3ca6b39bdd99a13809a8b514b1fc0502ac0183a08e0f1ed742100e38a14ee2f7337ddda1f01 | ||
DIST cppcheck-1.77.tar.bz2 1188453 SHA256 1980ffe5c9c24bb6dea24514d42be3aa49d6ba7cc26c448b3543611fe8ba2619 SHA512 df8dddf7758c342d45b3393246e07eaa11a53dca19e8a0d09de04f12ea6232538941328d9ca9ac52eb425871fd1c49d55c77e6e38b40772b6f856fd1e9e99779 WHIRLPOOL 9f7842eba0f53a999993dbd23d09c10e5bd3dcca5ecbb0689e4ded8c7529d84fd939a57ce9cd267cdd21b2d79aeb6c07d672983ccb52be0fcc0b28ca80a31b59 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI=5 | ||
|
||
PYTHON_COMPAT=( python{2_7,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/tinyxml || die | ||
epatch "${FILESDIR}"/${PN}-1.75-tinyxml2.patch | ||
tc-export CXX | ||
emake dmake | ||
./dmake || die | ||
|
||
default | ||
} | ||
|
||
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 | ||
} |