PKGBUILDs/extra/libvolk/PKGBUILD

55 lines
1.5 KiB
Bash
Raw Normal View History

2023-05-03 23:22:50 +00:00
# Maintainer:
# 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
2023-05-03 23:22:50 +00:00
_name=volk
2023-02-16 02:47:20 +00:00
pkgname=libvolk
epoch=2
2024-02-01 00:29:21 +00:00
pkgver=3.1.1
_cpuver=0.9.0
pkgrel=1
2023-02-16 02:47:20 +00:00
pkgdesc="The Vector-Optimized Library of Kernels from Gnuradio"
arch=('x86_64')
2023-05-03 23:22:50 +00:00
url="https://www.libvolk.org/"
2023-02-16 02:47:20 +00:00
license=('GPL3')
2024-02-01 00:29:21 +00:00
depends=('gcc-libs' 'orc' 'python')
2023-08-22 23:47:01 +00:00
makedepends=('cmake' 'python-mako')
2023-02-16 02:47:20 +00:00
source=("volk-$pkgver.tgz::https://github.com/gnuradio/volk/archive/v$pkgver.tar.gz"
"cpufeatures-$_cpuver.tgz::https://github.com/google/cpu_features/archive/v$_cpuver.tar.gz")
2024-02-01 00:29:21 +00:00
sha256sums=('597f3e17c61975bce109e4d02cce2d414d6362e0922e766c10a98e4922cbf427'
'bdb3484de8297c49b59955c3b22dba834401bc2df984ef5cfc17acbe69c5018e')
2023-02-16 02:47:20 +00:00
validpgpkeys=('09E749D885FA881A7E84E823385323EE6402091D'
'D74F9F146E7F755783583158B343B2BA293E5174')
prepare() {
2023-05-03 23:22:50 +00:00
cd $_name-$pkgver
2023-02-16 02:47:20 +00:00
rmdir cpu_features
ln -sf "$srcdir/cpu_features-$_cpuver" cpu_features
}
build() {
2023-05-03 23:22:50 +00:00
local cmake_options=(
-B build
-D PYTHON_EXECUTABLE=/usr/bin/python
-D CMAKE_C_FLAGS="$CFLAGS -ffat-lto-objects"
-D CMAKE_INSTALL_PREFIX=/usr
-W no-dev
-S $_name-$pkgver
)
2023-02-16 02:47:20 +00:00
[[ $CARCH == "armv7h" ]] && CFLAGS=`echo $CFLAGS | sed -e 's/neon/vfpv3/'` && CXXFLAGS="$CFLAGS"
2023-05-03 23:22:50 +00:00
export PYTHON_EXECUTABLE=/usr/bin/python
cmake "${cmake_options[@]}"
cmake --build build --verbose
2023-02-16 02:47:20 +00:00
}
check() {
2023-05-03 23:22:50 +00:00
ctest --test-dir build --output-on-failure -E 'check_lgpl'
2023-02-16 02:47:20 +00:00
}
package() {
2023-05-03 23:22:50 +00:00
DESTDIR="$pkgdir" cmake --install build
2023-02-16 02:47:20 +00:00
}