[152762] trunk/dports/science
Ryan Schmidt
ryandesign at macports.org
Tue Sep 20 21:13:01 PDT 2016
> On Sep 16, 2016, at 4:19 PM, michaelld at macports.org wrote:
>
> Revision
> 152762
> Author
> michaelld at macports.org
> Date
> 2016-09-16 14:19:15 -0700 (Fri, 16 Sep 2016)
> Log Message
>
> gr-pcap: new port.
> Added Paths
>
> • trunk/dports/science/gr-pcap/
> • trunk/dports/science/gr-pcap/Portfile
> Diff
>
> Added: trunk/dports/science/gr-pcap/Portfile (0 => 152762)
>
> --- trunk/dports/science/gr-pcap/Portfile (rev 0)
> +++ trunk/dports/science/gr-pcap/Portfile 2016-09-16 21:19:15 UTC (rev 152762)
>
> @@ -0,0 +1,69 @@
>
> +# -*- 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
> +
> +github.setup osh gr-pcap a3d958f44d3d808cb8369db5e2729c986bbab790
> +version 20160729
> +checksums rmd160 2f8851a642642c44f6073f352d49b7fd6cecd547 \
> + sha256 b461aa3c0748ef50c302c6f01cd6221147795ef9017fcd3aaedfe946ddfb9749
> +
> +# allow gr-pcap 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-pcap 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"
> + return -code error "Invalid port dependency: gnuradio-next"
> + }
> +}
> +
> +categories science comms
> +maintainers michaelld openmaintainer
> +description Provides augmented functionality (blocks, GRC definitions, apps, etc) for GNU Radio.
> +long_description ${description}
> +license GPL-3
> +platforms darwin
> +
> +depends_build-append port:pkgconfig
> +depends_lib-append port:boost path:bin/scapy:scapy
> +
> +# 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
> +
> +# install CMake files into this directory.
> +
> +configure.args-append \
> + -DCMAKE_MODULES_DIR=${prefix}/share/cmake
> +
> +# include examples in destroot
> +
> +post-destroot {
> + xinstall -m 755 -d ${destroot}${prefix}/share/examples/
> + copy ${worksrcpath}/examples ${destroot}${prefix}/share/examples/pcap
> +}
> +
> +# specify the Python dependencies
> +
> +depends_lib-append \
> + port:python27
> +
> +# specify the Python version to use
> +
> +configure.args-append \
> + -DPYTHON_EXECUTABLE=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 \
> + -DPYTHON_INCLUDE_DIR=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/Headers \
> + -DPYTHON_LIBRARY=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/Python \
> + -DGR_PYTHON_DIR=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages
"${prefix}/Library/Frameworks" should be replaced with "${frameworks_dir}"
More information about the macports-dev
mailing list