mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
124 lines
4.4 KiB
Bash
124 lines
4.4 KiB
Bash
# Maintainer: Kyle Keen <keenerd@gmail.com>
|
|
# Contributor: Dominik Heidler <dheidler@gmail.com>
|
|
# Contributor: Jonatan Sastre <jsastreh [ at ] hotmail.com>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - set -Dhave_mfpu_neon=0 for v5/v6
|
|
|
|
pkgbase=gnuradio
|
|
pkgname=(gnuradio gnuradio-companion)
|
|
pkgver=3.7.13.5
|
|
pkgrel=2
|
|
pkgdesc="General purpose DSP and SDR toolkit. With drivers for usrp and fcd."
|
|
arch=('x86_64')
|
|
url="http://gnuradio.org"
|
|
license=('GPL')
|
|
depends=('fftw' 'python2-numpy' 'cppunit' 'gsl' 'blas' 'boost-libs>=1.53'
|
|
'libusbx' 'portaudio' 'libuhd' 'zeromq' 'libvolk')
|
|
makedepends=('boost' 'cmake' 'python2-lxml' 'python2-cheetah' 'glu' 'swig'
|
|
'pygtk' 'wxpython' 'qwt' 'python2-pyqt5')
|
|
|
|
# todo
|
|
# split the gui components?
|
|
# build doxygen docs?
|
|
# gr-video-sdl ?
|
|
# icons
|
|
|
|
# comedilib: gr-comedi
|
|
# zeroc-ice: gr-ctrlport
|
|
# doxygen: C++ autogenerated documentation
|
|
# python2-sphinx: Python autogenerated documentation
|
|
|
|
# secret release directory
|
|
#source=("http://s3-dist.gnuradio.org/gnuradio-$pkgver.tar.gz"
|
|
# neglected official release directory
|
|
#source=("https://gnuradio.org/releases/$pkgbase/$pkgbase-$pkgver.tar.gz"
|
|
source=("https://github.com/gnuradio/gnuradio/releases/download/v$pkgver/gnuradio-$pkgver.tar.gz"
|
|
"https://github.com/gnuradio/gnuradio/releases/download/v$pkgver/gnuradio-$pkgver.tar.gz.asc"
|
|
"21-fcd.rules" "gnuradio-qt5.patch")
|
|
validpgpkeys=('B90DDFAC56989BF62262EB812987C77CBB8ED9B2' # GNU Radio Project
|
|
'D74F9F146E7F755783583158B343B2BA293E5174') # Marcus Müller
|
|
md5sums=('489e5469b516afe6b0638752fb77bc7f'
|
|
'SKIP'
|
|
'465e12c454c6a22ebec9849181af7bdc'
|
|
'be583483d91906d2cd30c907b9871fa6')
|
|
|
|
prepare() {
|
|
cd "$srcdir/$pkgbase-$pkgver"
|
|
patch -p1 -i ../gnuradio-qt5.patch # Port to Qt5 (Gentoo)
|
|
|
|
msg "Replacing filenames to use python2."
|
|
sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
|
|
$(find ./ -name '*.py') \
|
|
$(find ./ -name 'gnuradio-companion' -o -name 'flow_graph.tmpl')
|
|
sed -i -e "s|#![ ]*/usr/bin/env /usr/bin/python$|#!/usr/bin/env python2|" \
|
|
$(find ./ -name '*.py')
|
|
# GCC 7?
|
|
#sed -i 's|SET(CMAKE_CXX_STANDARD 98)|#&|' CMakeLists.txt
|
|
#sed -i 's|SET(CMAKE_C_FLAGS .* -std=gnu99"|#&|' CMakeLists.txt
|
|
sed -i '333i ${CMAKE_THREAD_LIBS_INIT}' gr-blocks/lib/CMakeLists.txt
|
|
}
|
|
|
|
build() {
|
|
export PYTHON=python2
|
|
cd "$srcdir/$pkgbase-$pkgver"
|
|
sed -i -e "s|GR_PKG_LIBEXEC_DIR|GR_RUNTIME_DIR|" grc/scripts/freedesktop/CMakeLists.txt
|
|
# sed -i -e "s|/qwt$|/qwt5|" -e "s| qwt | qwt5 |" cmake/Modules/FindQwt.cmake
|
|
sed -i -e "s| sphinx-build$| sphinx-build2|" cmake/Modules/FindSphinx.cmake
|
|
msg "Starting build."
|
|
|
|
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && NEON="-Dhave_mfpu_neon=0"
|
|
|
|
mkdir -p build
|
|
cd build
|
|
cmake \
|
|
-DPYTHON_EXECUTABLE=$(which python2) \
|
|
-DPYTHON_INCLUDE_DIR=$(echo /usr/include/python2*) \
|
|
-DENABLE_GR_QTGUI=ON \
|
|
-DPYTHON_LIBRARY=$(echo /usr/lib/libpython2.*.so) \
|
|
-DENABLE_INTERNAL_VOLK=OFF \
|
|
-DENABLE_GRC=ON \
|
|
-DENABLE_GR_WXGUI=ON \
|
|
-DCMAKE_INSTALL_PREFIX=/usr -Wno-dev $NEON ../
|
|
make
|
|
}
|
|
|
|
check() {
|
|
cd "$srcdir/$pkgbase-$pkgver/build"
|
|
export PYTHON=python2
|
|
#make test
|
|
}
|
|
|
|
package_gnuradio() {
|
|
optdepends=('boost: gr_modtool'
|
|
'swig: gr_modtool'
|
|
'cmake: gr_modtool'
|
|
'python2-cheetah: gr_modtool'
|
|
'pkgconfig: libuhd')
|
|
cd "$srcdir"
|
|
install -Dm644 21-fcd.rules "$pkgdir/usr/lib/udev/rules.d/21-fcd.rules"
|
|
cd "$srcdir/$pkgbase-$pkgver/grc/scripts/freedesktop"
|
|
install -Dm644 gnuradio-grc.desktop "$pkgdir/usr/share/applications/gnuradio-grc.desktop"
|
|
cd "$srcdir/$pkgbase-$pkgver/build"
|
|
make DESTDIR="$pkgdir" install
|
|
}
|
|
|
|
package_gnuradio-companion() {
|
|
pkgdesc="GUI frontend for gnuradio and SDR."
|
|
depends=('gnuradio' 'python2-cheetah' 'python2-lxml'
|
|
'pygtk' 'wxpython' 'python2-opengl' 'qwt'
|
|
'python2-numarray' 'python2-pyqt5')
|
|
# Yup, nothing in the package except dependencies,
|
|
# because more than five optdeps is too many for most people.
|
|
}
|
|
|
|
# options for armv6:
|
|
# -Dhave_mfpu_neon=0 \
|
|
# -DCMAKE_CXX_FLAGS:STRING="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \
|
|
# -DCMAKE_C_FLAGS:STRING="-march=armv6 -mfpu=vfp -mfloat-abi=hard" \
|
|
|
|
# options for armv7:
|
|
# -DCMAKE_CXX_FLAGS:STRING="-march=armv7-a -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=hard"
|
|
# -DCMAKE_C_FLAGS:STRING="-march=armv7-a -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=hard"
|
|
# line 341 add /usr/lib/arm-linux-gnueabihf /usr/lib/arm-linux-gnueabi
|
|
|