PKGBUILDs/extra/libvolk/PKGBUILD

62 lines
1.3 KiB
Bash
Raw Permalink Normal View History

2024-09-17 10:50:59 +00:00
# Maintainer: Carl Smedstad <carsme@archlinux.org>
2023-05-03 23:22:50 +00:00
# Contributor: Kyle Keen <keenerd@gmail.com>
2023-02-16 02:47:20 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - build v7 without neon to fix FTBFS
pkgname=libvolk
2024-09-17 10:50:59 +00:00
_pkgname=volk
2024-02-27 20:57:27 +00:00
pkgver=3.1.2
2024-09-17 10:50:59 +00:00
pkgrel=3
epoch=2
2023-02-16 02:47:20 +00:00
pkgdesc="The Vector-Optimized Library of Kernels from Gnuradio"
2024-09-17 10:50:59 +00:00
arch=(x86_64)
2023-05-03 23:22:50 +00:00
url="https://www.libvolk.org/"
2024-09-17 10:50:59 +00:00
license=(LGPL-3.0-or-later)
depends=(
gcc-libs
glibc
orc
python
)
makedepends=(
cmake
git
python-mako
)
provides=(libvolk.so)
source=(
"git+https://github.com/gnuradio/volk.git#tag=v$pkgver"
"git+https://github.com/google/cpu_features.git"
)
sha256sums=('9b3b30f8428ae7813e1d0d22896b717b8dd802027869065c42d552157652e288'
'SKIP')
2023-02-16 02:47:20 +00:00
prepare() {
2024-09-17 10:50:59 +00:00
cd $_pkgname
git submodule init
git config submodule.cpu_features.url "$srcdir/cpu_features"
git -c protocol.file.allow=always submodule update
2023-02-16 02:47:20 +00:00
}
build() {
2024-09-17 10:50:59 +00:00
cd $_pkgname
2023-02-16 02:47:20 +00:00
[[ $CARCH == "armv7h" ]] && CFLAGS=`echo $CFLAGS | sed -e 's/neon/vfpv3/'` && CXXFLAGS="$CFLAGS"
2024-09-17 10:50:59 +00:00
cmake -S . -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=None \
-Wno-dev
cmake --build build
2023-02-16 02:47:20 +00:00
}
check() {
2024-09-17 10:50:59 +00:00
cd $_pkgname
ctest --test-dir build --output-on-failure
2023-02-16 02:47:20 +00:00
}
package() {
2024-09-17 10:50:59 +00:00
cd $_pkgname
2023-05-03 23:22:50 +00:00
DESTDIR="$pkgdir" cmake --install build
2024-09-17 10:50:59 +00:00
rm -vr "$pkgdir/usr/include/volk/asm"
2023-02-16 02:47:20 +00:00
}