[arch-commits] Commit in cppcheck/trunk (PKGBUILD translations-location.patch)

George Rawlinson grawlinson at gemini.archlinux.org
Tue Jan 18 02:25:42 UTC 2022


    Date: Tuesday, January 18, 2022 @ 02:25:42
  Author: grawlinson
Revision: 1108516

upgpkg: cppcheck 2.6.3-1: upgpkg: cppcheck 2.6.3-1

Modified:
  cppcheck/trunk/PKGBUILD
  cppcheck/trunk/translations-location.patch

-----------------------------+
 PKGBUILD                    |  113 +++++++++++++++++++++++++-----------------
 translations-location.patch |    5 -
 2 files changed, 71 insertions(+), 47 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-01-18 02:02:24 UTC (rev 1108515)
+++ PKGBUILD	2022-01-18 02:25:42 UTC (rev 1108516)
@@ -1,70 +1,95 @@
-# Maintainer: Jelle van der Waa <jelle at archlinux.org>
+# Maintainer: George Rawlinson <grawlinson at archlinux.org>
+# Contributor: Jelle van der Waa <jelle at archlinux.org>
 # Contributor: Stéphane Gaudreault <stephane at archlinux.org>
 
 pkgname=cppcheck
-pkgver=2.6
-pkgrel=2
+pkgver=2.6.3
+pkgrel=1
 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' 'clang')
-optdepends=('qt5-tools: 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
-        https://github.com/danmar/cppcheck/commit/8d682884.patch)
-sha1sums=('bf7808d527f9f3543d301c6b0b31d308bf97dfa2'
-          '03b0888438cf92ccdcbf307dbc3c35e65c91b844'
-          '7846c2e482320c2f6f9352dc134fdf0ad39faec8')
+depends=(
+  'python-pygments'
+  'tinyxml2'
+)
+makedepends=(
+  'git'
+  'docbook-xsl'
+  'qt5-tools'
+  'qt5-base'
+  'python'
+  'pandoc'
+  'cmake'
+  'clang'
+)
+optdepends=(
+  'qt5-tools: run cppcheck-gui'
+  'python-pygments: cppcheck-htmlreport'
+  'clang: for cppcheck-gui integration'
+)
+_commit='3e518e64d0f1fb1e8b71f2d0e8c07d36e31d0ffc'
+source=(
+  "$pkgname::git+https://github.com/danmar/cppcheck.git#commit=$_commit"
+  'translations-location.patch'
+)
+sha512sums=('SKIP'
+            'd3528834d719017ec3a0e08005a293089b556622928defa1b37f940e62cb01165dcbd741e6d5e989c0156fb8789f7e63702af8b2390738648b2300a92f4ab0ae')
+b2sums=('SKIP'
+        '8156920eacc630cb5eceb2387937b747c84c6325bef906717cfbad68c122bdd27965da1e8070a560a0bed3a7b7c59ff5f0e116bb1d035c4c42f430c927a75b1f')
 
+pkgver() {
+  cd "$pkgname"
+  git describe --tags
+}
+
 prepare() {
-   cd "${pkgname}-${pkgver}"
-   patch -Np1 -i $srcdir/translations-location.patch
-   patch -p1 < ../8d682884.patch # Fix build with GCC 11
-
-   mkdir build
+  cd "$pkgname"
+  patch -p1 -i ../translations-location.patch
 }
 
 build() {
-   cd "${pkgname}-${pkgver}"
-   export CXXFLAGS+=" -DNDEBUG"
+  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
+  # Manuals
+  pushd "$pkgname"
+  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
+  popd
 
-   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 \
-         -DUSE_BUNDLED_TINYXML2=OFF  \
-         ..
+  cmake \
+    -B build \
+    -S "$pkgname" \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DUSE_MATCHCOMPILER=yes \
+    -DHAVE_RULES=yes \
+    -DBUILD_GUI=yes \
+    -DBUILD_SHARED_LIBS=no \
+    -DBUILD_TESTS=yes \
+    -DFILESDIR=/usr/share/cppcheck \
+    -DUSE_BUNDLED_TINYXML2=no
 
-   make
+  cmake --build build
 }
 
 
 check() {
-   cd "${pkgname}-${pkgver}/build/bin"
-   ./testrunner -g -q
+  cd build/bin
+  ./testrunner -g -q
 }
 
 package() {
-   cd "${pkgname}-${pkgver}/build"
-   make DESTDIR="${pkgdir}" install
+  DESTDIR="$pkgdir" cmake --install build
 
-   cd ..
+  cd "$pkgname"
 
-   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
+  install -vDm644 -t "$pkgdir/usr/share/man/man1" cppcheck.1
+  install -vDm755 -t "$pkgdir/usr/bin" htmlreport/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/
+  # 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/
 }

Modified: translations-location.patch
===================================================================
--- translations-location.patch	2022-01-18 02:02:24 UTC (rev 1108515)
+++ translations-location.patch	2022-01-18 02:25:42 UTC (rev 1108516)
@@ -1,6 +1,5 @@
-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
+--- a/gui/translationhandler.cpp
++++ b/gui/translationhandler.cpp
 @@ -116,15 +116,7 @@
          if (datadir.isEmpty())
              datadir = appPath;



More information about the arch-commits mailing list