[arch-commits] Commit in cppcheck/repos/community-x86_64 (3 files)
Jelle van der Waa
jelle at archlinux.org
Wed Oct 2 11:58:31 UTC 2019
Date: Wednesday, October 2, 2019 @ 11:58:30
Author: jelle
Revision: 512416
archrelease: copy trunk to community-x86_64
Added:
cppcheck/repos/community-x86_64/PKGBUILD
(from rev 512415, cppcheck/trunk/PKGBUILD)
cppcheck/repos/community-x86_64/translations-location.patch
(from rev 512415, cppcheck/trunk/translations-location.patch)
Deleted:
cppcheck/repos/community-x86_64/PKGBUILD
-----------------------------+
PKGBUILD | 115 +++++++++++++++++++++++-------------------
translations-location.patch | 20 +++++++
2 files changed, 83 insertions(+), 52 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2019-10-02 11:58:16 UTC (rev 512415)
+++ PKGBUILD 2019-10-02 11:58:30 UTC (rev 512416)
@@ -1,52 +0,0 @@
-# Maintainer: Jelle van der Waa <jelle at archlinux.org>
-# Maintainer: Stéphane Gaudreault <stephane at archlinux.org>
-
-pkgname=cppcheck
-pkgver=1.86
-pkgrel=1
-pkgdesc="A tool for static C/C++ code analysis"
-arch=('x86_64')
-url="http://cppcheck.sourceforge.net/"
-license=('GPL')
-depends=('qt5-base' 'python-pygments')
-makedepends=('docbook-xsl' 'qt5-tools' 'python')
-source=($pkgname-$pkgver.tar.gz::https://github.com/danmar/cppcheck/archive/${pkgver}.tar.gz)
-sha1sums=('03d21f48252e2f8a6742c53c4a7e01d0f40c35aa')
-
-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
-
- 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 SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes
-}
-
-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} CFGDIR=/usr/share/cppcheck/cfg SRCDIR=build 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 512415, cppcheck/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2019-10-02 11:58:30 UTC (rev 512416)
@@ -0,0 +1,63 @@
+# Maintainer: Jelle van der Waa <jelle at archlinux.org>
+# Maintainer: Stéphane Gaudreault <stephane at archlinux.org>
+
+pkgname=cppcheck
+pkgver=1.89
+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=('9114a99e629ac820f417e5a4e7c7af47cb90050f'
+ '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/translations-location.patch (from rev 512415, cppcheck/trunk/translations-location.patch)
===================================================================
--- translations-location.patch (rev 0)
+++ translations-location.patch 2019-10-02 11:58:30 UTC (rev 512416)
@@ -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