# -*- 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 # $Id$ PortSystem 1.0 PortGroup cmake 1.0 PortGroup github 1.0 PortGroup muniversal 1.0 name uhd categories science comms maintainers michaelld description USRP Hardware Driver for Ettus Research Products license GPL-3+ platforms darwin # common directory for storing downloaded tarballs dist_subdir uhd if {${subport} eq ${name}} { long_description ${description}: \ Provides the release version, which is typically updated every month or so. set base_version 3.8.4 github.setup EttusResearch uhd 00[join [split ${base_version} "."] "_00"] release_ version ${base_version} conflicts uhd-devel checksums rmd160 808824563422fea41665b5f3c923025617b43a9c \ sha256 06218d99b86f455c851c308e866b154d0207daec1e02081ed03f9e953cc8a066 # set the version override string set UHD_VERSION_INFO "Release" # overload the github livecheck regex to look for versions that # are just numbers and '_', no letters (e.g., "3.7.3_rc2"). livecheck.regex archive/[join ${github.tag_prefix} ""](\[0-9_\]+)${extract.suffix} } subport uhd-devel { long_description ${description}: \ Provides the UHD GIT maint or master branch, depending on which is more advanced, and is typically updated every few days to week. name uhd-devel conflicts uhd github.setup EttusResearch uhd d9656de88f7af77b39bfe9985f0ac7c623932d71 version 20150708 checksums rmd160 13387ce1a29fb78fecf992d16ec52a36cf721a14 \ sha256 46ab3eb22f30c5f7ffd3cb6539186fb7ef55be24c0620c881e7df9150b47b143 # overload the github livecheck URL with the maint branch, # when it is more advanced; comment out for master. # livecheck.url ${github.homepage}/commits/maint.atom # set the version override string set UHD_VERSION_INFO "git-[string range ${github.version} 0 7](${version})" } # override the github Portgroup's homepage setting homepage http://uhd.ettus.com/ depends_lib-append port:boost port:ncurses depends_build-append port:pkgconfig # do VPATH (out of source tree) build cmake.out_of_source yes # remove top-level library path, such that internal libraries are used # instead of any already-installed ones. configure.ldflags-delete -L${prefix}/lib # set last configure argument to the relative path # to the top-level cmake source configure.post_args ../${worksrcdir}/host # explicitly set CMake flags to get MacPorts' curses; # these are used by some variants, and won't hurt the others. configure.args-append \ -DCURSES_CURSES_LIBRARY=${prefix}/lib/libcurses.dylib \ -DCURSES_FORM_LIBRARY=${prefix}/lib/libform.dylib \ -DCURSES_INCLUDE_PATH=${prefix}/include \ -DCURSES_LIBRARY=${prefix}/lib/libcurses.dylib \ -DCURSES_NCURSES_LIBRARY=${prefix}/lib/libncurses.dylib # override default version string to be MacPorts-specific configure.args-append \ -DUHD_GIT_COUNT="MacPorts" \ -DUHD_GIT_HASH="${UHD_VERSION_INFO}" # directory to install shared UHD files # (examples, images, modules, tests, utilities) configure.args-append \ -DPKG_LIB_DIR=${prefix}/share/uhd # directory to install all CMake files; internal appends "uhd" configure.args-append \ -DCMAKE_MODULES_DIR=${prefix}/share/cmake # per user concensus: enable all variants except +debug and +universal default_variants +docs +examples +libusb +manual +test +manpages if {${subport} eq "uhd"} { # for release until 3.8.5+, keep +orc around. it has been # deprecated and removed as of 2015-07-01, commit 41812aa2. default_variants +orc variant orc description {enable ORC support} { depends_lib-append port:orc configure.args-append -DENABLE_ORC=ON } if {![variant_isset orc]} { configure.args-append -DENABLE_ORC=OFF } } # require Python 2.7 depends_lib-append \ port:python27 \ port:py27-cheetah # specify that Python version to use configure.args-append \ -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7 # after destroot, have uhd fetch its images into the # destroot area, so that they are also tracked by MacPorts post-destroot { ui_debug "Fetching images:" ui_debug "${prefix}/bin/python2.7 ${destroot}${prefix}/share/uhd/utils/uhd_images_downloader.py --install-location=${destroot}${prefix}/share/uhd/images" system "${prefix}/bin/python2.7 ${destroot}${prefix}/share/uhd/utils/uhd_images_downloader.py --verbose --install-location=${destroot}${prefix}/share/uhd/images" } variant test description {enable tests} { configure.args-append -DENABLE_TESTS=ON test.run yes } if {![variant_isset test]} { configure.args-append -DENABLE_TESTS=OFF } variant examples description {enable examples} { configure.args-append -DENABLE_EXAMPLES=ON } if {![variant_isset examples]} { configure.args-append -DENABLE_EXAMPLES=OFF } variant libusb description {enable USB support via libusb version 1.0} { depends_lib-append path:lib/libusb-1.0.dylib:libusb configure.args-append \ -DENABLE_USB=ON \ -DLIBUSB_INCLUDE_DIRS=${prefix}/include/libusb-1.0 } if {![variant_isset libusb]} { configure.args-append -DENABLE_USB=OFF } else { # if using +libusb, enable E300 too configure.args-append -DENABLE_E300=ON } variant docs description {build documentation} { depends_lib-append port:doxygen configure.args-append -DENABLE_DOXYGEN=ON } if {![variant_isset docs]} { configure.args-append -DENABLE_DOXYGEN=OFF } variant manual description {build manual} { depends_lib-append port:py27-docutils configure.args-append -DENABLE_MANUAL=ON } if {![variant_isset manual]} { configure.args-append -DENABLE_MANUAL=OFF } variant manpages description {build man pages} { depends_run-append port:gzip configure.args-append -DENABLE_MAN_PAGES=ON } if {![variant_isset manpages]} { configure.args-append -DENABLE_MAN_PAGES=OFF }