2025-01-17 08:54:55 +00:00
COMMENT = Python charting and plotting API
2004-11-11 04:05:25 +00:00
2025-06-24 14:04:22 +00:00
# ../src/_backend_agg_wrapper.cpp:253:17: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'long' in initializer list [-Wc++11-narrowing]
ONLY_FOR_ARCHS = ${ LP64_ARCHS }
2026-03-13 21:57:15 +00:00
MODPY_DISTV = 3.10.8
2024-12-21 11:38:14 +00:00
DISTNAME = matplotlib-${ MODPY_DISTV }
2013-05-31 12:29:41 +00:00
PKGNAME = py-${ DISTNAME }
2018-10-29 00:28:50 +00:00
2013-05-31 12:29:41 +00:00
CATEGORIES = graphics devel math
2004-11-11 04:05:25 +00:00
2020-10-08 12:03:49 +00:00
HOMEPAGE = https://matplotlib.org/
2004-11-11 04:05:25 +00:00
2024-02-15 03:22:18 +00:00
MAINTAINER = Daniel Dickman <daniel@openbsd.org>
2004-11-11 04:05:25 +00:00
# BSD-like
2019-07-07 14:58:04 +00:00
PERMIT_PACKAGE = Yes
2007-10-12 11:07:43 +00:00
2023-01-16 17:09:43 +00:00
WANTLIB += ${ COMPILER_LIBCXX } freetype m png qhull_r z
2004-11-11 04:05:25 +00:00
2018-10-24 14:27:57 +00:00
COMPILER = base-clang ports-gcc base-gcc
2025-01-17 08:54:55 +00:00
MODULES = lang/python
2009-01-19 07:10:28 +00:00
2016-11-14 18:55:50 +00:00
MODPY_PI = Yes
2025-05-19 21:52:54 +00:00
MODPY_PYBUILD = mesonpy
2014-12-23 13:48:54 +00:00
2025-01-17 08:54:55 +00:00
MODPY_TEST_LINK_SO = Yes
MODPY_TEST_LINK_SRC = ${ WRKSRC } /lib
2023-01-16 17:09:43 +00:00
2025-06-19 23:55:02 +00:00
MODPY_TEST_DIR = ${ WRKINST } ${ MODPY_SITEPKG }
2024-12-21 11:38:14 +00:00
BUILD_DEPENDS = devel/py-certifi>= 2020.06.20 \
2025-06-19 23:55:02 +00:00
devel/py-pybind11>= 2.13.2 \
2025-05-19 21:52:54 +00:00
devel/py-setuptools_scm \
2023-01-16 17:09:43 +00:00
math/qhull \
2024-12-21 11:38:14 +00:00
textproc/py-sphinx
2022-02-05 22:21:01 +00:00
2024-12-21 11:38:14 +00:00
RUN_DEPENDS = devel/py-tz \
devel/py-dateutil>= 2.7 \
devel/py-kiwisolver>= 1.3.1 \
devel/py-parsing>= 2.3.1 \
devel/py-gobject3 \
math/py-contourpy>= 1.0.1 \
2025-06-19 23:55:02 +00:00
math/py-numpy>= 1.23 \
2024-12-21 11:38:14 +00:00
graphics/py-Pillow>= 8.0.0 \
graphics/py-cairo \
graphics/py-cycler>= 0.10 \
print/py-fonttools>= 4.22.0 \
sysutils/py-packaging>= 20.0 \
2009-04-11 08:16:58 +00:00
${ MODPY_TKINTER_DEPENDS }
2015-05-04 22:03:20 +00:00
2025-06-19 23:55:02 +00:00
TEST_DEPENDS = ${ FULLPKGNAME } :${ FULLPKGPATH }
2015-07-01 08:57:07 +00:00
# pygobject GTK3 introspection (not provided by indirect dependencies)
2022-02-05 22:21:01 +00:00
RUN_DEPENDS += x11/gtk+3
2023-01-16 17:09:43 +00:00
LIB_DEPENDS = graphics/png \
math/qhull
2015-05-04 22:03:20 +00:00
2016-11-14 18:55:50 +00:00
MAKE_ENV += LDSHARED = " ${ CC } -shared -fPIC "
2004-11-11 04:05:25 +00:00
2015-05-04 22:03:20 +00:00
EXAMPLESDIR = ${ PREFIX } /share/examples/${ MODPY_PY_PREFIX } matplotlib
2013-05-31 12:29:41 +00:00
pre-configure :
2024-01-22 23:13:46 +00:00
find ${ WRKSRC } /galleries/examples -name \* .py -exec ${ MODPY_BIN_ADJ } { } +
2004-11-11 04:05:25 +00:00
post-install :
2015-05-04 22:03:20 +00:00
${ INSTALL_DATA_DIR } ${ EXAMPLESDIR }
2024-01-22 23:13:46 +00:00
cd ${ WRKSRC } /galleries/examples && pax -rw * ${ EXAMPLESDIR }
2013-05-31 12:29:41 +00:00
2004-11-11 04:05:25 +00:00
. i n c l u d e < b s d . p o r t . m k >
2026-03-29 08:36:22 +00:00
. i f ${CHOSEN_COMPILER} = = "ports-gcc"
# as(1) can't deal with the "e" sections that port-gcc emits with -flto=auto
# Fatal error: unrecognized .section attribute: want a,w,x,M,S,G,T
MODPY_PYBUILD_ARGS += --config-setting= setup-args= -Db_lto= false
. e n d i f