# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortGroup legacysupport 1.0
# Only enable legacy support on OSX10.6 or older
legacysupport.newest_darwin_requires_legacy 10
github.setup Nuand bladeRF f03d84333b05a7911b1a1850705db585f06ec3a7
version 20191001-[string range ${github.version} 0 7]
# no-OS is a submodule, but because we're not cloning into a GIT
# module in the first place, we can't use the git submodule
# feature. Have to download separately and install into the correct
# location to get this port to work! Which means we need a no-OS
# commit and so forth ... basically replicate what the github PG does
# but without using it since it is not designed to be used for
set no_OS_github_author analogdevicesinc
set no_OS_github_project no-OS
# this commit comes from the patchfiles inside the bladeRF tarball, in
# "thirdparty/analogdevicesinc/no-OS_local/patches"
set no_OS_commit 0bba46e6f6f75785a65d425ece37d0a04daf6157
set bladeRF_distname ${distname}
set bladeRF_distfile ${distfiles}
set no_OS_distname ${no_OS_github_project}-${no_OS_commit}
set no_OS_distfile ${no_OS_distname}${extract.suffix}
distfiles ${bladeRF_distfile}:tagone \
master_sites ${github.homepage}/tarball/${git.branch}:tagone \
https://github.com/${no_OS_github_author}/${no_OS_github_project}/tarball/${no_OS_commit}:tagtwo
checksums ${bladeRF_distfile} \
rmd160 a665b74391ad9230bf814828a4a393d1aabdecd0 \
sha256 59491719e48dda6308f2dcc701567aa65606d64fe9baa409aa1ab3a16da21cc6 \
rmd160 dbe43395fc0b22919ac7e6a5e2f355987e4dd2b7 \
sha256 53670c8f0a9feaa774d8c3067ba201b31c0197294bdd00a1795c72a0368aac40 \
# roughly replicate what's going on in the github PG post-extract
# for the main tarball extract directory name. It doesn't work
# here because we're using tags.
if {[file exists [glob -nocomplain ${workpath}/${github.author}-${github.project}-*]] && \
[file isdirectory [glob -nocomplain ${workpath}/${github.author}-${github.project}-*]]} {
ui_debug "move [glob ${workpath}/${github.author}-${github.project}-*] ${workpath}/${distname}"
move [glob ${workpath}/${github.author}-${github.project}-*] ${workpath}/${distname}
# tarball is not "${github.author}-${github.project}-*"
ui_error "\n\NError: \${worksrcpath} for 'bladeRF' does not exist after extracting distfiles. This might indicate that the author or project is different than set in the Portfile due to a rename at GitHub. Please examine the extracted directory in ${workpath} and try to correct the Portfile by either changing the author or project or adding the worksrcdir option with the correct directory name.\n"
return -code error "Unexpected github tarball extract."
if {[file exists [glob -nocomplain ${workpath}/${no_OS_github_author}-${no_OS_github_project}-*]] && \
[file isdirectory [glob -nocomplain ${workpath}/${no_OS_github_author}-${no_OS_github_project}-*]]} {
ui_debug "move [glob ${workpath}/${no_OS_github_author}-${no_OS_github_project}-*] ${workpath}/${no_OS_distname}"
move [glob ${workpath}/${no_OS_github_author}-${no_OS_github_project}-*] ${workpath}/${no_OS_distname}
# tarball is not "${no_OS_github_author}-${no_OS_github_project}-*"
ui_error "\n\NError: \${worksrcpath} no 'no-OS' does not exist after extracting distfiles. This might indicate that the author or project is different than set in the Portfile due to a rename at GitHub. Please examine the extracted directory in ${workpath} and try to correct the Portfile by either changing the author or project or adding the worksrcdir option with the correct directory name.\n"
return -code error "Unexpected github tarball extract."
# put the no-OS directory into position
# remove the original directory
ui_debug "delete ${worksrcpath}/thirdparty/analogdevicesinc/no-OS"
delete ${worksrcpath}/thirdparty/analogdevicesinc/no-OS
ui_debug "move ${workpath}/${no_OS_distname} ${worksrcpath}/thirdparty/analogdevicesinc/no-OS"
move ${workpath}/${no_OS_distname} ${worksrcpath}/thirdparty/analogdevicesinc/no-OS
maintainers {michaelld @michaelld} openmaintainer
description bladeRF is an open-source hardware and software software-defined radio (SDR) platform.
long_description ${description} This port provides all the source code required to program and interact with a bladeRF platform, including firmware for the Cypress FX3 USB controller, HDL for the Altera Cyclone IV FPGA, and C code for the host side libraries, drivers, and utilities.