Skip to content
Permalink
Browse files

gr-lora: change variants to subports.

Replace the default gr-lora by gr-lora-rpp0.

Closes: https://trac.macports.org/ticket/55286
  • Loading branch information
michaelld committed Feb 28, 2018
1 parent 5468364 commit 324d176d87a2b464e0ecb4aef15cfb1b24468eab
Showing with 17 additions and 18 deletions.
  1. +17 −18 science/gr-lora/Portfile
@@ -7,36 +7,35 @@ PortGroup active_variants 1.1
PortGroup cxx11 1.1

name gr-lora
version 20180131
revision 1

variant BastilleResearch conflicts rpp0 description "Install gr-lora from BastilleResearch" {}
variant rpp0 conflicts BastilleResearch description "Install gr-lora from rpp0" {}

# set default variant if none selected
if {![variant_isset BastilleResearch] && ![variant_isset rpp0]} {
default_variants +rpp0
}

# make sure -${default_variant} is not set
if {![variant_isset BastilleResearch] && ![variant_isset rpp0]} {
ui_msg "\nError: ${name} requires selection of variant +BastilleResearch or +rpp0.\n"
return -code error "Invalid variant."
if {${subport} eq ${name}} {
replaced_by gr-lora-rpp0
PortGroup obsolete 1.0
}

if {[variant_isset BastilleResearch]} {
subport gr-lora-BastilleResearch {

github.setup BastilleResearch gr-lora d587169a9676ad0f9ebf85e6a840f3955b3976d7
version 20170713
revision 2
checksums rmd160 99f82eb4e57eb59c863598b6a5e58f3632edc769 \
sha256 e1958cfe15e5ff3542e4df3dc7e626751321957cd2ff0122723d6a86d845cf6c

} elseif {[variant_isset rpp0]} {
conflicts gr-lora-rpp0

}

subport gr-lora-rpp0 {

github.setup rpp0 gr-lora 60e94eda37d9e9dcbcfa5b492c3f37e8d2fe06fa
version 20180131
checksums rmd160 d19e3caa76e92920dba65ffc05207210bdab8b41 \
sha256 584edfd5cac322eeca2651260a7cfd32ca7bd1fefc8480957b912649edfadb69

conflicts gr-lora-BastilleResearch

depends_lib-append \
port:liquid-dsp \
port:wireshark
@@ -65,23 +64,23 @@ if {[variant_isset BastilleResearch]} {
}
}

# allow gr-lora to work with both gnuradio and gnuradio-devel ...
# allow gr-lora-* to work with both gnuradio and gnuradio-devel ...

depends_lib-append path:lib/libgnuradio-runtime.dylib:gnuradio

# ... but not with gnuradio-next

pre-fetch {
if {![catch {set installed [lindex [registry_active gnuradio-next] 0]}]} {
# gnuradio-next is installed; this version of gr-lora does not work with gnuradio-next
ui_msg "\nError: ${name} requires the gnuradio or gnuradio-devel port, and will not work with the gnuradio-next port. deactivate gnuradio-next, and then install or activate gnuradio or gnuradio-devel.\n"
# gnuradio-next is installed; this version of gr-lora-* does not work with gnuradio-next
ui_msg "\nError: ${subport} requires the gnuradio or gnuradio-devel port, and will not work with the gnuradio-next port. deactivate gnuradio-next, and then install or activate gnuradio or gnuradio-devel.\n"
return -code error "Invalid port dependency: gnuradio-next"
}
}

categories science comms
maintainers {michaelld @michaelld} openmaintainer
description Provides augmented functionality (blocks, GRC definitions, apps, etc) for GNU Radio.
description Provides an open-source implementation of the LoRa CSS PHY.
long_description ${description}
license GPL-3
platforms darwin

0 comments on commit 324d176

Please sign in to comment.
You can’t perform that action at this time.