# -*- 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 PortSystem 1.0 PortGroup python 1.0 PortGroup compiler_wrapper 1.0 name py-matplotlib version 3.9.2 revision 0 categories-append graphics math license {PSF BSD} maintainers {reneeotten @reneeotten} 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, gtk3, \ tkinter, qt4, qt5, cairo, latex). homepage https://matplotlib.org/ checksums rmd160 e895790ac0f0c3483e7299a92370393b4514724d \ sha256 96ab43906269ca64a6366934106fa01534454a69e471b7bf3d79083981aaab92 \ size 36088381 python.versions 39 310 311 312 313 python.pep517_backend meson if {${name} ne ${subport}} { compiler.cxx_standard 2017 depends_build-append \ port:py${python.version}-setuptools_scm \ path:bin/pkg-config:pkgconfig \ port:py${python.version}-certifi \ port:py${python.version}-pybind11 \ port:ninja depends_lib-append \ port:freetype \ port:qhull \ port:py${python.version}-contourpy \ port:py${python.version}-cycler \ port:py${python.version}-dateutil \ port:py${python.version}-fonttools \ port:py${python.version}-kiwisolver \ port:py${python.version}-numpy \ port:py${python.version}-parsing \ port:py${python.version}-packaging \ port:py${python.version}-Pillow if {${python.version} < 310} { depends_lib-append \ port:py${python.version}-importlib-resources } patchfiles patch-numpy-version-pyproject.toml.diff \ patch-python-binary-meson.build.diff post-patch { reinplace "s|@@PYTHONBIN@@|${python.bin}|g" \ ${worksrcpath}/meson.build } build.args-append \ -Csetup-args=-Dsystem-freetype=True \ -Csetup-args=-Dsystem-qhull=True build.env-append \ PATH=${python.prefix}/bin:$env(PATH) \ PKG_CONFIG_PATH=${python.prefix}/lib/pkgconfig \ CFLAGS=${configure.cxxflags} \ CXXFLAGS=${configure.cxxflags} destroot.env-append \ PATH=${python.prefix}/bin:$env(PATH) \ PKG_CONFIG_PATH=${python.prefix}/lib/pkgconfig \ CFLAGS=${configure.cxxflags} \ CXXFLAGS=${configure.cxxflags} # do not build the 'macosx' backend when GCC is used as a compiler and/or on OSes before 10.12 # see: https://trac.macports.org/ticket/61757 if {[string match *gcc* ${configure.compiler}] || ${os.platform} eq "darwin" && ${os.major} < 16} { build.args-append \ -Csetup-args=-Dmacosx=False } # fix for missing symbols on 10.13 and below; see: https://trac.macports.org/ticket/71255 if {${os.platform} eq "darwin" && ${os.major} < 18} { build.args-append \ -Csetup-args=-Db_lto=false # FIXME remove conditional revision increase upon next update incr revision } post-destroot { xinstall -d ${destroot}${prefix}/share/doc/${subport} \ ${destroot}${prefix}/share/${subport} xinstall -m 0644 {*}[glob ${worksrcpath}/README.*] \ ${destroot}${prefix}/share/doc/${subport} file copy ${worksrcpath}/galleries \ ${destroot}${prefix}/share/${subport} } variant tkinter description "Enable TkAgg backend" { depends_lib-append port:py${python.version}-tkinter } variant gtk3 description "Enable GTK3Agg backend" { depends_lib-append port:py${python.version}-gobject3 \ path:lib/pkgconfig/gtk+-3.0.pc:gtk3 } variant qt5 description "Enable Qt5Agg backend" { depends_lib-append port:py${python.version}-pyqt5 } variant cairo description "Enable Cairo backends" { depends_lib-append port:py${python.version}-cairo } if {${python.version} < 312} { variant pyside2 description "Enable PySide2 backend" { depends_lib-append port:py${python.version}-pyside2 } } variant dvipng description "Enable dvipng support" { depends_run-append port:dvipng } variant ghostscript description "Enable GhostScript support" { depends_run-append port:ghostscript } variant latex description "Enable LaTeX support" { depends_run-append bin:latex:texlive } variant pdftops description "Enable pdftops support" { depends_run-append bin:pdftops:poppler } if {![variant_isset tkinter] && ![variant_isset qt5] && ![variant_isset qt4] && ![variant_isset pyside] && ![variant_isset pyside2]} { default_variants-append +cairo } notes "The default backend is the interactive Mac OS X backend. Different\ backends can be specified using the ~/.matplotlib/matplotlibrc file.\ More details regarding backends can be found in the matplotlib FAQ: https://matplotlib.org/stable/users/explain/backends.html" }