scopehal-apps: Update to r3392 and enable Clang builds

This commit is contained in:
Hernan Martinez 2025-04-19 23:34:46 -06:00
parent e2e6cb6f24
commit 869918a60a
No known key found for this signature in database
GPG Key ID: 71A1D8ABDDEB6807

View File

@ -3,42 +3,62 @@
_realname=scopehal-apps
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.0.0.r1312.g1f47d350
pkgrel=2
pkgver=0.0.0.r3329.gb2b889d8
pkgrel=1
pkgdesc="scopehal-apps: applications for libscopehal (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64')
url="https://github.com/azonenberg/scopehal-apps"
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://www.ngscopeclient.org/"
msys2_repository_url="https://github.com/ngscopeclient/scopehal-apps"
license=('spdx:BSD-3-Clause')
groups=("${MINGW_PACKAGE_PREFIX}-eda")
depends=(
"${MINGW_PACKAGE_PREFIX}-glm"
"${MINGW_PACKAGE_PREFIX}-libsigc++"
"${MINGW_PACKAGE_PREFIX}-gtkmm3"
"${MINGW_PACKAGE_PREFIX}-yaml-cpp"
"${MINGW_PACKAGE_PREFIX}-glew"
"${MINGW_PACKAGE_PREFIX}-ffts"
"${MINGW_PACKAGE_PREFIX}-glew"
"${MINGW_PACKAGE_PREFIX}-glfw"
"${MINGW_PACKAGE_PREFIX}-glm"
"${MINGW_PACKAGE_PREFIX}-gtkmm3"
"${MINGW_PACKAGE_PREFIX}-hidapi"
"${MINGW_PACKAGE_PREFIX}-libsigc++"
"${MINGW_PACKAGE_PREFIX}-vulkan-loader"
"${MINGW_PACKAGE_PREFIX}-yaml-cpp"
$([[ ${MINGW_PACKAGE_PREFIX} != *-clang-* ]] || echo "${MINGW_PACKAGE_PREFIX}-openmp")
)
makedepends=(
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-shaderc"
"${MINGW_PACKAGE_PREFIX}-vulkan-headers"
"git"
)
_commit='1f47d350'
source=("${_realname}::git+https://github.com/azonenberg/scopehal-apps.git#commit=${_commit}")
sha256sums=('SKIP')
_commit='b2b889d87045c4e1848ab6859307519f7cfd875b'
source=("${_realname}::git+https://github.com/ngscopeclient/scopehal-apps.git#commit=${_commit}"
"001-enable-avx-clang.patch::https://github.com/ngscopeclient/scopehal/pull/966.patch")
sha256sums=('2eeb71edb4d930e2152f797520c7a240746ea272d2304a51cf44d05d4b16963d'
'440cc70e04eb40bf4e21c614553a214d5f8df39ebc9424b668e4ed0fb5fc9f15')
pkgver() {
cd "${_realname}"
printf "0.0.0.r%s.g%s" "$(git rev-list --count "${_commit}")" "$(git rev-parse --short=8 ${_commit})"
}
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying ${_patch}"
patch -Nbp1 -i "${srcdir}/${_patch}"
done
}
prepare() {
cd "${srcdir}/${_realname}"
git remote set-url origin https://github.com/azonenberg/scopehal-apps
git remote set-url origin https://github.com/ngscopeclient/scopehal-apps
git submodule update --init --recursive
cd "${srcdir}/${_realname}/lib"
apply_patch_with_msg \
001-enable-avx-clang.patch
}
build() {
@ -49,7 +69,7 @@ build() {
CMAKE="${MINGW_PREFIX}/bin/cmake.exe"
CXXFLAGS+=" -Wno-format" \
CXXFLAGS+=" -Wno-format -Wno-error=maybe-uninitialized" \
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
$CMAKE \
-G "Ninja" \
@ -60,10 +80,6 @@ build() {
$CMAKE --build ./
}
check() {
"${srcdir}/${_realname}"/build/src/glscopeclient/glscopeclient.exe --help
}
package() {
cd "${srcdir}/build-${MSYSTEM}"
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake.exe --install .