diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2017-05-31 20:07:15 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2017-05-31 20:07:15 +0000 |
commit | c9bbe54ef57eea627db24d8731bb4b527188413c (patch) | |
tree | 03ebd4398dbd629ceba2cd07a28394bab1fa76ad /devel/cppcheck/Makefile | |
parent | 9f4e7930a32dedec9f7269d9d843c2b5469335fd (diff) |
- Update to 1.79
- Fix segfault due to conflict between bundled and system tinyxml [1]
- Switch to cmake build, simplifying the port
- Enable GUI
PR: 217881 [1], 218876 [1]
Notes
Notes:
svn path=/head/; revision=442261
Diffstat (limited to 'devel/cppcheck/Makefile')
-rw-r--r-- | devel/cppcheck/Makefile | 83 |
1 files changed, 32 insertions, 51 deletions
diff --git a/devel/cppcheck/Makefile b/devel/cppcheck/Makefile index b697a0de8aeb..a8ecdc473405 100644 --- a/devel/cppcheck/Makefile +++ b/devel/cppcheck/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= cppcheck -PORTVERSION= 1.78 -PORTREVISION= 2 +PORTVERSION= 1.79 CATEGORIES= devel MASTER_SITES= SF @@ -13,68 +12,50 @@ COMMENT= Static analysis of C/C++ code LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING -LIB_DEPENDS= libtinyxml2.so:textproc/tinyxml2 - BROKEN_powerpc64= fails to compile: analyzerinfo.cpp: 'to_string' is not a member of 'std' -USES= compiler:c++11-lib execinfo gmake python shebangfix tar:bzip2 +USES= compiler:c++11-lib cmake shebangfix tar:bzip2 SHEBANG_FILES= htmlreport/cppcheck-htmlreport -USE_CXXSTD= c++11 -ALL_TARGET= cppcheck -TEST_TARGET= test -LDFLAGS+= -L${LOCALBASE}/lib -lexecinfo -MAKE_ENV= TINYXML=-ltinyxml2 CFGDIR="${DATADIR}/cfg" +OPTIONS_DEFINE= RULES GUI HTMLREPORT MANPAGES MATCHCOMPILER TEST +OPTIONS_DEFAULT= RULES GUI HTMLREPORT MANPAGES MATCHCOMPILER +OPTIONS_SUB= yes -PLIST_FILES= bin/cppcheck bin/cppcheck-htmlreport -PORTDATA= * +RULES_DESC= User-defined rule support (requires PCRE) +RULES_CMAKE_BOOL= HAVE_RULES +RULES_LIB_DEPENDS= libpcre.so:devel/pcre +RULES_USES= localbase:ldflags -OPTIONS_DEFINE= MATCHCOMPILER RULES MANPAGES -OPTIONS_DEFAULT= MATCHCOMPILER RULES MANPAGES +GUI_CMAKE_BOOL= BUILD_GUI +GUI_USE= QT4=corelib,gui,xml,qmake_build,moc_build,uic_build,rcc_build,linguisttools_build -MATCHCOMPILER_DESC= Build-time optimizations via Python -RULES_DESC= User-defined rule support (requires PCRE) +TEST_CMAKE_BOOL= BUILD_TESTS + +HTMLREPORT_DESC= Install cppcheck-htmlreport +HTMLREPORT_USES= python:2,${PYUSE:C/ /,/W} +HTMLREPORT_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pygments>0:textproc/py-pygments +HTMLREPORT_PLIST_FILES= bin/cppcheck-htmlreport +HTMLREPORT_VARS= PYUSE+=run -MANPAGES_ALL_TARGET= man MANPAGES_BUILD_DEPENDS= xsltproc:textproc/libxslt \ ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl -MANPAGES_MAKE_ENV= DB2MAN="${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl" -MANPAGES_PLIST_FILES= man/man1/cppcheck.1.gz -MATCHCOMPILER_MAKE_ENV= SRCDIR=build -MATCHCOMPILER_USES= python:2,build +MATCHCOMPILER_DESC= Build-time optimizations via Python +MATCHCOMPILER_CMAKE_BOOL= USE_MATCHCOMPILER +MATCHCOMPILER_USES= python:2,${PYUSE:C/ /,/W} +MATCHCOMPILER_VARS= PYUSE+=build -RULES_LIB_DEPENDS= libpcre.so:devel/pcre -RULES_MAKE_ENV= HAVE_RULES=yes - -post-patch: - @${REINPLACE_CMD} \ - -e 's|-Iexternals/tinyxml|-I${LOCALBASE}/include|' \ - ${WRKSRC}/Makefile - -post-patch-MANPAGES-on: - @${REINPLACE_CMD} -e '\|DB2MAN=|d' \ - ${WRKSRC}/Makefile - -post-patch-MATCHCOMPILER-on: - @${REINPLACE_CMD} -e 's|python|${PYTHON_CMD}|' \ - ${WRKSRC}/Makefile - -post-patch-RULES-on: - @${REINPLACE_CMD} \ - -e '\|CXXFLAGS +=| \ - s| -DTIXML_USE_STL $$(shell pcre-config --cflags)||' \ - -e '\|$$(SRCDIR)/cppcheck.cpp| \ - s|$${INCLUDE_FOR_LIB}|& $$(shell pcre-config --cflags)|' \ - ${WRKSRC}/Makefile - -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/cppcheck ${STAGEDIR}${PREFIX}/bin +post-install-HTMLREPORT-on: ${INSTALL_SCRIPT} ${WRKSRC}/htmlreport/cppcheck-htmlreport ${STAGEDIR}${PREFIX}/bin - @${MKDIR} ${STAGEDIR}${DATADIR}/cfg - @cd ${WRKSRC}/cfg; ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/cfg/ -do-install-MANPAGES-on: - ${INSTALL_MAN} ${WRKSRC}/cppcheck.1 ${STAGEDIR}${PREFIX}/man/man1 +post-build-MANPAGES-on: + cd ${WRKSRC}/man && ${LOCALBASE}/bin/xsltproc --nonet --param man.charmap.use.subset "0" \ + ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl cppcheck.1.xml + +post-install-MANPAGES-on: + ${INSTALL_MAN} ${WRKSRC}/man/cppcheck.1 ${STAGEDIR}${PREFIX}/man/man1 + +do-test-TEST-on: + cd ${WRKSRC} && ctest .include <bsd.port.mk> |