# -*- 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 71112 2010-09-01 17:52:30Z michaelld@macports.org $

PortSystem 1.0
PortGroup muniversal 1.0
PortGroup archcheck 1.0

name			gnuradio-omnithread
version			3.2.2
revision        2
maintainers		michaelld
description		Omnithread component of GNU Radio.
long_description Omnithread component of GNU Radio: \
a cross-platform C++ thread library. ${name} is deprecated, and \
will not be updated or maintained past GNU Radio version ${version}.

categories		science
homepage        http://gnuradio.org/

# all GNU Radio components come in a single tarball.
# Reuse this tarball for each Port

dist_subdir		gnuradio
master_sites.mirror_subdir gnuradio
distname		gnuradio-${version}
master_sites	gnu

platforms		darwin macosx

checksums		md5		3fedcd64c2f51671cc1417b4c1e06834 \
				sha1	6177d13e42937383e622edadc0b9f06391d0e5fc \
				rmd160	42d1a496400ebc77e054f59d9f33cc8ba24a4234

# gromnithread gets built by the main configure script, which requires
# a whole slew of ports, included here and then making all other
# remaining GNU Radio 3.2.2 ports dependent on this one.

depends_build   port:gawk \
                port:guile \
                port:libtool \
                port:pkgconfig \
                port:swig-python

depends_lib     port:boost \
                port:cppunit \
                port:fftw-3-single \
                port:gsl \
                port:zlib

archcheck.files lib/libboost_thread-mt.dylib \
                lib/libcppunit.dylib \
                lib/libfftw3f.dylib \
                lib/libgsl.dylib \
                lib/libz.dylib

notes "${name} is deprecated, and will not be updated \
or maintained past GNU Radio version ${version}."

# version 3.2.2 requires this; next version won't
patchfiles		patch-configure.diff

configure.args	--disable-all-components \
				--enable-omnithread

use_parallel_build	yes

variant docs description "build documentation for ${name}" {
	configure.args-append --enable-doxygen --enable-docs
	depends_lib-append port:doxygen
}

if { ![variant_isset docs] } {
	configure.args-append --disable-doxygen --disable-docs
}

variant python25 conflicts python26 python27 \
description "Use Python 2.5" {
    configure.env      PYTHON=${prefix}/bin/python2.5
    depends_lib-append port:python25
}

variant python26 conflicts python25 python27 \
description "Use Python 2.6" {
    configure.env      PYTHON=${prefix}/bin/python2.6
    depends_lib-append port:python26
}

variant python27 conflicts python25 python26 \
description "Use Python 2.7" {
    configure.env      PYTHON=${prefix}/bin/python2.7
    depends_lib-append port:python27
}

if { ![variant_isset python25] && \
     ![variant_isset python26] && \
     ![variant_isset python27] } {
    default_variants +python26
}
