extra/cppcheck to 2.14.1-1

This commit is contained in:
David Beauchamp 2024-05-30 08:23:37 -04:00
parent 01b890b7f5
commit 1fba657e49
2 changed files with 23 additions and 27 deletions

View file

@ -1,10 +1,10 @@
pkgbase = cppcheck pkgbase = cppcheck
pkgdesc = A tool for static C/C++ code analysis pkgdesc = A tool for static C/C++ code analysis
pkgver = 2.12.0 pkgver = 2.14.1
pkgrel = 3 pkgrel = 1
url = http://cppcheck.sourceforge.net/ url = http://cppcheck.sourceforge.net/
arch = x86_64 arch = x86_64
license = GPL license = GPL-3.0-or-later
makedepends = git makedepends = git
makedepends = docbook-xsl makedepends = docbook-xsl
makedepends = qt6-tools makedepends = qt6-tools
@ -20,11 +20,11 @@ pkgbase = cppcheck
optdepends = qt6-tools: run cppcheck-gui optdepends = qt6-tools: run cppcheck-gui
optdepends = python-pygments: cppcheck-htmlreport optdepends = python-pygments: cppcheck-htmlreport
optdepends = clang: for cppcheck-gui integration optdepends = clang: for cppcheck-gui integration
source = cppcheck::git+https://github.com/danmar/cppcheck.git#commit=f2f1fb0bca5f23aac8f02fb9c09e4529a7935749 source = cppcheck::git+https://github.com/danmar/cppcheck.git#tag=2.14.1
source = translations-location.patch source = translations-location.patch
sha512sums = SKIP sha512sums = a36733ed0906aff8d7d1bff6aa0a43f1d79fad9f48ecfa1f8f69c6ae13d5a099bd7d18cc4e30b3e4dc3a1cb24ad8e0855403eb6c90e5525e50661cd4eda792a4
sha512sums = d3528834d719017ec3a0e08005a293089b556622928defa1b37f940e62cb01165dcbd741e6d5e989c0156fb8789f7e63702af8b2390738648b2300a92f4ab0ae sha512sums = d3528834d719017ec3a0e08005a293089b556622928defa1b37f940e62cb01165dcbd741e6d5e989c0156fb8789f7e63702af8b2390738648b2300a92f4ab0ae
b2sums = SKIP b2sums = 75ece358f442aa27f6224a6eaba1915c9a122613906fbd6457443d4af3eede6d4897a737acfa0fcd8c10b820a13fcf6f9badc808386e98486c34ca06551aaef3
b2sums = 8156920eacc630cb5eceb2387937b747c84c6325bef906717cfbad68c122bdd27965da1e8070a560a0bed3a7b7c59ff5f0e116bb1d035c4c42f430c927a75b1f b2sums = 8156920eacc630cb5eceb2387937b747c84c6325bef906717cfbad68c122bdd27965da1e8070a560a0bed3a7b7c59ff5f0e116bb1d035c4c42f430c927a75b1f
pkgname = cppcheck pkgname = cppcheck

View file

