community/cppcheck to 2.2-1

This commit is contained in:
Kevin Mihelich 2020-10-23 21:00:38 +00:00
parent e34e290c97
commit 889c523db7
2 changed files with 22 additions and 24 deletions

View file

@ -5,29 +5,27 @@
# - remove makedepend on pandoc, don't generate manuals # - remove makedepend on pandoc, don't generate manuals
pkgname=cppcheck pkgname=cppcheck
pkgver=2.1 pkgver=2.2
pkgrel=1 pkgrel=1
pkgdesc="A tool for static C/C++ code analysis" pkgdesc="A tool for static C/C++ code analysis"
arch=('x86_64') arch=('x86_64')
url="http://cppcheck.sourceforge.net/" url="http://cppcheck.sourceforge.net/"
license=('GPL') license=('GPL')
depends=('python-pygments' 'tinyxml2') depends=('python-pygments' 'tinyxml2')
makedepends=('docbook-xsl' 'qt5-tools' 'qt5-base' 'python' 'cmake') makedepends=('docbook-xsl' 'qt5-tools' 'qt5-base' 'python' 'cmake' 'clang')
optdepends=('qt5-base: run cppcheck-gui' optdepends=('qt5-base: run cppcheck-gui'
'python-pygments: cppcheck-htmlreport' 'python-pygments: cppcheck-htmlreport'
'clang: for cppcheck-gui integration') 'clang: for cppcheck-gui integration')
source=($pkgname-$pkgver.tar.gz::https://github.com/danmar/cppcheck/archive/${pkgver}.tar.gz source=($pkgname-$pkgver.tar.gz::https://github.com/danmar/cppcheck/archive/${pkgver}.tar.gz
translations-location.patch cppcheck-2.1-tinyxml.patch) translations-location.patch cppcheck-2.2-tinyxml.patch)
sha1sums=('e59758410408fa0679df06e8c3f3dd4e8c930d00' sha1sums=('11bdc2f82269cf74f9882719f761cde79443a928'
'03b0888438cf92ccdcbf307dbc3c35e65c91b844' '03b0888438cf92ccdcbf307dbc3c35e65c91b844'
'6859e2350169af231cdb04336413a508c339a652') 'd83e1202770b7389c14a91885d7d838c097d7680')
prepare() { prepare() {
cd "${pkgname}-${pkgver}" cd "${pkgname}-${pkgver}"
patch -Np1 -i $srcdir/translations-location.patch patch -Np1 -i $srcdir/translations-location.patch
patch -Np1 -i $srcdir/cppcheck-2.1-tinyxml.patch patch -Np1 -i $srcdir/cppcheck-2.2-tinyxml.patch
#sed -i 's/2.0/2.0.0/' cmake/versions.cmake
# Make sure bundled tinyxml is not used # Make sure bundled tinyxml is not used
rm -r externals/tinyxml rm -r externals/tinyxml

View file

@ -1,6 +1,6 @@
diff -up cppcheck-2.1/cli/CMakeLists.txt.orig cppcheck-2.1/cli/CMakeLists.txt diff -up cppcheck-2.2/cli/CMakeLists.txt.orig cppcheck-2.2/cli/CMakeLists.txt
--- cppcheck-2.1/cli/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200 --- cppcheck-2.2/cli/CMakeLists.txt.orig 2020-10-03 11:05:53.000000000 +0200
+++ cppcheck-2.1/cli/CMakeLists.txt 2020-06-15 11:52:39.095165469 +0200 +++ cppcheck-2.2/cli/CMakeLists.txt 2020-10-04 06:47:29.867450500 +0200
@@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
include_directories(${PROJECT_SOURCE_DIR}/lib/) include_directories(${PROJECT_SOURCE_DIR}/lib/)
-include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/) -include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
@ -24,9 +24,9 @@ diff -up cppcheck-2.1/cli/CMakeLists.txt.orig cppcheck-2.1/cli/CMakeLists.txt
install(TARGETS cppcheck install(TARGETS cppcheck
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
diff -up cppcheck-2.1/CMakeLists.txt.orig cppcheck-2.1/CMakeLists.txt diff -up cppcheck-2.2/CMakeLists.txt.orig cppcheck-2.2/CMakeLists.txt
--- cppcheck-2.1/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200 --- cppcheck-2.2/CMakeLists.txt.orig 2020-10-03 11:05:53.000000000 +0200
+++ cppcheck-2.1/CMakeLists.txt 2020-06-15 11:52:39.099165304 +0200 +++ cppcheck-2.2/CMakeLists.txt 2020-10-04 06:48:18.324566600 +0200
@@ -23,7 +23,6 @@ if (BUILD_TESTS) @@ -23,7 +23,6 @@ if (BUILD_TESTS)
enable_testing() enable_testing()
endif() endif()
@ -35,9 +35,9 @@ diff -up cppcheck-2.1/CMakeLists.txt.orig cppcheck-2.1/CMakeLists.txt
add_subdirectory(externals/simplecpp) add_subdirectory(externals/simplecpp)
add_subdirectory(lib) # CppCheck Library add_subdirectory(lib) # CppCheck Library
add_subdirectory(cli) # Client application add_subdirectory(cli) # Client application
diff -up cppcheck-2.1/gui/CMakeLists.txt.orig cppcheck-2.1/gui/CMakeLists.txt diff -up cppcheck-2.2/gui/CMakeLists.txt.orig cppcheck-2.2/gui/CMakeLists.txt
--- cppcheck-2.1/gui/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200 --- cppcheck-2.2/gui/CMakeLists.txt.orig 2020-10-03 11:05:53.000000000 +0200
+++ cppcheck-2.1/gui/CMakeLists.txt 2020-06-15 11:53:24.866217469 +0200 +++ cppcheck-2.2/gui/CMakeLists.txt 2020-10-04 07:36:13.199769100 +0200
@@ -10,7 +10,6 @@ if (BUILD_GUI) @@ -10,7 +10,6 @@ if (BUILD_GUI)
endif() endif()
@ -58,14 +58,14 @@ diff -up cppcheck-2.1/gui/CMakeLists.txt.orig cppcheck-2.1/gui/CMakeLists.txt
if (USE_Z3) if (USE_Z3)
target_link_libraries(cppcheck-gui ${Z3_LIBRARIES}) target_link_libraries(cppcheck-gui ${Z3_LIBRARIES})
endif() endif()
- target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport) - target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Help)
+ target_link_libraries(cppcheck-gui tinyxml2 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport) + target_link_libraries(cppcheck-gui tinyxml2 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Help)
if(WITH_QCHART) if(WITH_QCHART)
target_compile_definitions (cppcheck-gui PRIVATE HAVE_QCHART ) target_compile_definitions (cppcheck-gui PRIVATE HAVE_QCHART )
target_link_libraries(cppcheck-gui Qt5::Charts) target_link_libraries(cppcheck-gui Qt5::Charts)
diff -up cppcheck-2.1/test/CMakeLists.txt.orig cppcheck-2.1/test/CMakeLists.txt diff -up cppcheck-2.2/test/CMakeLists.txt.orig cppcheck-2.2/test/CMakeLists.txt
--- cppcheck-2.1/test/CMakeLists.txt.orig 2020-06-15 11:52:39.108164933 +0200 --- cppcheck-2.2/test/CMakeLists.txt.orig 2020-10-03 11:05:53.000000000 +0200
+++ cppcheck-2.1/test/CMakeLists.txt 2020-06-15 11:54:10.167286593 +0200 +++ cppcheck-2.2/test/CMakeLists.txt 2020-10-04 06:55:33.660775300 +0200
@@ -13,19 +13,19 @@ if (BUILD_TESTS) @@ -13,19 +13,19 @@ if (BUILD_TESTS)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -j ${CTEST_PARALLEL_LEVEL} -C ${CMAKE_CFG_INTDIR} --timeout 90) add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -j ${CTEST_PARALLEL_LEVEL} -C ${CMAKE_CFG_INTDIR} --timeout 90)
@ -86,5 +86,5 @@ diff -up cppcheck-2.1/test/CMakeLists.txt.orig cppcheck-2.1/test/CMakeLists.txt
endif() endif()
+ target_link_libraries(testrunner tinyxml2) + target_link_libraries(testrunner tinyxml2)
add_custom_target(copy_cfg ALL if (NOT CMAKE_DISABLE_PRECOMPILE_HEADERS)
COMMENT "Copying cfg files") target_precompile_headers(testrunner PRIVATE precompiled.h)