summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD80
2 files changed, 45 insertions, 50 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f2f4f1896ffd..7d9dd8c41983 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Tue Feb 2 12:00:50 UTC 2016
+# Wed Sep 27 12:53:02 UTC 2017
pkgbase = cppcheck-git
pkgdesc = A tool for static C/C++ code analysis.
- pkgver = 1.72.159.g7295bd8
+ pkgver = 1.80.382.gd18e8466a
pkgrel = 1
url = http://cppcheck.wiki.sourceforge.net
arch = i686
@@ -10,14 +10,15 @@ pkgbase = cppcheck-git
license = GPL3
makedepends = git
makedepends = docbook-xsl
- makedepends = python-pygments
+ makedepends = qt5-tools
+ makedepends = python
+ depends = qt5-base
+ depends = python-pygments
depends = gcc-libs
- depends = pcre
- depends = python
provides = cppcheck
conflicts = cppcheck
- source = cppcheck::git://github.com/danmar/cppcheck.git
- sha1sums = SKIP
+ source = cppcheck-git::git://github.com/danmar/cppcheck.git
+ md5sums = SKIP
pkgname = cppcheck-git
diff --git a/PKGBUILD b/PKGBUILD
index bee192ab2024..c179c5f865a8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,11 +2,7 @@
# Contributor: Matthias matthiaskrgr Krüger < matthias · krueger _strange_curverd_character_ famsik · de >
# Maintainer: aksr <aksr at t-com dot me>
pkgname=cppcheck-git
-pkgver=1.72.159.g7295bd8
-pkgver() {
- cd cppcheck
- git describe --tags | sed -e 's/^cppcheck\-//' -e 's/-/./g'
-}
+pkgver=1.80.382.gd18e8466a
pkgrel=1
pkgdesc='A tool for static C/C++ code analysis.'
arch=('i686' 'x86_64')
@@ -14,55 +10,53 @@ url='http://cppcheck.wiki.sourceforge.net'
license=('GPL3')
provides=('cppcheck')
conflicts=('cppcheck')
-makedepends=('git' 'docbook-xsl' 'python-pygments') # 'gcc-multilib') # multilib needed for -m32
-depends=('gcc-libs' 'pcre' 'python')
-optdeps=('qt4: to build and run cppcheck-gui')
-source=('cppcheck::git://github.com/danmar/cppcheck.git')
-sha1sums=('SKIP')
+makedepends=('git' 'docbook-xsl' 'qt5-tools' 'python')
+depends=('qt5-base' 'python-pygments' 'gcc-libs')
+optdeps=('qt5: to build and run cppcheck-gui')
+source=("$pkgname::git://github.com/danmar/cppcheck.git")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ git describe --tags | sed -e 's/^cppcheck\-//' -e 's/-/./g'
+}
build() {
- cd "$srcdir"/cppcheck
- make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes
- make DB2MAN=/usr/share/xml/docbook/xsl-stylesheets-1.79.1/manpages/docbook.xsl man
- #make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes reduce
+ cd "$srcdir/$pkgname"
+ LANG='en_US.UTF-8' make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes
+ xsversion=$(pacman -Qi docbook-xsl | grep ^Version | sed -e 's/.*: //' -e 's/-[0-9]$//')
+ make DB2MAN=/usr/share/xml/docbook/xsl-stylesheets-${xsversion}/manpages/docbook.xsl man
- if [[ -z `pacman -T qt4` ]] ; then
- msg 'qt4 found!'
- msg 'Building cppcheck-gui'
- cd "$srcdir"/cppcheck/gui
- qmake-qt4 HAVE_RULES=yes
- lrelease-qt4 gui.pro
- make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes
- fi
+ cd gui
+ lrelease-qt5 gui.pro
+ qmake-qt5 HAVE_RULES=yes
+ make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes
}
check() {
- cd "$srcdir"/cppcheck
- # CFGDIR="$srcdir"/.../cfg does NOT work, it will make cppcheck depend on the build file
+ cd "$srcdir/$pkgname"
+ #LANG='en_US.UTF-8' make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes test
+
mkdir -p make_check
cd make_check
cp -rp ../* . || true
- rm -r ./make_check # prevent recursively adding check dir
- make SRCDIR=build CFGDIR=./cfg HAVE_RULES=yes testrunner || make clean ; make SRCDIR=build CFGDIR=./cfg HAVE_RULES=yes testrunner
- ./testrunner || make clean ; make SRCDIR=build CFGDIR=./cfg HAVE_RULES=yes testrunner ; ./testrunner
+ rm -r ./make_check
+
+ make SRCDIR=build CFGDIR=./cfg HAVE_RULES=yes testrunner || make clean
+ make SRCDIR=build CFGDIR=./cfg HAVE_RULES=yes testrunner
+ ./testrunner || make clean
+ make SRCDIR=build CFGDIR=./cfg HAVE_RULES=yes testrunner
+ ./testrunner
}
package() {
- cd "$srcdir"/cppcheck
- #make DESTDIR="${pkgdir}" CFGDIR=/usr/share/cppcheck/cfg SRCDIR=build HAVE_RULES=yes install
- make DESTDIR="${pkgdir}" SRCDIR=build HAVE_RULES=yes install # CFGDIR=/usr/share/cppcheck/cfg
- if [[ -z `pacman -T qt4` ]] ; then
- cd "$srcdir"/cppcheck/gui
- #make install BINDIR="${pkgdir}"/usr/bin DATADIR="${pkgbuild}"/usr/share/cppcheck
- install -Dm 755 ./cppcheck-gui "${pkgdir}"/usr/bin/cppcheck-gui # install binary
- #mkdir -p "${pkgdir}"/usr/share/cppcheck/lang/ # create translation dir
- #install -D cppcheck*.qm "${pkgdir}"/usr/share/cppcheck/lang/ # install translations
- "${pkgdir}"/usr/bin/cppcheck-gui --data-dir=/usr/share/cppcheck/cfg
- cd ../ # in $srcdir/cppcheck now
- fi
- install -D -p -m 644 cppcheck.1 "${pkgdir}"/usr/share/man/man1/cppcheck.1
- mkdir -p "${pkgdir}"/usr/share/cppcheck/cfg # create the dir
- install -D ./cfg/* -t "${pkgdir}"/usr/share/cppcheck/cfg # copy all the cfgs into the dir
- #install -D -p -m 755 reduce "${pkgdir}"/usr/bin/cppcheck-reduce #not really needed
+ cd "$srcdir/$pkgname"
+ LANG='en_US.UTF-8' make DESTDIR="${pkgdir}" CFGDIR=/usr/share/cppcheck/cfg SRCDIR=build HAVE_RULES=yes install
+ install -Dpm 644 cppcheck.1 "${pkgdir}"/usr/share/man/man1/cppcheck.1
+
+ mkdir -p ${pkgdir}/usr/share/{applications,cppcheck/cfg/lang}/
+ install -Dm755 gui/cppcheck-gui "${pkgdir}"/usr/bin/cppcheck-gui
+ install -D ./cfg/* -t "${pkgdir}"/usr/share/cppcheck/cfg
+ install -D gui/*.qm -t "${pkgdir}"/usr/share/cppcheck/cfg/lang/
}