# -*- 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: Portfile 84512 2011-09-27 14:19:06Z snc@macports.org $

PortSystem       1.0

name               py25-pyqwt
version            5.2.0
revision           1

platforms          macosx
categories         python devel
maintainers        michaelld openmaintainer

description        PyQwt is a set of Python bindings for the Qwt toolkit
long_description   PyQwt is a set of Python bindings for the Qwt C++ class library which extends \
                   the Qt framework with widgets for scientific and engineering applications. It \
                   provides a widget to plot 2-dimensional data and various widgets to display \
                   and control bounded or unbounded floating point values.

homepage           http://pyqwt.sourceforge.net
master_sites       sourceforge:pyqwt
distname           PyQwt-${version}
dist_subdir        python

checksums          md5     fcd6c6029090d473dcc9df497516eae7 \
                   sha1    797f37c63dec660272f6a8ccfd16a017df0ad640 \
                   rmd160  e4c8a63d623d974cd500e29fbc62255746ca7feb

depends_lib        port:py25-pyqt4 \
                   port:py25-numpy

worksrcdir         ${worksrcdir}/configure

configure.cmd      ${prefix}/bin/python2.5 configure.py
configure.pre_args -I ${prefix}/include -I ${prefix}/include/qwt -I ${prefix}/include/python2.5 -L ${prefix}/lib --disable-numarray --disable-numeric
configure.universal_args-delete --disable-dependency-tracking

build.target

post-destroot {
    # Workaround for python25 framework bug (#16334)
    move ${destroot}${frameworks_dir}/Python.framework/Versions/2.5/lib/python2.5 \
        ${destroot}${prefix}/lib/python2.5
}

variant qwt conflicts qwt52 description {Use qwt} {
    depends_lib-append  port:qwt
}

variant qwt52 conflicts qwt description {Use qwt52} {
    depends_lib-append  port:qwt52
}

if {![variant_isset qwt] && ![variant_isset qwt52]} {
    default_variants    +qwt52
}
