[arch-commits] Commit in cppcheck/repos/community-x86_64 (5 files)
Jelle van der Waa
jelle at archlinux.org
Tue Feb 25 19:54:36 UTC 2020
Date: Tuesday, February 25, 2020 @ 19:54:34
Author: jelle
Revision: 581970
archrelease: copy trunk to community-x86_64
Added:
cppcheck/repos/community-x86_64/PKGBUILD
(from rev 581969, cppcheck/trunk/PKGBUILD)
cppcheck/repos/community-x86_64/cppcheck-1.90-tinyxml.patch
(from rev 581969, cppcheck/trunk/cppcheck-1.90-tinyxml.patch)
cppcheck/repos/community-x86_64/translations-location.patch
(from rev 581969, cppcheck/trunk/translations-location.patch)
Deleted:
cppcheck/repos/community-x86_64/PKGBUILD
cppcheck/repos/community-x86_64/translations-location.patch
-----------------------------+
PKGBUILD | 133 ++++++++++++++++++++++--------------------
cppcheck-1.90-tinyxml.patch | 84 ++++++++++++++++++++++++++
translations-location.patch | 40 ++++++------
3 files changed, 174 insertions(+), 83 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2020-02-25 19:54:24 UTC (rev 581969)
+++ PKGBUILD 2020-02-25 19:54:34 UTC (rev 581970)
@@ -1,63 +0,0 @@
-# Maintainer: Jelle van der Waa <jelle at archlinux.org>
-# Maintainer: Stéphane Gaudreault <stephane at archlinux.org>
-
-pkgname=cppcheck
-pkgver=1.90
-pkgrel=1
-pkgdesc="A tool for static C/C++ code analysis"
-arch=('x86_64')
-url="http://cppcheck.sourceforge.net/"
-license=('GPL')
-depends=('python-pygments')
-makedepends=('docbook-xsl' 'qt5-tools' 'qt5-base' 'python')
-optdepends=('qt5-base: run cppcheck-gui')
-source=($pkgname-$pkgver.tar.gz::https://github.com/danmar/cppcheck/archive/${pkgver}.tar.gz
- translations-location.patch)
-sha1sums=('852d69a60b6caf023a3420943ebdc29e99fd0349'
- '03b0888438cf92ccdcbf307dbc3c35e65c91b844')
-
-prepare() {
- cd "${pkgname}-${pkgver}"
- patch -Np1 -i $srcdir/translations-location.patch
-}
-
-build() {
- cd "${pkgname}-${pkgver}"
- export CXXFLAGS+=" -DNDEBUG"
- # Unicode fix
- LANG='en_US.UTF-8' make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes USE_MATCHCOMPILER=yes
-
- make DB2MAN=/usr/share/xml/docbook/xsl-stylesheets-1.79.2/manpages/docbook.xsl CFGDIR=/usr/share/cppcheck/cfg man
-
- cd gui
- lrelease gui.pro
- qmake HAVE_RULES=yes
- make CFGDIR=/usr/share/cppcheck/cfg USE_MATCHCOMPILER=yes HAVE_RULES=yes SRCDIR=build
-}
-
-check() {
- cd "${pkgname}-${pkgver}"
-
- #LANG='en_US.UTF-8' make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes test
-}
-
-package() {
- cd "${pkgname}-${pkgver}"
- LANG='en_US.UTF-8' make DESTDIR="${pkgdir}" \
- FILESDIR=/usr/share/cppcheck \
- CFGDIR=/usr/share/cppcheck/cfg \
- USE_MATCHCOMPILER=yes HAVE_RULES=yes install
-
- install -D -p -m 644 cppcheck.1 "${pkgdir}"/usr/share/man/man1/cppcheck.1
-
- # GUI
- install -m755 gui/cppcheck-gui "${pkgdir}"/usr/bin
- install -d "${pkgdir}/usr/share/applications/"
- install -m644 gui/cppcheck-gui.desktop "${pkgdir}/usr/share/applications/"
-
- install -d "${pkgdir}"/usr/share/cppcheck/cfg
- install -D ./cfg/* -t "${pkgdir}"/usr/share/cppcheck/cfg
-
- install -d "${pkgdir}"/usr/share/cppcheck/cfg/lang
- install -D gui/*.qm -t "${pkgdir}"/usr/share/cppcheck/cfg/lang/
-}
Copied: cppcheck/repos/community-x86_64/PKGBUILD (from rev 581969, cppcheck/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2020-02-25 19:54:34 UTC (rev 581970)
@@ -0,0 +1,70 @@
+# Maintainer: Jelle van der Waa <jelle at archlinux.org>
+# Maintainer: Stéphane Gaudreault <stephane at archlinux.org>
+
+pkgname=cppcheck
+pkgver=1.90
+pkgrel=2
+pkgdesc="A tool for static C/C++ code analysis"
+arch=('x86_64')
+url="http://cppcheck.sourceforge.net/"
+license=('GPL')
+depends=('python-pygments' 'tinyxml2')
+makedepends=('docbook-xsl' 'qt5-tools' 'qt5-base' 'python' 'pandoc' 'cmake')
+optdepends=('qt5-base: run cppcheck-gui'
+ 'python-pygments: cppcheck-htmlreport')
+source=($pkgname-$pkgver.tar.gz::https://github.com/danmar/cppcheck/archive/${pkgver}.tar.gz
+ translations-location.patch cppcheck-1.90-tinyxml.patch)
+sha1sums=('852d69a60b6caf023a3420943ebdc29e99fd0349'
+ '03b0888438cf92ccdcbf307dbc3c35e65c91b844'
+ '12d885e1b0a0a899faa190182a9ad5a8e53476a5')
+
+prepare() {
+ cd "${pkgname}-${pkgver}"
+ patch -Np1 -i $srcdir/translations-location.patch
+ patch -Np1 -i $srcdir/cppcheck-1.90-tinyxml.patch
+
+ # Make sure bundled tinyxml is not used
+ rm -r externals/tinyxml
+
+ mkdir build
+}
+
+build() {
+ cd "${pkgname}-${pkgver}"
+ export CXXFLAGS+=" -DNDEBUG"
+
+ # Manuals
+ xsversion=$(pacman -Qi docbook-xsl | grep ^Version | sed -e 's/.*: //' -e 's/-[0-9]$//')
+ make DB2MAN=/usr/share/xml/docbook/xsl-stylesheets-${xsversion}-nons/manpages/docbook.xsl man
+ pandoc man/manual.md -o man/manual.html -s --number-sections --toc
+ pandoc man/reference-cfg-format.md -o man/reference-cfg-format.html -s --number-sections --toc
+
+ cd build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
+ -DUSE_MATCHCOMPILER=yes -DHAVE_RULES=yes \
+ -DBUILD_GUI=yes -DBUILD_SHARED_LIBS:BOOL=OFF \
+ -DBUILD_TESTS=yes -DFILESDIR=/usr/share/cppcheck \
+ ..
+
+ make
+}
+
+
+check() {
+ cd "${pkgname}-${pkgver}/build/bin"
+ ./testrunner -g -q
+}
+
+package() {
+ cd "${pkgname}-${pkgver}/build"
+ make DESTDIR="${pkgdir}" install
+
+ cd ..
+
+ install -D -p -m 644 cppcheck.1 "${pkgdir}"/usr/share/man/man1/cppcheck.1
+ install -D -p -m 755 htmlreport/cppcheck-htmlreport "${pkgdir}"/usr/bin/cppcheck-htmlreport
+
+ # Fix location of language files
+ install -d "${pkgdir}"/usr/share/cppcheck/cfg/lang
+ mv "${pkgdir}"/usr/bin/cppcheck_*.qm "${pkgdir}"/usr/share/cppcheck/cfg/lang/
+}
Copied: cppcheck/repos/community-x86_64/cppcheck-1.90-tinyxml.patch (from rev 581969, cppcheck/trunk/cppcheck-1.90-tinyxml.patch)
===================================================================
--- cppcheck-1.90-tinyxml.patch (rev 0)
+++ cppcheck-1.90-tinyxml.patch 2020-02-25 19:54:34 UTC (rev 581970)
@@ -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")
Deleted: translations-location.patch
===================================================================
--- translations-location.patch 2020-02-25 19:54:24 UTC (rev 581969)
+++ translations-location.patch 2020-02-25 19:54:34 UTC (rev 581970)
@@ -1,20 +0,0 @@
-diff -aur cppcheck-1.89/gui/translationhandler.cpp cppcheck-1.89.new/gui/translationhandler.cpp
---- cppcheck-1.89/gui/translationhandler.cpp 2019-09-01 15:01:12.000000000 +0200
-+++ cppcheck-1.89.new/gui/translationhandler.cpp 2019-10-02 13:47:44.503900628 +0200
-@@ -116,15 +116,7 @@
- if (datadir.isEmpty())
- datadir = appPath;
-
-- QString translationFile;
-- if (QFile::exists(datadir + "/lang/" + mTranslations[index].mFilename + ".qm"))
-- translationFile = datadir + "/lang/" + mTranslations[index].mFilename + ".qm";
--
-- else if (QFile::exists(datadir + "/" + mTranslations[index].mFilename + ".qm"))
-- translationFile = datadir + "/" + mTranslations[index].mFilename + ".qm";
--
-- else
-- translationFile = appPath + "/" + mTranslations[index].mFilename + ".qm";
-+ QString translationFile("/usr/share/cppcheck/cfg/lang/" + mTranslations[index].mFilename + ".qm");
-
- if (!mTranslator->load(translationFile) && !failure) {
- //If it failed, lets check if the default file exists
Copied: cppcheck/repos/community-x86_64/translations-location.patch (from rev 581969, cppcheck/trunk/translations-location.patch)
===================================================================
--- translations-location.patch (rev 0)
+++ translations-location.patch 2020-02-25 19:54:34 UTC (rev 581970)
@@ -0,0 +1,20 @@
+diff -aur cppcheck-1.89/gui/translationhandler.cpp cppcheck-1.89.new/gui/translationhandler.cpp
+--- cppcheck-1.89/gui/translationhandler.cpp 2019-09-01 15:01:12.000000000 +0200
++++ cppcheck-1.89.new/gui/translationhandler.cpp 2019-10-02 13:47:44.503900628 +0200
+@@ -116,15 +116,7 @@
+ if (datadir.isEmpty())
+ datadir = appPath;
+
+- QString translationFile;
+- if (QFile::exists(datadir + "/lang/" + mTranslations[index].mFilename + ".qm"))
+- translationFile = datadir + "/lang/" + mTranslations[index].mFilename + ".qm";
+-
+- else if (QFile::exists(datadir + "/" + mTranslations[index].mFilename + ".qm"))
+- translationFile = datadir + "/" + mTranslations[index].mFilename + ".qm";
+-
+- else
+- translationFile = appPath + "/" + mTranslations[index].mFilename + ".qm";
++ QString translationFile("/usr/share/cppcheck/cfg/lang/" + mTranslations[index].mFilename + ".qm");
+
+ if (!mTranslator->load(translationFile) && !failure) {
+ //If it failed, lets check if the default file exists
More information about the arch-commits
mailing list