PKGBUILDs/community/libuhd/PKGBUILD

64 lines
1.9 KiB
Bash
Raw Normal View History

2016-05-14 17:24:24 +00:00
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: Dominik Heidler <dheidler@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2019-04-29 12:53:13 +00:00
# - set -DNEON_SIMD_ENABLE=OFF
2020-12-31 17:06:46 +00:00
# - explicitly link v5/v6 with libatomic
2016-05-14 17:24:24 +00:00
pkgname=libuhd
2020-12-31 14:55:15 +00:00
pkgver=4.0.0.0
2021-06-10 12:59:07 +00:00
pkgrel=2
2016-05-14 17:24:24 +00:00
pkgdesc="Universal Software Radio Peripheral (USRP) userspace driver"
2018-01-06 20:51:18 +00:00
arch=('x86_64')
2020-06-03 23:53:35 +00:00
url="https://files.ettus.com/manual/"
2016-05-14 17:24:24 +00:00
license=('GPL')
2017-05-29 17:29:28 +00:00
depends=('boost-libs' 'orc' 'libusb')
2020-12-31 14:55:15 +00:00
optdepends=('python: usrp utils'
'python-numpy: python api')
makedepends=('cmake' 'boost' 'python-mako' 'python-numpy')
2019-04-29 12:53:13 +00:00
# gpsd? dpdk?
2016-05-14 17:24:24 +00:00
2021-06-10 12:59:07 +00:00
source=("libuhd-$pkgver.tar.gz::https://github.com/EttusResearch/uhd/archive/v$pkgver.tar.gz"
gcc11.patch
boost-1.76.patch)
sha256sums=('4f3513c43edf0178391ed5755266864532716b8b503bcfb9a983ae6256c51b14'
'967ef02684f8b07ceebc3fbfc36b97f5ca74e3c1ecf481f643ec20ca0af4f08c'
'14907a6fc67b59fdfaee7c46f91b903296e4e0e335f39ff2e83bb935ee10b4f5')
2016-05-14 17:24:24 +00:00
2020-12-09 15:13:49 +00:00
prepare() {
2018-06-08 05:01:19 +00:00
cd "$srcdir/uhd-$pkgver/host"
2020-12-09 15:13:49 +00:00
mkdir build
2021-06-10 12:59:07 +00:00
patch -Np1 -d .. -i ../gcc11.patch
# https://github.com/EttusResearch/uhd/issues/437
patch -Np1 -d .. -i ../boost-1.76.patch
2020-12-09 15:13:49 +00:00
}
build() {
cd "$srcdir/uhd-$pkgver/host/build"
2016-05-14 17:24:24 +00:00
2020-12-31 17:06:46 +00:00
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && echo "target_link_libraries(uhd atomic)" >> "$srcdir/uhd-$pkgver/host/lib/CMakeLists.txt"
2016-05-14 17:24:24 +00:00
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/ \
2020-01-16 01:19:26 +00:00
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
2020-12-31 14:55:15 +00:00
-DENABLE_PYTHON_API=ON \
2016-05-14 17:24:24 +00:00
-DENABLE_EXAMPLES=OFF \
-DENABLE_UTILS=ON \
-DENABLE_TESTS=OFF \
-DENABLE_E100=ON \
2019-04-29 12:53:13 +00:00
-DENABLE_E300=ON \
-DNEON_SIMD_ENABLE=OFF
2016-05-14 17:24:24 +00:00
make
}
check() {
2018-06-08 05:01:19 +00:00
cd "$srcdir/uhd-$pkgver/host/build"
2016-05-14 17:24:24 +00:00
make test
}
package() {
2018-06-08 05:01:19 +00:00
cd "$srcdir/uhd-$pkgver/host/build"
2016-05-14 17:24:24 +00:00
make DESTDIR="$pkgdir" install
install -Dm644 "../utils/uhd-usrp.rules" "$pkgdir/usr/lib/udev/rules.d/10-uhd-usrp.rules"
}