summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authoraksr2017-09-27 14:53:23 +0200
committeraksr2017-09-27 14:53:23 +0200
commit613b473729b37b551515ca079b83a6c18aa48612 (patch)
treecf527df2f8baa6241b18812069821dd26891ea75 /PKGBUILD
parent646ab90245b9d5a775a4c5989f5f1e2be1ebc0cd (diff)
downloadaur-613b473729b37b551515ca079b83a6c18aa48612.tar.gz
Update.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD80
1 files changed, 37 insertions, 43 deletions
diff --git a/PKGBUILD b/PKGBUILD
index bee192ab202..c179c5f865a 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/
}