forked from ros/meta-ros
-
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.
cppcheck-native: Import from meta-sca@1340a465cd183eccc43d9a6334c7cdf…
…f0b5888b2
- Loading branch information
1 parent
c4db427
commit ac4efb8
Showing
5 changed files
with
109 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 |
---|---|---|
@@ -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" |
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,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} | ||
} |
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,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} |
17 changes: 17 additions & 0 deletions
17
recipes-sca/cppcheck-native/files/0002-pkgconfig-instaed-of-pcre-config.patch
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,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 | ||
|
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,6 @@ | ||
{ | ||
"languages": ["C", "CPP"], | ||
"buildspeed" : "fast", | ||
"execspeed": "fast", | ||
"quality": "good" | ||
} |