devel/cppcheck: update 2.7.5 → 2.9.1

- Merge cppcheck-gui into cppcheck to simplify maintenance and testing
- Install manpage into canonical location

PR:		267262
Submitted by:	jailbird@fdf.net
This commit is contained in:
Dmitry Marakasov 2022-11-07 19:36:48 +03:00
parent 6a63367a1f
commit a309971953
14 changed files with 60 additions and 86 deletions

1
MOVED
View file

@ -17605,3 +17605,4 @@ devel/py-pyxdg|devel/py-xdg|2022-10-28|Remove duplicate port
lang/chicken5|lang/chicken|2022-10-30|Has expired: Please use lang/chicken instead
devel/py-spyder|devel/spyder|2022-11-06|Spyder is an application, and not a library
www/grafana7||2022-11-07|Has expired: EOLed upstream, unfixed vulnerabilities
devel/cppcheck-gui|devel/cppcheck|2022-11-07|GUI is now included in devel/cppcheck port

View file

@ -430,7 +430,6 @@
SUBDIR += cpp-netlib
SUBDIR += cpp2py
SUBDIR += cppcheck
SUBDIR += cppcheck-gui
SUBDIR += cppi
SUBDIR += cpplint
SUBDIR += cpprestsdk

View file

@ -1,7 +0,0 @@
PORTREVISION= 0
MASTERDIR= ${.CURDIR}/../cppcheck
GUI_ONLY= yes
.include "${MASTERDIR}/Makefile"

View file

