# -*- 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
github.setup matplotlib matplotlib 1.4.3 v
categories-append graphics math
python.versions 26 27 33 34
maintainers sean openmaintainer
description Matplotlib is a python plotting library
long_description Matplotlib strives to produce publication quality 2D \
graphics for interactive graphing, scientific publishing, \
user interface development and web application servers \
targeting multiple user interfaces and hardcopy output \
formats. There is a 'pylab' mode which emulates matlab \
graphics. The library uses numpy for handling large data \
sets and supports a variety of output backends. This port \
provides variants for the different GUIs (gtk2, tkinter, \
homepage http://matplotlib.org/
checksums rmd160 f92929e09f9be391a76e6d2ff35c297d7e53d65d \
sha256 a4e0ba3b813ba79c48825476a1508b81d916a2372b360155df9d5f08ab78c9fa
if {${name} ne ${subport}} {
depends_lib-append port:freetype \
port:py${python.version}-dateutil \
port:py${python.version}-numpy \
port:py${python.version}-parsing \
port:py${python.version}-pyobjc-cocoa \
port:py${python.version}-six \
port:py${python.version}-tornado \
port:py${python.version}-tz
patchfiles-append patch-setup.cfg.diff \
build.env PKG_CONFIG_PATH="${python.prefix}/lib/pkgconfig"
reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/setup.cfg
# build fails with gcc-4.0 on Leopard, use gcc-4.2 (#37069)
compiler.blacklist gcc-4.0
if {${name} ne ${subport}} {
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport} \
${destroot}${prefix}/share/${subport}
xinstall -m 644 -W ${worksrcpath} CHANGELOG README.rst matplotlibrc.template \
${destroot}${prefix}/share/doc/${subport}
file copy ${worksrcpath}/examples \
${destroot}${prefix}/share/${subport}
variant webagg description "Enable WebAgg backend" {
depends_run-append port:py${python.version}-tornado
variant tkinter description "Enable tkAgg backend" {
depends_lib-append port:py${python.version}-tkinter
reinplace "s|^tkagg=False|tkagg=True|" ${worksrcpath}/setup.cfg
if {${python.version} < 30} {
variant gtk2 description "Enable GTKAgg backend" {
depends_lib-append port:py${python.version}-pygtk
reinplace "s|^gtk=False|gtk=True|" ${worksrcpath}/setup.cfg
reinplace "s|^gtkagg=False|gtkagg=True|" ${worksrcpath}/setup.cfg