source: trunk/dports/science/gr-baz/Portfile

Last change on this file was 154298, checked in by michaelld@…, 11 months ago

gr-baz: update to 870de48f (20161024).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1# -*- 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
2# $Id: Portfile 154298 2016-10-26 16:51:01Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           cmake 1.0
6PortGroup           github 1.0
7
8name                gr-baz
9
10github.setup        balint256 gr-baz 870de48fd824e4013650a8a6daf8c9479e7cb00d
11version             20161024
12checksums           rmd160 63a3784466d76d9072328a5431b95e88ae1a1aa7 \
13                    sha256 2f2356a7b556e842465e2784c6a4d943ef1a95d74849e7f766dd0b04f62ee38d
14
15# allow gr-baz to work with both gnuradio and gnuradio-devel ...
16
17depends_lib-append  path:lib/libgnuradio-runtime.dylib:gnuradio
18
19# ... but not with gnuradio-next
20
21pre-fetch {
22    if {![catch {set installed [lindex [registry_active gnuradio-next] 0]}]} {
23        # gnuradio-next is installed; this version of gr-osmosdr does not work with gnuradio-next
24        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"
25        return -code error "Invalid port dependency: gnuradio-next"
26    }
27}
28
29homepage            http://wiki.spench.net/wiki/Gr-baz
30
31categories          science comms
32maintainers         michaelld openmaintainer
33description         Provides augmented functionality (blocks, GRC definitions, apps, etc) for GNU Radio.
34long_description    ${description}
35license             GPL-3
36platforms           darwin
37
38depends_build-append port:pkgconfig
39depends_lib-append      port:boost \
40                    port:doxygen \
41                    port:swig \
42                    path:lib/libvolk.dylib:volk
43
44# temporary fix to correctly find Volk
45
46post-patch {
47    reinplace "s@find_package(volk)@find_package(Volk)@g" ${worksrcpath}/CMakeLists.txt
48}
49
50# do VPATH (out of source tree) build
51
52cmake.out_of_source yes
53
54# remove top-level library path, such that internal libraries are used
55# instead of any already-installed ones.
56
57configure.ldflags-delete -L${prefix}/lib
58
59# specify the Python dependencies
60
61depends_lib-append \
62    port:python27
63
64# specify the Python version to use
65
66configure.args-append \
67    -DPYTHON_EXECUTABLE=${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7 \
68    -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/2.7/Headers \
69    -DPYTHON_LIBRARY=${frameworks_dir}/Python.framework/Versions/2.7/Python \
70    -DGR_PYTHON_DIR=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages
71
72# enable all variants except +debug and +universal
73
74default_variants +uhd +rtl +armadillo
75
76variant uhd description "Install ${name} with support for UHD" {
77
78    # allow uhd or uhd-devel
79
80    depends_lib-append \
81        path:lib/libuhd.dylib:uhd
82
83    configure.args-append \
84        -DUHD_INCLUDE_DIRS=${prefix}/include \
85        -DUHD_LIBRARIES=${prefix}/lib/libuhd.dylib
86
87}
88
89if {![variant_isset uhd]} {
90
91    configure.args-append \
92        -DUHD_INCLUDE_DIRS= \
93        -DUHD_LIBRARIES=
94
95}
96
97variant rtl description "Install ${name} with support for RTL SDR hardware (via libusb)" {
98
99    depends_lib-append path:lib/libusb-1.0.dylib:libusb
100
101    configure.args-append \
102        -DLIBUSB_INCLUDE_DIR=${prefix}/include/libusb-1.0 \
103        -DLIBUSB_LIBRARIES=${prefix}/lib/libusb-1.0.dylib
104
105}
106
107if {![variant_isset rtl]} {
108
109    configure.args-append \
110        -DLIBUSB_INCLUDE_DIR= \
111        -DLIBUSB_LIBRARIES=
112
113}
114
115variant armadillo description "Install ${name} with support for MUSIC DOA estimator block (via armadillo)" {
116
117    depends_lib-append port:armadillo
118
119    configure.args-append \
120        -DARMADILLO_INCLUDE_DIR=${prefix}/include \
121        -DARMADILLO_LIBRARY=${prefix}/lib/libarmadillo.dylib
122
123}
124
125if {![variant_isset armadillo]} {
126
127    configure.args-append \
128        -DARMADILLO_INCLUDE_DIR= \
129        -DARMADILLO_LIBRARY=
130
131}
Note: See TracBrowser for help on using the repository browser.