@ -1,10 +1,9 @@
PORTNAME= cppcheck
PORTVERSION= 2.7.5
PORTREVISION?= 0 # devel/cppcheck-gui
PORTVERSION= 2.9.1
CATEGORIES= devel
MAINTAINER= amdmi3@FreeBSD.org
COMMENT?= Tool for static C/C++ code analysis
COMMENT= Tool for static C/C++ code analysis
WWW= https://cppcheck.sourceforge.io/
LICENSE= GPLv3+
@ -12,34 +11,16 @@ LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libtinyxml2.so:textproc/tinyxml2
USES= compiler:c++11-lib cmake:insource tar:bzip2
USES= compiler:c++11-lib cmake shebangfix tar:bzip2
USE_GITHUB= yes
GH_ACCOUNT= danmar
SHEBANG_FILES= htmlreport/cppcheck-htmlreport
CMAKE_OFF= USE_BUNDLED_TINYXML2
.if defined(GUI_ONLY)
COMMENT= Static analysis of C/C++ code (GUI)
RUN_DEPENDS= cppcheck:devel/cppcheck
CMAKE_ON+= BUILD_GUI
USES+= qt:5
USE_QT= core gui widgets printsupport help qmake:build buildtools:build linguisttools:build
BUILD_WRKSRC= ${WRKSRC}/gui
INSTALL_WRKSRC= ${WRKSRC}/gui
PLIST= ${PKGDIR}/pkg-plist-gui
PKGNAMESUFFIX= -gui
.else
USES+= shebangfix
SHEBANG_FILES= htmlreport/cppcheck-htmlreport
PORTDATA= *
OPTIONS_DEFINE= RULES HTMLREPORT MANPAGES MATCHCOMPILER TEST
OPTIONS_DEFAULT= RULES HTMLREPORT MANPAGES MATCHCOMPILER
OPTIONS_DEFINE= RULES HTMLREPORT MANPAGES MATCHCOMPILER GUI CHARTS TEST
OPTIONS_DEFAULT= RULES HTMLREPORT MANPAGES MATCHCOMPILER GUI
OPTIONS_SUB= yes
RULES_DESC= User-defined rule support (requires PCRE)
@ -48,6 +29,8 @@ RULES_LIB_DEPENDS= libpcre.so:devel/pcre
RULES_USES= localbase:ldflags
TEST_CMAKE_BOOL= BUILD_TESTS
TEST_IMPLIES= GUI
TEST_USE= QT=testlib
HTMLREPORT_DESC= Install cppcheck-htmlreport
HTMLREPORT_USES= python:${PYUSE:C/ /,/W}
@ -59,10 +42,21 @@ MANPAGES_BUILD_DEPENDS= xsltproc:textproc/libxslt \
${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl
MATCHCOMPILER_DESC= Build-time optimizations via Python
MATCHCOMPILER_CMAKE_BOOL= USE_MATCHCOMPILER
MATCHCOMPILER_CMAKE_ON= -DUSE_MATCHCOMPILER=On
MATCHCOMPILER_CMAKE_OFF=-DUSE_MATCHCOMPILER=Off
MATCHCOMPILER_USES= python:${PYUSE:C/ /,/W}
MATCHCOMPILER_VARS= PYUSE+=build
GUI_DESC= Build the Qt GUI application
GUI_CMAKE_BOOL= BUILD_GUI
GUI_USES= qt:5
GUI_USE= QT=core,gui,widgets,printsupport,help,network,qmake:build,buildtools:build,linguisttools:build
CHARTS_DESC= Enable QtCharts usage in the GUI
CHARTS_CMAKE_BOOL= WITH_QCHART
CHARTS_IMPLIES= GUI
CHARTS_USE= QT=charts
post-install-HTMLREPORT-on:
${INSTALL_SCRIPT} ${WRKSRC}/htmlreport/cppcheck-htmlreport ${STAGEDIR}${PREFIX}/bin
@ -71,10 +65,9 @@ post-build-MANPAGES-on:
${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl cppcheck.1.xml
post-install-MANPAGES-on:
${INSTALL_MAN} ${WRKSRC}/man/cppcheck.1 ${STAGEDIR}${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/man/cppcheck.1 ${STAGEDIR}${PREFIX}/share/man/man1
do-test-TEST-on:
cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ctest
.endif
cd ${BUILD_WRKSRC} && ${SETENV} ${TEST_ENV} ctest
.include <bsd.port.mk>

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1650279480
SHA256 (danmar-cppcheck-2.7.5_GH0.tar.gz) = 6c7ac29e57fa8b3ac7be224510200e579d5a90217e2152591ef46ffc947d8f78
SIZE (danmar-cppcheck-2.7.5_GH0.tar.gz) = 3940968
TIMESTAMP = 1667826946
SHA256 (danmar-cppcheck-2.9.1_GH0.tar.gz) = 41059bbb314167df5fd4751fc7c6eae1f14c1d233221b91fcb927d71ba0f2ae5
SIZE (danmar-cppcheck-2.9.1_GH0.tar.gz) = 5471242

View file

@ -1,11 +1,11 @@
--- cli/CMakeLists.txt.orig 2022-03-19 11:35:06 UTC
--- cli/CMakeLists.txt.orig 2022-08-28 12:43:18 UTC
+++ cli/CMakeLists.txt
@@ -35,7 +35,7 @@ if (WIN32 AND NOT BORLAND)
@@ -37,7 +37,7 @@ if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
endif()
endif()
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
- target_link_libraries(cppcheck ${tinyxml2_LIBRARIES})
+ target_link_libraries(cppcheck tinyxml2::tinyxml2)
endif()
target_link_libraries(cppcheck ${CMAKE_THREAD_LIBS_INIT})
add_dependencies(cppcheck copy_cfg)

View file

@ -1,15 +1,15 @@
--- gui/CMakeLists.txt.orig 2022-03-19 11:35:06 UTC
--- gui/CMakeLists.txt.orig 2022-08-28 12:43:18 UTC
+++ gui/CMakeLists.txt
@@ -36,7 +36,7 @@ if (BUILD_GUI)
target_link_libraries(cppcheck-gui ${Z3_LIBRARIES})
@@ -34,7 +34,7 @@ if (BUILD_GUI)
target_link_libraries(cppcheck-gui ${PCRE_LIBRARY})
endif()
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
- target_link_libraries(cppcheck-gui ${tinyxml2_LIBRARIES})
+ target_link_libraries(cppcheck-gui tinyxml2::tinyxml2)
endif()
target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Help)
target_link_libraries(cppcheck-gui ${QT_CORE_LIB} ${QT_GUI_LIB} ${QT_WIDGETS_LIB} ${QT_PRINTSUPPORT_LIB} ${QT_HELP_LIB})
if(WITH_QCHART)
@@ -51,7 +51,7 @@ if (BUILD_GUI)
@@ -49,7 +49,7 @@ if (BUILD_GUI)
endif()
install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)

View file

@ -1,11 +1,11 @@
--- gui/test/benchmark/simple/CMakeLists.txt.orig 2022-03-19 11:35:06 UTC
--- gui/test/benchmark/simple/CMakeLists.txt.orig 2022-08-28 12:43:18 UTC
+++ gui/test/benchmark/simple/CMakeLists.txt
@@ -20,5 +20,5 @@ if (USE_Z3)
target_link_libraries(benchmark-simple ${Z3_LIBRARIES})
@@ -17,7 +17,7 @@ if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
target_link_libraries(benchmark-simple ${PCRE_LIBRARY})
endif()
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
- target_link_libraries(benchmark-simple ${tinyxml2_LIBRARIES})
-endif()
\ No newline at end of file
+ target_link_libraries(benchmark-simple tinyxml2::tinyxml2)
+endif()
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")

View file

@ -1,7 +1,7 @@
--- gui/test/xmlreportv2/CMakeLists.txt.orig 2022-03-19 11:35:06 UTC
--- gui/test/xmlreportv2/CMakeLists.txt.orig 2022-08-28 12:43:18 UTC
+++ gui/test/xmlreportv2/CMakeLists.txt
@@ -24,5 +24,5 @@ if (USE_Z3)
target_link_libraries(test-xmlreportv2 ${Z3_LIBRARIES})
@@ -21,5 +21,5 @@ if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
target_link_libraries(test-xmlreportv2 ${PCRE_LIBRARY})
endif()
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
- target_link_libraries(test-xmlreportv2 ${tinyxml2_LIBRARIES})

View file

@ -1,11 +1,11 @@
--- lib/CMakeLists.txt.orig 2022-03-19 11:35:06 UTC
--- lib/CMakeLists.txt.orig 2022-08-28 12:43:18 UTC
+++ lib/CMakeLists.txt
@@ -36,6 +36,8 @@ add_library(lib_objs OBJECT ${srcs_lib} ${hdrs})
target_include_directories(lib_objs PRIVATE ${PROJECT_SOURCE_DIR}/externals/)
@@ -36,6 +36,8 @@ if(USE_BUNDLED_TINYXML2)
target_include_directories(lib_objs SYSTEM PRIVATE ${PROJECT_SOURCE_DIR}/externals/)
if(USE_BUNDLED_TINYXML2)
target_include_directories(lib_objs PRIVATE ${PROJECT_SOURCE_DIR}/externals/tinyxml2/)
target_include_directories(lib_objs SYSTEM PRIVATE ${PROJECT_SOURCE_DIR}/externals/tinyxml2/)
+else()
+ target_link_libraries(lib_objs PRIVATE tinyxml2::tinyxml2)
endif()
target_include_directories(lib_objs PRIVATE ${PROJECT_SOURCE_DIR}/externals/picojson/)
target_include_directories(lib_objs PRIVATE ${PROJECT_SOURCE_DIR}/externals/simplecpp/)
target_include_directories(lib_objs SYSTEM PRIVATE ${PROJECT_SOURCE_DIR}/externals/picojson/)
target_include_directories(lib_objs SYSTEM PRIVATE ${PROJECT_SOURCE_DIR}/externals/simplecpp/)

View file

@ -1,7 +1,7 @@
--- oss-fuzz/CMakeLists.txt.orig 2022-03-19 11:35:06 UTC
--- oss-fuzz/CMakeLists.txt.orig 2022-08-28 12:43:18 UTC
+++ oss-fuzz/CMakeLists.txt
@@ -25,7 +25,7 @@ if (ENABLE_OSS_FUZZ AND CMAKE_CXX_COMPILER_ID MATCHES
target_link_libraries(fuzz-client PRIVATE ${Z3_LIBRARIES})
@@ -22,7 +22,7 @@ if (ENABLE_OSS_FUZZ AND CMAKE_CXX_COMPILER_ID MATCHES
target_link_libraries(fuzz-client PRIVATE ${PCRE_LIBRARY})
endif()
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
- target_link_libraries(fuzz-client PRIVATE ${tinyxml2_LIBRARIES})

View file

@ -1,11 +1,11 @@
--- test/CMakeLists.txt.orig 2022-03-19 11:35:06 UTC
--- test/CMakeLists.txt.orig 2022-08-28 12:43:18 UTC
+++ test/CMakeLists.txt
@@ -26,7 +26,7 @@ if (BUILD_TESTS)
@@ -23,7 +23,7 @@ if (BUILD_TESTS)
endif()
endif()
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
- target_link_libraries(testrunner ${tinyxml2_LIBRARIES})
+ target_link_libraries(testrunner tinyxml2::tinyxml2)
endif()
target_link_libraries(testrunner ${CMAKE_THREAD_LIBS_INIT})
if (NOT CMAKE_DISABLE_PRECOMPILE_HEADERS)

View file

@ -1,2 +1,6 @@
bin/cppcheck
%%MANPAGES%%man/man1/cppcheck.1.gz
%%GUI%%bin/cppcheck-gui
%%GUI%%share/applications/cppcheck-gui.desktop
%%GUI%%share/icons/hicolor/64x64/apps/cppcheck-gui.png
%%GUI%%share/icons/hicolor/scalable/apps/cppcheck-gui.svg
%%MANPAGES%%share/man/man1/cppcheck.1.gz

View file

@ -1,16 +0,0 @@
bin/cppcheck-gui
share/applications/cppcheck-gui.desktop
%%DATADIR%%/lang/cppcheck_de.qm
%%DATADIR%%/lang/cppcheck_es.qm
%%DATADIR%%/lang/cppcheck_fi.qm
%%DATADIR%%/lang/cppcheck_fr.qm
%%DATADIR%%/lang/cppcheck_it.qm
%%DATADIR%%/lang/cppcheck_ja.qm
%%DATADIR%%/lang/cppcheck_ko.qm
%%DATADIR%%/lang/cppcheck_nl.qm
%%DATADIR%%/lang/cppcheck_ru.qm
%%DATADIR%%/lang/cppcheck_sr.qm
%%DATADIR%%/lang/cppcheck_sv.qm
%%DATADIR%%/lang/cppcheck_zh_CN.qm
share/icons/hicolor/64x64/apps/cppcheck-gui.png
share/icons/hicolor/scalable/apps/cppcheck-gui.svg