DRAFT cppcheck-native: Import from meta-sca@1340a465cd183eccc43d9a6334c7cdff0b5888b2
This commit is contained in:
parent
f7c0c9ae58
commit
f9c1467c88
|
@ -0,0 +1,9 @@
|
||||||
|
require cppcheck.inc
|
||||||
|
|
||||||
|
SRC_URI = " https://github.com/danmar/cppcheck/archive/${PV}.tar.gz \
|
||||||
|
file://0001-makefile.patch \
|
||||||
|
file://0002-pkgconfig-instaed-of-pcre-config.patch \
|
||||||
|
file://cppcheck.sca.description"
|
||||||
|
SRC_URI[md5sum] = "eba3b8b4d69045bd24104c2d0cc0cb0c"
|
||||||
|
SRC_URI[sha256sum] = "ea7ac1cd2f5c00ecffd596fd0f7281cba44308e565a634fae02b77ecd927c153"
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
|
@ -0,0 +1,34 @@
|
||||||
|
SUMMARY = "Static code analyzer for C/C++"
|
||||||
|
DESCRIPTION = " Static code analyzer for C/C++."
|
||||||
|
|
||||||
|
HOMEPAGE = " http://cppcheck.sourceforge.net/"
|
||||||
|
BUGTRACKER = " https://trac.cppcheck.net/"
|
||||||
|
LICENSE = "GPLv3"
|
||||||
|
|
||||||
|
inherit native
|
||||||
|
|
||||||
|
inherit pkgconfig
|
||||||
|
|
||||||
|
DEPENDS = "libpcre-native"
|
||||||
|
|
||||||
|
## we don't need debug packages
|
||||||
|
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||||
|
|
||||||
|
EXTRA_OEMAKE = "HAVE_RULES=yes"
|
||||||
|
|
||||||
|
do_compile() {
|
||||||
|
oe_runmake
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES_${PN} = "${bindir}/** ${datadir}"
|
||||||
|
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
install -d ${D}${bindir}
|
||||||
|
install -d ${D}${datadir}
|
||||||
|
install ${B}/cppcheck ${D}${bindir}
|
||||||
|
cp -R ${B}/addons ${D}${bindir}
|
||||||
|
cp -R ${B}/cfg ${D}${bindir}
|
||||||
|
install -D ${B}/htmlreport/cppcheck-htmlreport ${D}${bindir}
|
||||||
|
install ${WORKDIR}/cppcheck.sca.description ${D}${datadir}
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -102,9 +102,11 @@
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
-ifndef PREFIX
|
||||||
|
- PREFIX=/usr
|
||||||
|
-endif
|
||||||
|
+DESTDIR?= ""
|
||||||
|
+prefix?= "/usr"
|
||||||
|
+bindir?= "$(prefix)/bin"
|
||||||
|
+BINDIR=$(bindir)
|
||||||
|
+PREFIX=$(prefix)
|
||||||
|
|
||||||
|
ifndef INCLUDE_FOR_LIB
|
||||||
|
INCLUDE_FOR_LIB=-Ilib -Iexternals/simplecpp -Iexternals/tinyxml
|
||||||
|
@@ -117,8 +119,6 @@
|
||||||
|
ifndef INCLUDE_FOR_TEST
|
||||||
|
INCLUDE_FOR_TEST=-Ilib -Icli -Iexternals/simplecpp -Iexternals/tinyxml
|
||||||
|
endif
|
||||||
|
-
|
||||||
|
-BIN=$(DESTDIR)$(PREFIX)/bin
|
||||||
|
|
||||||
|
# For 'make man': sudo apt-get install xsltproc docbook-xsl docbook-xml on Linux
|
||||||
|
DB2MAN?=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
|
||||||
|
@@ -287,11 +287,11 @@
|
||||||
|
ctags -R --exclude=doxyoutput --exclude=test/cfg cli externals gui lib test
|
||||||
|
|
||||||
|
install: cppcheck
|
||||||
|
- install -d ${BIN}
|
||||||
|
- install cppcheck ${BIN}
|
||||||
|
- install addons/*.py ${BIN}
|
||||||
|
- install addons/*/*.py ${BIN}
|
||||||
|
- install htmlreport/cppcheck-htmlreport ${BIN}
|
||||||
|
+ install -d ${DESTDIR}${BINDIR}
|
||||||
|
+ install cppcheck ${DESTDIR}${BINDIR}
|
||||||
|
+ install addons/*.py ${DESTDIR}${BINDIR}
|
||||||
|
+ install addons/*/*.py ${DESTDIR}${BINDIR}
|
||||||
|
+ install htmlreport/cppcheck-htmlreport ${DESTDIR}${BINDIR}
|
||||||
|
ifdef CFGDIR
|
||||||
|
install -d ${DESTDIR}${CFGDIR}
|
||||||
|
install -m 644 cfg/* ${DESTDIR}${CFGDIR}
|
|
@ -0,0 +1,17 @@
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile-1
|
||||||
|
@@ -94,11 +94,11 @@
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(HAVE_RULES),yes)
|
||||||
|
- override CXXFLAGS += -DHAVE_RULES -DTIXML_USE_STL $(shell pcre-config --cflags)
|
||||||
|
+ override CXXFLAGS += -DHAVE_RULES -DTIXML_USE_STL $(shell pkg-config libpcre --cflags)
|
||||||
|
ifdef LIBS
|
||||||
|
- LIBS += $(shell pcre-config --libs)
|
||||||
|
+ LIBS += $(shell pkg-config libpcre --libs)
|
||||||
|
else
|
||||||
|
- LIBS=$(shell pcre-config --libs)
|
||||||
|
+ LIBS=$(shell pkg-config libpcre --libs)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"languages": ["C", "CPP"],
|
||||||
|
"buildspeed" : "fast",
|
||||||
|
"execspeed": "fast",
|
||||||
|
"quality": "good"
|
||||||
|
}
|
Loading…
Reference in New Issue