mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
community/cppcheck to 2.1-1
This commit is contained in:
parent
8387faff47
commit
9b324154c0
2 changed files with 31 additions and 25 deletions
|
@ -5,8 +5,8 @@
|
|||
# - remove makedepend on pandoc, don't generate manuals
|
||||
|
||||
pkgname=cppcheck
|
||||
pkgver=2.0
|
||||
pkgrel=2
|
||||
pkgver=2.1
|
||||
pkgrel=1
|
||||
pkgdesc="A tool for static C/C++ code analysis"
|
||||
arch=('x86_64')
|
||||
url="http://cppcheck.sourceforge.net/"
|
||||
|
@ -17,17 +17,17 @@ optdepends=('qt5-base: run cppcheck-gui'
|
|||
'python-pygments: cppcheck-htmlreport'
|
||||
'clang: for cppcheck-gui integration')
|
||||
source=($pkgname-$pkgver.tar.gz::https://github.com/danmar/cppcheck/archive/${pkgver}.tar.gz
|
||||
translations-location.patch cppcheck-1.90-tinyxml.patch)
|
||||
sha1sums=('a6e5bdba6a453d5931a9e8ff2e2122255402dcb3'
|
||||
translations-location.patch cppcheck-2.1-tinyxml.patch)
|
||||
sha1sums=('e59758410408fa0679df06e8c3f3dd4e8c930d00'
|
||||
'03b0888438cf92ccdcbf307dbc3c35e65c91b844'
|
||||
'12d885e1b0a0a899faa190182a9ad5a8e53476a5')
|
||||
'6859e2350169af231cdb04336413a508c339a652')
|
||||
|
||||
prepare() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
patch -Np1 -i $srcdir/translations-location.patch
|
||||
patch -Np1 -i $srcdir/cppcheck-1.90-tinyxml.patch
|
||||
patch -Np1 -i $srcdir/cppcheck-2.1-tinyxml.patch
|
||||
|
||||
sed -i 's/2.0/2.0.0/' cmake/versions.cmake
|
||||
#sed -i 's/2.0/2.0.0/' cmake/versions.cmake
|
||||
|
||||
# Make sure bundled tinyxml is not used
|
||||
rm -r externals/tinyxml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
diff -urp a/cli/CMakeLists.txt b/cli/CMakeLists.txt
|
||||
--- a/cli/CMakeLists.txt 2019-12-21 11:51:10.000000000 +0100
|
||||
+++ b/cli/CMakeLists.txt 2019-12-21 23:29:02.266101262 +0100
|
||||
diff -up cppcheck-2.1/cli/CMakeLists.txt.orig cppcheck-2.1/cli/CMakeLists.txt
|
||||
--- cppcheck-2.1/cli/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200
|
||||
+++ cppcheck-2.1/cli/CMakeLists.txt 2020-06-15 11:52:39.095165469 +0200
|
||||
@@ -1,5 +1,4 @@
|
||||
include_directories(${PROJECT_SOURCE_DIR}/lib/)
|
||||
-include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
|
||||
|
@ -14,8 +14,8 @@ diff -urp a/cli/CMakeLists.txt b/cli/CMakeLists.txt
|
|||
-add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
||||
+add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
||||
if (HAVE_RULES)
|
||||
find_library(PCRE_LIBRARY pcre)
|
||||
target_link_libraries(cppcheck ${PCRE_LIBRARY})
|
||||
endif()
|
||||
@@ -18,6 +17,7 @@ endif()
|
||||
if (WIN32 AND NOT BORLAND)
|
||||
target_link_libraries(cppcheck Shlwapi.lib)
|
||||
|
@ -24,10 +24,10 @@ diff -urp a/cli/CMakeLists.txt b/cli/CMakeLists.txt
|
|||
|
||||
install(TARGETS cppcheck
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
|
||||
diff -urp a/CMakeLists.txt b/CMakeLists.txt
|
||||
--- a/CMakeLists.txt 2019-12-21 11:51:10.000000000 +0100
|
||||
+++ b/CMakeLists.txt 2019-12-21 23:30:07.419801154 +0100
|
||||
@@ -21,7 +21,6 @@ if (BUILD_TESTS)
|
||||
diff -up cppcheck-2.1/CMakeLists.txt.orig cppcheck-2.1/CMakeLists.txt
|
||||
--- cppcheck-2.1/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200
|
||||
+++ cppcheck-2.1/CMakeLists.txt 2020-06-15 11:52:39.099165304 +0200
|
||||
@@ -23,7 +23,6 @@ if (BUILD_TESTS)
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
|
@ -35,9 +35,9 @@ diff -urp a/CMakeLists.txt b/CMakeLists.txt
|
|||
add_subdirectory(externals/simplecpp)
|
||||
add_subdirectory(lib) # CppCheck Library
|
||||
add_subdirectory(cli) # Client application
|
||||
diff -urp a/gui/CMakeLists.txt b/gui/CMakeLists.txt
|
||||
--- a/gui/CMakeLists.txt 2019-12-21 11:51:10.000000000 +0100
|
||||
+++ b/gui/CMakeLists.txt 2019-12-21 23:33:01.688541115 +0100
|
||||
diff -up cppcheck-2.1/gui/CMakeLists.txt.orig cppcheck-2.1/gui/CMakeLists.txt
|
||||
--- cppcheck-2.1/gui/CMakeLists.txt.orig 2020-06-13 18:08:37.000000000 +0200
|
||||
+++ cppcheck-2.1/gui/CMakeLists.txt 2020-06-15 11:53:24.866217469 +0200
|
||||
@@ -10,7 +10,6 @@ if (BUILD_GUI)
|
||||
endif()
|
||||
|
||||
|
@ -46,24 +46,27 @@ diff -urp a/gui/CMakeLists.txt b/gui/CMakeLists.txt
|
|||
|
||||
file(GLOB hdrs "*.h")
|
||||
file(GLOB srcs "*.cpp")
|
||||
@@ -20,11 +19,11 @@ if (BUILD_GUI)
|
||||
@@ -20,14 +19,14 @@ if (BUILD_GUI)
|
||||
QT5_ADD_RESOURCES(resources "gui.qrc")
|
||||
QT5_ADD_TRANSLATION(qms ${tss})
|
||||
|
||||
- add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
||||
+ add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
||||
if (HAVE_RULES)
|
||||
target_link_libraries(cppcheck-gui pcre)
|
||||
target_link_libraries(cppcheck-gui ${PCRE_LIBRARY})
|
||||
endif()
|
||||
if (USE_Z3)
|
||||
target_link_libraries(cppcheck-gui ${Z3_LIBRARIES})
|
||||
endif()
|
||||
- target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)
|
||||
+ target_link_libraries(cppcheck-gui tinyxml2 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)
|
||||
if(WITH_QCHART)
|
||||
target_compile_definitions (cppcheck-gui PRIVATE HAVE_QCHART )
|
||||
target_link_libraries(cppcheck-gui Qt5::Charts)
|
||||
diff -urp a/test/CMakeLists.txt b/test/CMakeLists.txt
|
||||
--- a/test/CMakeLists.txt 2019-12-21 11:51:10.000000000 +0100
|
||||
+++ b/test/CMakeLists.txt 2019-12-21 23:34:50.432203245 +0100
|
||||
@@ -12,16 +12,16 @@ if (BUILD_TESTS)
|
||||
diff -up cppcheck-2.1/test/CMakeLists.txt.orig cppcheck-2.1/test/CMakeLists.txt
|
||||
--- cppcheck-2.1/test/CMakeLists.txt.orig 2020-06-15 11:52:39.108164933 +0200
|
||||
+++ cppcheck-2.1/test/CMakeLists.txt 2020-06-15 11:54:10.167286593 +0200
|
||||
@@ -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)
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/lib/ ${PROJECT_SOURCE_DIR}/cli/)
|
||||
|
@ -76,7 +79,10 @@ diff -urp a/test/CMakeLists.txt b/test/CMakeLists.txt
|
|||
- add_executable(testrunner ${hdrs} ${srcs} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
||||
+ add_executable(testrunner ${hdrs} ${srcs} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
||||
if (HAVE_RULES)
|
||||
target_link_libraries(testrunner pcre)
|
||||
target_link_libraries(testrunner ${PCRE_LIBRARY})
|
||||
endif()
|
||||
if (USE_Z3)
|
||||
target_link_libraries(testrunner ${Z3_LIBRARIES})
|
||||
endif()
|
||||
+ target_link_libraries(testrunner tinyxml2)
|
||||
|
Loading…
Reference in a new issue