# $Id: Portfile 25375 2007-05-20 16:20:59Z jochen@macports.org $ PortSystem 1.0 PortGroup python24 1.0 categories-append graphics math name py-matplotlib version 0.90.0 revision 1 maintainers openmaintainer@macports.org jochen@macports.org description matlab-like syntax for creating plots in python long_description Matplotlib is a pure python plotting library with the goal of making \ publication quality plots using a syntax familiar to matlab users. \ The library uses numarray, Numeric, or numpy for handling large \ data sets and supports a variety of output backends. \ This port provides variants for the different \ array-objects (numarray, Numeric, numpy) and \ for different GUIs (gtk2, tkinter, wxpython). homepage http://matplotlib.sourceforge.net master_sites sourceforge:matplotlib distname matplotlib-${version} checksums md5 31ea12395826080b5be9c1e292cda6f1 \ sha1 707366d5dc736ce7446a41f748f33e7603d8f023 \ rmd160 6be8d7d1f0896378d8c8880b8b0188e2037892cc platforms darwin depends_lib-append port:antigraingeometry \ port:freetype \ port:libpng \ port:py-dateutil port:py-tz patchfiles patch-setupext.py.diff build.env MPLIB_BASE="${prefix}" post-extract { if {[variant_isset gtk2]} { reinplace "s|^BUILD_GTKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTKAGG=1|" \ ${worksrcpath}/setup.py reinplace "s|^BUILD_GTK\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTK=1|" \ ${worksrcpath}/setup.py } else { reinplace "s|^BUILD_GTKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTKAGG=0|" \ ${worksrcpath}/setup.py reinplace "s|^BUILD_GTK\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_GTK=0|" \ ${worksrcpath}/setup.py } if {[variant_isset tkinter]} { reinplace "s|^BUILD_TKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_TKAGG=1|" \ ${worksrcpath}/setup.py } else { reinplace "s|^BUILD_TKAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_TKAGG=0|" \ ${worksrcpath}/setup.py } if {[variant_isset wxpython]} { reinplace "s|^BUILD_WXAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_WXAGG=1|" \ ${worksrcpath}/setup.py } else { reinplace "s|^BUILD_WXAGG\[\[:space:\]\]*=\[\[:space:\]\]*'auto'|BUILD_WXAGG=0|" \ ${worksrcpath}/setup.py } if {[variant_isset numarray]} { reinplace "s|NUMERIX.-1.|'numarray'|" ${worksrcpath}/setup.py } if {[variant_isset numeric]} { reinplace "s|NUMERIX.-1.|'numeric'|" ${worksrcpath}/setup.py } if {[variant_isset numpy]} { reinplace "s|NUMERIX.-1.|'numpy'|" ${worksrcpath}/setup.py } } post-patch { reinplace "s|@@DPORTS_PREFIX@@|${prefix}|" ${worksrcpath}/setupext.py } post-destroot { xinstall -m 755 -d ${destroot}/${prefix}/share/doc/${name} \ ${destroot}/${prefix}/share/matplotlib xinstall -m 644 -W ${worksrcpath} API_CHANGES CHANGELOG INSTALL \ INTERACTIVE KNOWN_BUGS README TODO \ ${destroot}/${prefix}/share/doc/${name} file copy ${worksrcpath}/license \ ${destroot}/${prefix}/share/doc/${name} file copy ${worksrcpath}/examples \ ${destroot}/${prefix}/share/matplotlib } variant gtk2 conflicts tkinter wxpython description "Use gtkAgg for interactive plotting" { depends_lib-append port:py-gtk2 } variant tkinter conflicts gtk2 wxpython description "Use tkAgg for interactive plotting" { depends_lib-append port:py-tkinter } variant wxpython conflicts gtk2 tkinter description "Use wxAgg for interactive plotting" { depends_lib-append port:py-wxpython } variant numarray conflicts numpy Numeric description "Use numarray as array-object" { depends_lib-append port:py-numarray } variant Numeric conflicts numarray numpy description "Use Numeric as array-object" { depends_lib-append port:py-numeric } variant numpy conflicts numarray Numeric description "Use numpy as array-object" { depends_lib-append port:py-numpy } if { ![variant_isset gtk2] && ![variant_isset tkinter] && ![variant_isset wxpython] } { default_variants +gtk2 } if { ![variant_isset numarray] && ![variant_isset Numeric] && ![variant_isset numpy] } { default_variants +numpy }