blob: 987bb18d16a54d6291407ebc9b24518cb2fe385e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Maintainer: yjun <jerrysteve1101 at gmail dot com>
# based on the PKGBUILD of dsview
# Origin Contributor: Anatol Pomozov
# Origin Contributor: Abdelhak Bougouffa <abougouffa@fedoraproject.org>
# Origin Contributor: Thomas Krug <t.krug@elektronenpumpe.de>
pkgname=pxview-git
pkgver=1.3.7.r6.605cdd5
pkgrel=1
epoch=1
pkgdesc='GUI program for supporting various instruments from PXLogic, including logic analyzers, oscilloscopes, etc.'
arch=(i686 x86_64)
url='https://github.com/PXLogic/PXView'
license=(GPL-3.0-or-later)
# Upstream added VCS dependency to libsigrokdecode :/
depends=(hicolor-icon-theme glib2 python fftw
libusb zlib qt5-base boost-libs saribbon)
makedepends=(boost cmake git)
source=("${pkgname}::git+https://github.com/PXLogic/PXView"
"0001-make-glibc-happy.patch")
sha1sums=('SKIP'
'c36f3d81501bc35b207631483179ca663308926b')
pkgver() {
cd "${srcdir}/${pkgname}"
px_version="$(grep -oP 'PX_VERSION_MAJOR \K[0-9]+' CMakeLists.txt).$(grep -oP 'PX_VERSION_MINOR \K[0-9]+' CMakeLists.txt).$(grep -oP 'PX_VERSION_MICRO \K[0-9]+' CMakeLists.txt)"
printf "%s.r%s.%s" "${px_version}" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
prepare() {
git -C "${srcdir}/${pkgname}" clean -dfx
cd "${srcdir}"/${pkgname}/
sed -i 's#MODE="0666"#TAG+="uaccess"#' PXView/px.rules
# temporary fix icon display
convert -resize 256x256 PXView/icons/logo.svg PXView/icons/logo.png
# https://github.com/PXLogic/PXView/pull/1
# fix archlinux gcc 14 build failure issue
git cherry-pick --no-commit ba80efab017d71647b1f4027a8b1fa
# patch
git apply ${srcdir}/0001-make-glibc-happy.patch
}
build() {
cd "${srcdir}"/${pkgname}/
# see:https://wiki.archlinux.org/title/CMake_package_guidelines
cmake -DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-Wno-dev \
-B build
cmake --build build
}
check() {
cd "${srcdir}"/${pkgname}/
ctest --test-dir build --output-on-failure
}
package() {
cd "${srcdir}"/${pkgname}/
DESTDIR="${pkgdir}" cmake --install build
# temporary fix icon display
rm -rf ${pkgdir}/usr/share/pixmaps/pxview.svg \
${pkgdir}/usr/share/icons/
install -Dm644 PXView/icons/logo.png ${pkgdir}/usr/share/pixmaps/pxview.png
}
# vim: set sw=2 ts=2 et:
|