mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
134 lines
4.0 KiB
Tcl
134 lines
4.0 KiB
Tcl
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
|
|
|
|
PortSystem 1.0
|
|
PortGroup makefile 1.0
|
|
PortGroup app 1.0
|
|
|
|
name linrad
|
|
categories science comms
|
|
platforms darwin macosx
|
|
license MIT
|
|
maintainers {ra1nb0w @ra1nb0w} openmaintainer
|
|
description Linrad is a free multi-OS SDR receiver (A Software Defined Radio receiver).
|
|
long_description ${description}
|
|
homepage https://www.sm5bsz.com/linuxdsp/linrad.htm
|
|
|
|
fetch.type svn
|
|
worksrcdir trunk
|
|
svn.url https://svn.code.sf.net/p/linrad/code/trunk/
|
|
svn.revision 997
|
|
version 20211204-${svn.revision}
|
|
revision 0
|
|
|
|
supported_archs x86_64 i386 arm64
|
|
universal_variant no
|
|
|
|
# set the arch to use during build
|
|
if {${build_arch} eq "i386"} {
|
|
set linrad_arch 32
|
|
build.target xlinrad
|
|
} else {
|
|
set linrad_arch 64
|
|
build.target xlinrad64
|
|
}
|
|
|
|
patchfiles-append \
|
|
fix_data_directory.patch \
|
|
fix_help_directory.patch \
|
|
fix_errors_directory.patch \
|
|
fix_ac_path_prog.patch \
|
|
fix_makefile.in.patch \
|
|
fix_march.patch \
|
|
linrad.patch
|
|
|
|
depends_build-append \
|
|
port:pkgconfig \
|
|
port:nasm
|
|
|
|
depends_lib-append \
|
|
port:xorg-libX11 \
|
|
port:xorg-libXext \
|
|
port:portaudio \
|
|
port:libusb-compat \
|
|
path:lib/pkgconfig/libusb-1.0.pc:libusb
|
|
|
|
use_autoreconf yes
|
|
use_configure yes
|
|
|
|
configure.args-append \
|
|
--with-portaudio-${linrad_arch} \
|
|
--with-x11-${linrad_arch} \
|
|
--with-xext-${linrad_arch} \
|
|
--with-libusb0-${linrad_arch} \
|
|
--with-libusb1-${linrad_arch}
|
|
|
|
pre-configure {
|
|
reinplace "s|@LINRAD_BINARY@|${prefix}/bin/xlinrad${linrad_arch}|" ${worksrcpath}/bin/linrad
|
|
reinplace "s|@HELP_DIR@|${prefix}/share/${name}|g" ${worksrcpath}/help.c
|
|
reinplace "s|@HELP_DIR@|${prefix}/share/${name}|g" ${worksrcpath}/menu.c
|
|
}
|
|
|
|
destroot {
|
|
xinstall -m 0755 -d ${destroot}${prefix}/bin
|
|
xinstall -m 0755 -W ${worksrcpath} bin/linrad xlinrad${linrad_arch} ${destroot}${prefix}/bin
|
|
xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}
|
|
xinstall -m 0644 {*}[glob -directory ${worksrcpath} z*.txt] \
|
|
${destroot}${prefix}/share/doc/${name}
|
|
xinstall -m 0755 -d ${destroot}${prefix}/share/${name}
|
|
xinstall -m 0644 -W ${worksrcpath} help.lir ${destroot}${prefix}/share/${name}
|
|
xinstall -m 0644 -W ${worksrcpath} errors.lir ${destroot}${prefix}/share/${name}
|
|
}
|
|
|
|
variant airspy description "Install ${name} with support for airspy" {
|
|
depends_lib-append port:airspy
|
|
configure.args-append --with-airspy-${linrad_arch}
|
|
}
|
|
|
|
variant airspyhf description "Install ${name} with support for airspy hf+" {
|
|
depends_lib-append port:airspyhf
|
|
configure.args-append --with-airspyhf-${linrad_arch}
|
|
}
|
|
|
|
variant bladerf description "Install ${name} with support for bladerf" {
|
|
depends_lib-append port:bladeRF
|
|
configure.args-append --with-bladerf-${linrad_arch}
|
|
}
|
|
|
|
variant perseus description "Install ${name} with support for perseus" {
|
|
depends_lib-append port:perseus-sdr
|
|
configure.args-append --with-perseus-${linrad_arch}
|
|
}
|
|
|
|
variant rtlsdr description "Install ${name} with support for rtl-sdr" {
|
|
depends_lib-append port:rtl-sdr
|
|
configure.args-append --with-rtlsdr-${linrad_arch}
|
|
}
|
|
|
|
# only available on 64 bit
|
|
if {${build_arch} eq "x86_64"} {
|
|
variant sdrplay description "Install ${name} with support for SDRplay" {
|
|
depends_lib-append port:SDRplay
|
|
configure.args-append --with-sdrplay2-${linrad_arch}
|
|
}
|
|
default_variants +sdrplay
|
|
}
|
|
|
|
default_variants +airspy +airspyhf +rtlsdr
|
|
|
|
app.create yes
|
|
app.name Linrad
|
|
app.executable linrad
|
|
app.icon ${filespath}/icon.png
|
|
app.retina yes
|
|
|
|
notes {
|
|
The configuration is stored at ~/.linrad
|
|
The data files are stored at ~/.linrad/data
|
|
|
|
To use X11 you need to install the xorg-server port.
|
|
For optimum performance use MIT-SHM as X11 extension.
|
|
|
|
Note: if you have an empty configuration, you must run \
|
|
linrad from the console the first time.
|
|
}
|