@ -3,15 +3,15 @@
# Contributor: Stéphane Gaudreault <stephane@archlinux.org> # Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org> # ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - remove makedepend on pandoc, don't generate manuals # - remove makedepend on pandoc, don't generate manuals, don't install manuals we didn't generate
pkgname=cppcheck pkgname=cppcheck
pkgver=2.12.0 pkgver=2.14.1
pkgrel=3 pkgrel=1
pkgdesc='A tool for static C/C++ code analysis' pkgdesc='A tool for static C/C++ code analysis'
arch=('x86_64') arch=('x86_64')
url='http://cppcheck.sourceforge.net/' url='http://cppcheck.sourceforge.net/'
license=('GPL') license=('GPL-3.0-or-later')
depends=( depends=(
'python-pygments' 'python-pygments'
'tinyxml2' 'tinyxml2'
@ -32,30 +32,20 @@ optdepends=(
'python-pygments: cppcheck-htmlreport' 'python-pygments: cppcheck-htmlreport'
'clang: for cppcheck-gui integration' 'clang: for cppcheck-gui integration'
) )
_commit='f2f1fb0bca5f23aac8f02fb9c09e4529a7935749'
source=( source=(
"$pkgname::git+https://github.com/danmar/cppcheck.git#commit=$_commit" "$pkgname::git+https://github.com/danmar/cppcheck.git#tag=$pkgver"
'translations-location.patch' 'translations-location.patch'
) )
sha512sums=('SKIP' sha512sums=('a36733ed0906aff8d7d1bff6aa0a43f1d79fad9f48ecfa1f8f69c6ae13d5a099bd7d18cc4e30b3e4dc3a1cb24ad8e0855403eb6c90e5525e50661cd4eda792a4'
'd3528834d719017ec3a0e08005a293089b556622928defa1b37f940e62cb01165dcbd741e6d5e989c0156fb8789f7e63702af8b2390738648b2300a92f4ab0ae') 'd3528834d719017ec3a0e08005a293089b556622928defa1b37f940e62cb01165dcbd741e6d5e989c0156fb8789f7e63702af8b2390738648b2300a92f4ab0ae')
b2sums=('SKIP' b2sums=('75ece358f442aa27f6224a6eaba1915c9a122613906fbd6457443d4af3eede6d4897a737acfa0fcd8c10b820a13fcf6f9badc808386e98486c34ca06551aaef3'
'8156920eacc630cb5eceb2387937b747c84c6325bef906717cfbad68c122bdd27965da1e8070a560a0bed3a7b7c59ff5f0e116bb1d035c4c42f430c927a75b1f') '8156920eacc630cb5eceb2387937b747c84c6325bef906717cfbad68c122bdd27965da1e8070a560a0bed3a7b7c59ff5f0e116bb1d035c4c42f430c927a75b1f')
pkgver() {
cd "$pkgname"
git describe --tags
}
prepare() { prepare() {
cd "$pkgname" cd "$pkgname"
# fix location of translations # fix location of translations
patch -p1 -i "$srcdir/translations-location.patch" patch -p1 -i "$srcdir/translations-location.patch"
# https://github.com/danmar/cppcheck/pull/5350
git revert --no-commit 499f566e9dcdf7d033145c4eb613dd4a4738ab0a
} }
build() { build() {
@ -67,11 +57,14 @@ build() {
make DB2MAN=/usr/share/xml/docbook/xsl-stylesheets-${xsversion}-nons/manpages/docbook.xsl man 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/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 #pandoc man/reference-cfg-format.md -o man/reference-cfg-format.html -s --number-sections --toc
#pandoc man/writing-addons.md -o man/writing-addons.html -s --number-sections --toc
popd popd
cd "$pkgname"
cmake \ cmake \
-B build \ -B build \
-S "$pkgname" \ -S . \
-D CMAKE_INSTALL_PREFIX=/usr \ -D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \ -D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D USE_MATCHCOMPILER=ON \ -D USE_MATCHCOMPILER=ON \
@ -87,17 +80,20 @@ build() {
} }
check() { check() {
cd build/bin cd "$pkgname/build/bin"
./testrunner -g -q ./testrunner -g -q
} }
package() { package() {
DESTDIR="$pkgdir" cmake --install build
cd "$pkgname" cd "$pkgname"
DESTDIR="$pkgdir" cmake --install build
install -vDm644 -t "$pkgdir/usr/share/man/man1" cppcheck.1 install -vDm644 -t "$pkgdir/usr/share/man/man1" cppcheck.1
install -vDm755 -t "$pkgdir/usr/bin" htmlreport/cppcheck-htmlreport install -vDm755 -t "$pkgdir/usr/bin" htmlreport/cppcheck-htmlreport
#install -vDm644 -t "$pkgdir/usr/share/doc/" man/manual.html
#install -vDm644 -t "$pkgdir/usr/share/doc/" man/reference-cfg-format.html
#install -vDm644 -t "$pkgdir/usr/share/doc/" man/writing-addons.html
# Fix location of language files # Fix location of language files
install -d "${pkgdir}"/usr/share/cppcheck/cfg/lang install -d "${pkgdir}"/usr/share/cppcheck/cfg/lang