[arch-commits] Commit in cppcheck/trunk (PKGBUILD cppcheck-1.90-tinyxml.patch)
Jelle van der Waa
jelle at archlinux.org
Tue Feb 25 19:54:24 UTC 2020
Date: Tuesday, February 25, 2020 @ 19:54:24
Author: jelle
Revision: 581969
upgpkg: cppcheck 1.90-2
Move to cppcheck for building cppcheck, run tests and use pandoc for generating
html documentation. Resolves: FS#63996, FS#57739, FS#64779
Added:
cppcheck/trunk/cppcheck-1.90-tinyxml.patch
Modified:
cppcheck/trunk/PKGBUILD
-----------------------------+
PKGBUILD | 10 +----
cppcheck-1.90-tinyxml.patch | 84 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 87 insertions(+), 7 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-02-25 19:54:16 UTC (rev 581968)
+++ PKGBUILD 2020-02-25 19:54:24 UTC (rev 581969)
@@ -29,11 +29,6 @@
mkdir build
}
-check() {
- cd "${pkgname}-${pkgver}/build/bin"
- ./testrunner -g -q
-}
-
build() {
cd "${pkgname}-${pkgver}"
export CXXFLAGS+=" -DNDEBUG"
@@ -51,12 +46,13 @@
-DBUILD_TESTS=yes -DFILESDIR=/usr/share/cppcheck \
..
- make cppcheck
+ make
}
+
check() {
cd "${pkgname}-${pkgver}/build/bin"
-#./testrunner -g -q
+ ./testrunner -g -q
}
package() {
Added: cppcheck-1.90-tinyxml.patch
===================================================================
--- cppcheck-1.90-tinyxml.patch (rev 0)
+++ cppcheck-1.90-tinyxml.patch 2020-02-25 19:54:24 UTC (rev 581969)
@@ -0,0 +1,84 @@
+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
+@@ -1,5 +1,4 @@
+ include_directories(${PROJECT_SOURCE_DIR}/lib/)
+-include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
+ include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
+
+ file(GLOB hdrs "*.h")
+@@ -8,7 +7,7 @@ file(GLOB mainfile "main.cpp")
+ list(REMOVE_ITEM srcs ${mainfile})
+
+ add_library(cli_objs OBJECT ${hdrs} ${srcs})
+-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})
+@@ -18,6 +17,7 @@ endif()
+ if (WIN32 AND NOT BORLAND)
+ target_link_libraries(cppcheck Shlwapi.lib)
+ endif()
++target_link_libraries(cppcheck tinyxml2)
+
+ 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)
+ enable_testing()
+ endif()
+
+-add_subdirectory(externals/tinyxml)
+ 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
+@@ -10,7 +10,6 @@ if (BUILD_GUI)
+ endif()
+
+ include_directories(${PROJECT_SOURCE_DIR}/lib/)
+- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
+
+ file(GLOB hdrs "*.h")
+ file(GLOB srcs "*.cpp")
+@@ -20,11 +19,11 @@ 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)
+ 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)
+ 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/)
+- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml)
+ include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
+
+ file(GLOB hdrs "*.h")
+ file(GLOB srcs "*.cpp")
+
+- 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)
+ endif()
++ target_link_libraries(testrunner tinyxml2)
+
+ add_custom_target(copy_cfg ALL
+ COMMENT "Copying cfg files")
More information about the arch-commits
mailing list