source: trunk/dports/science/gr-fcdproplus/Portfile @ 121148

Last change on this file since 121148 was 121148, checked in by michaelld@…, 6 years ago

gr-fcdproplus: remove deleting of "-I${prefix}/include" from CPPFLAGS, per ticket #42872.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 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 121148 2014-06-18 18:53:51Z michaelld@macports.org $
3
4PortSystem          1.0
5PortGroup           cmake 1.0
6PortGroup           github 1.0
7PortGroup           active_variants 1.1
8
9github.setup        dl1ksv gr-fcdproplus 457ab712f331fc086952036bd889d58a99b2c9ae
10
11categories          science comms
12maintainers         michaelld openmaintainer
13description         Implements a funcube dongle pro+ source in GNU Radio.
14long_description    ${description}
15license             GPL-3
16platforms           darwin
17
18version             20140121
19revision            1
20checksums           rmd160 b5b05bf8ec9b3f86a078a98a014c37807148f879 \
21                    sha256 ff8a5d622ca294689725e7286424c4e4399adc5c929da4bf3e8396d3f86ffabf
22
23depends_build-append port:pkgconfig
24depends_lib-append      port:boost \
25                    port:doxygen \
26                    port:libusb \
27                    port:swig
28
29# allow gr-osmosdr to work with both gnuradio and gnuradio-devel ...
30
31depends_lib-append  path:lib/libgnuradio-runtime.dylib:gnuradio
32
33# ... but not with gnuradio-legacy or gnuradio-next
34
35pre-fetch {
36    if {![catch {set installed [lindex [registry_active gnuradio-legacy] 0]}]} {
37        # gnuradio-legacy is installed; this version of gr-osmosdr does not work with gnuradio-legacy
38        ui_msg "\nError: ${name} requires the gnuradio or gnuradio-devel port, and will not work with the gnuradio-legacy port.  deactivate gnuradio-legacy, and then install or activate gnuradio or gnuradio-devel.\n"
39        return -code error "Invalid port dependency: gnuradio-legacy"
40    }
41    if {![catch {set installed [lindex [registry_active gnuradio-next] 0]}]} {
42        # gnuradio-next is installed; this version of gr-osmosdr does not work with gnuradio-next
43        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"
44        return -code error "Invalid port dependency: gnuradio-next"
45    }
46}
47
48# do VPATH build
49
50post-extract        { file mkdir ${workpath}/build }
51configure.dir       ${workpath}/build
52build.dir           ${workpath}/build
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# set last configure argument to the reletive path
60# to the top-level cmake source
61
62configure.post_args ../${worksrcdir}
63
64# be verbose when building, for debugging purposes
65
66build.post_args VERBOSE=1
67
68# set Python variants
69
70set pythons_suffixes {26 27}
71global chosen_python_suffix
72set chosen_python_suffix ""
73
74set pythons_ports {}
75foreach s ${pythons_suffixes} {
76    lappend pythons_ports python${s}
77}
78
79foreach s ${pythons_suffixes} {
80    set p python${s}
81    set v [join [split ${s} ""] "."]
82    set i [lsearch -exact ${pythons_ports} ${p}]
83    set c [lreplace ${pythons_ports} ${i} ${i}]
84    eval [subst {
85        variant ${p} description "Build UHD for Python ${v}" \
86            conflicts ${c} {
87
88            set chosen_python_suffix ${s}
89
90            # require gnuradio to also have this Python variant
91
92            require_active_variants \
93                path:lib/libgnuradio-runtime.dylib:gnuradio ${p}
94
95            depends_lib-append \
96                port:${p}
97
98            # specify that Python version to use
99            configure.args-append \
100                -DPYTHON_EXECUTABLE=${prefix}/bin/python${v} \
101                -DPYTHON_INCLUDE_DIR=${prefix}/Library/Frameworks/Python.framework/Versions/${v}/Headers \
102                -DPYTHON_LIBRARY=${prefix}/Library/Frameworks/Python.framework/Versions/${v}/Python \
103                -DGR_PYTHON_DIR=${frameworks_dir}/Python.framework/Versions/${v}/lib/python${v}/site-packages
104        }
105    }]
106}
107
108# if no python variant is set, default to 2.7
109if {![variant_isset python26] &&
110    ![variant_isset python27]} {
111    default_variants +python27
112}
113
114# make sure -python27 was not used alone
115if {![variant_isset python26] &&
116    ![variant_isset python27]} {
117    return -code error "Exactly one Python variant must be selected."
118}
Note: See TracBrowser for help on using the repository browser.