You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
1.5 KiB
77 lines
1.5 KiB
11 years ago
|
# Copyright 1999-2014 Gentoo Foundation
|
||
11 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
11 years ago
|
# $Header: /var/cvsroot/gentoo-x86/dev-util/cppcheck/cppcheck-1.65.ebuild,v 1.1 2014/05/19 15:50:29 xmw Exp $
|
||
11 years ago
|
|
||
|
EAPI=5
|
||
|
|
||
|
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
|
||
|
|
||
|
inherit distutils-r1 eutils qt4-r2 toolchain-funcs
|
||
|
|
||
|
DESCRIPTION="static analyzer of C/C++ code"
|
||
11 years ago
|
HOMEPAGE="http://cppcheck.sourceforge.net"
|
||
11 years ago
|
SRC_URI="mirror://sourceforge/cppcheck/${P}.tar.bz2"
|
||
|
|
||
|
LICENSE="GPL-3"
|
||
|
SLOT="0"
|
||
11 years ago
|
KEYWORDS="~amd64 ~x86"
|
||
11 years ago
|
IUSE="htmlreport qt4"
|
||
|
|
||
|
DEPEND="htmlreport? ( ${PYTHON_DEPS} )
|
||
11 years ago
|
>=dev-libs/tinyxml2-2
|
||
11 years ago
|
qt4? ( dev-qt/qtgui:4 )"
|
||
|
RDEPEND="${DEPEND}"
|
||
|
|
||
11 years ago
|
src_prepare() {
|
||
|
# Do not use bundled tinyxml2
|
||
|
epatch \
|
||
|
"${FILESDIR}"/${P}-tinyxml2.patch \
|
||
|
"${FILESDIR}"/${P}-c++0x.patch
|
||
|
}
|
||
|
|
||
11 years ago
|
src_configure() {
|
||
|
tc-export CXX
|
||
|
if use qt4 ; then
|
||
|
pushd gui
|
||
|
qt4-r2_src_configure
|
||
|
popd
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
11 years ago
|
emake CFLAGS="${CFLAGS}" \
|
||
|
CFGDIR="/usr/share/${PN}/cfg" \
|
||
|
TINYXML="-ltinyxml2"
|
||
11 years ago
|
if use qt4 ; then
|
||
|
pushd gui
|
||
|
qt4-r2_src_compile
|
||
|
popd
|
||
|
fi
|
||
|
if use htmlreport ; then
|
||
|
pushd htmlreport
|
||
|
distutils-r1_src_compile
|
||
|
popd
|
||
|
fi
|
||
|
}
|
||
|
|
||
11 years ago
|
src_test() {
|
||
|
emake TINYXML="-ltinyxml2" check
|
||
|
}
|
||
|
|
||
11 years ago
|
src_install() {
|
||
11 years ago
|
emake install DESTDIR="${D}" TINYXML="-ltinyxml2"
|
||
11 years ago
|
dodoc readme.txt
|
||
11 years ago
|
insinto "/usr/share/${PN}/cfg"
|
||
|
doins cfg/*.cfg
|
||
11 years ago
|
if use qt4 ; then
|
||
|
dobin gui/${PN}-gui
|
||
|
dodoc readme_gui.txt gui/{projectfile.txt,gui.cppcheck}
|
||
|
fi
|
||
|
if use htmlreport ; then
|
||
|
pushd htmlreport
|
||
|
distutils-r1_src_install
|
||
|
popd
|
||
|
find "${D}" -name "*.egg-info" -delete
|
||
|
fi
|
||
|
}
|