# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 119559 2014-04-30 13:51:00Z michaelld@macports.org $

PortSystem          1.0
PortGroup           github 1.0

github.setup        jgaeddert liquid-dsp 0ce00f9124d2c43601964e6251cb871a2179266b
version             20140429
checksums           rmd160 260f8eb4fbb91d2a2dba7e4c926c3a6940c5831b \
                    sha256 b2e38cdf518d8e76ddfe2f867339eaccf07134c21539d05684c5f151b6741c3f

maintainers         michaelld openmaintainer

description         liquid-dsp is an open-source signal processing library for software-defined radios written in C.
long_description    ${description} Its purpose is to provide a set of extensible DSP modules that do no rely on external dependencies or cumbersome frameworks.

categories          science comms
homepage            http://www.liquidsdr.org/
license             GPL-3
platforms           darwin macosx

depends_build-append \
                    port:autoconf \
                    port:automake \
                    port:grep \
                    port:gsed

depends_lib-append	port:fftw-3-single

# fix the install_name of the library, and allow usage of DESTDIR
# environment variable for installation purposes.

patchfiles-append   patch-makefile.in.diff

# temporary patch to fix invalid "uint16_t" type

patchfiles-append   patch-src_modem_src_freqmod.c.diff

# use the built-in bootstrap shell to create the configure script

pre-configure {
    system "cd ${worksrcpath} && /bin/bash bootstrap.sh"
}

# make sure MP programs are used

configure.env-append \
    SED=${prefix}/bin/gsed \
    GREP=${prefix}/bin/grep \
    EGREP="${prefix}/bin/grep -E"

# remove top-level include path, such that internal headers are used
# instead of any already-installed ones.

configure.cppflags-delete -I${prefix}/include

# remove top-level library path, such that internal libraries are used
# instead of any already-installed ones.

configure.ldflags-delete -L${prefix}/lib

# build verbosely

build.post_args-append AM_DEFAULT_VERBOSITY=1
