summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2014-10-10 13:23:54 +0000
committerMichael Weber <xmw@gentoo.org>2014-10-10 13:23:54 +0000
commitb49f88b32b191b5e19bc095e071250b1a6f1f7ee (patch)
tree06cbdb49ae49d5e3259eaef2e7044add3948bf31 /dev-util
parentVersion bump with new homepage, update makefile patch (diff)
downloadgentoo-2-b49f88b32b191b5e19bc095e071250b1a6f1f7ee.tar.gz
gentoo-2-b49f88b32b191b5e19bc095e071250b1a6f1f7ee.tar.bz2
gentoo-2-b49f88b32b191b5e19bc095e071250b1a6f1f7ee.zip
Backport ebuild improvements (test, bug 511438), manpage.
(Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/cppcheck/ChangeLog5
-rw-r--r--dev-util/cppcheck/cppcheck-1.65-r1.ebuild54
2 files changed, 34 insertions, 25 deletions
diff --git a/dev-util/cppcheck/ChangeLog b/dev-util/cppcheck/ChangeLog
index cea3ad6a4b37..bb333d4a6dad 100644
--- a/dev-util/cppcheck/ChangeLog
+++ b/dev-util/cppcheck/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for dev-util/cppcheck
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/cppcheck/ChangeLog,v 1.56 2014/10/10 13:04:51 xmw Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/cppcheck/ChangeLog,v 1.57 2014/10/10 13:23:54 xmw Exp $
+
+ 10 Oct 2014; Michael Weber <xmw@gentoo.org> cppcheck-1.65-r1.ebuild:
+ Backport ebuild improvements (test, bug 511438), manpage.
*cppcheck-1.66 (10 Oct 2014)
diff --git a/dev-util/cppcheck/cppcheck-1.65-r1.ebuild b/dev-util/cppcheck/cppcheck-1.65-r1.ebuild
index d76216bb5289..1c31f01f613e 100644
--- a/dev-util/cppcheck/cppcheck-1.65-r1.ebuild
+++ b/dev-util/cppcheck/cppcheck-1.65-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/cppcheck/cppcheck-1.65-r1.ebuild,v 1.2 2014/10/10 06:31:14 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/cppcheck/cppcheck-1.65-r1.ebuild,v 1.3 2014/10/10 13:23:54 xmw Exp $
EAPI=5
@@ -10,35 +10,38 @@ inherit distutils-r1 eutils flag-o-matic qt4-r2 toolchain-funcs
DESCRIPTION="static analyzer of C/C++ code"
HOMEPAGE="http://cppcheck.sourceforge.net"
-SRC_URI="mirror://sourceforge/cppcheck/${P}.tar.bz2"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="htmlreport qt4"
+IUSE="htmlreport pcre qt4"
RDEPEND="htmlreport? ( ${PYTHON_DEPS} )
>=dev-libs/tinyxml2-2
- qt4? ( dev-qt/qtgui:4 )"
+ qt4? ( dev-qt/qtgui:4 )
+ pcre? ( dev-libs/libpcre )"
DEPEND="${RDEPEND}
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
virtual/pkgconfig"
src_prepare() {
# Drop bundled libs, patch Makefile generator and re-run it
rm -r externals || die
epatch "${FILESDIR}"/${P}-tinyxml2.patch
- emake dmake \
- CPPFLAGS="${CPPFLAGS}" \
- CXX="$(tc-getCXX)" \
- CXXFLAGS="${CXXFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
+ tc-export CXX
+ emake dmake
./dmake || die
epatch "${FILESDIR}"/${P}-c++0x.patch
}
src_configure() {
- tc-export CXX
+ if use pcre ; then
+ sed -e '/HAVE_RULES=/s:=no:=yes:' \
+ -i Makefile
+ fi
if use qt4 ; then
pushd gui
qt4-r2_src_configure
@@ -47,16 +50,10 @@ src_configure() {
}
src_compile() {
- local my_inc=$(pkg-config --cflags-only-I tinyxml2)
- emake CFGDIR="/usr/share/${PN}/cfg" \
- CPPFLAGS="${CPPFLAGS}" \
- CXX="$(tc-getCXX)" \
- CXXFLAGS="${CXXFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- INCLUDE_FOR_LIB="-Ilib ${my_inc}" \
- INCLUDE_FOR_CLI="-Ilib ${my_inc}" \
- INCLUDE_FOR_TEST="-Ilib -Icli ${my_inc}" \
- LIBS="$(pkg-config --libs tinyxml2)"
+ 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
@@ -71,18 +68,25 @@ src_compile() {
}
src_test() {
- emake check \
- LIBS="$(pkg-config --libs tinyxml2)"
+ # 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() {
emake install DESTDIR="${D}"
- dodoc readme.txt
insinto "/usr/share/${PN}/cfg"
doins cfg/*.cfg
if use qt4 ; then
dobin gui/${PN}-gui
- dodoc readme_gui.txt gui/{projectfile.txt,gui.cppcheck}
+ dodoc readme_gui.txt gui/{projectfile.txt,gui.${PN}}
fi
if use htmlreport ; then
pushd htmlreport
@@ -90,4 +94,6 @@ src_install() {
popd
find "${D}" -name "*.egg-info" -delete
fi
+ doman ${PN}.1
+ dodoc readme.txt
}