Files
haikuports/dev-python/matplotlib/matplotlib-3.7.2.recipe

121 lines
2.7 KiB
Bash

SUMMARY="Pure python plotting library with matlab like syntax"
DESCRIPTION="Matplotlib is a plotting library for the Python programming \
language and its numerical mathematics extension NumPy. It provides an \
object-oriented API for embedding plots into applications using \
general-purpose GUI toolkits like Tkinter, wxPython, Qt, or GTK+. There is \
also a procedural \"pylab\" interface, designed to closely resemble that of \
MATLAB, though its use is discouraged."
HOMEPAGE="https://matplotlib.org/"
COPYRIGHT="2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael \
Droettboom and the Matplotlib development team \
2012 - 2023 The Matplotlib development team"
LICENSE="Matplotlib
Adobe
BitstreamVera
BSD (3-clause)
MIT
SIL Open Font License v1.1
CC0 1.0 Universal
AMS
Anti-Grain Geometry
BaKoMa
ColorBrewer
Qhull
STIX
yorick"
REVISION="2"
SOURCE_URI="https://github.com/matplotlib/matplotlib/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="be06fea01c57517dbed17dd1aa8f2b3f5750c54203553f9d2096cf2e43a23b1e"
SOURCE_FILENAME="matplotlib-$portVersion.tar.gz"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
pythonPackage="python310"
pythonVersion="3.10"
PROVIDES_python310="
${portName}_$pythonPackage = $portVersion
"
REQUIRES_python310="
cmd:python$pythonVersion
lib:libfreetype$secondaryArchSuffix
lib:libqhull_r$secondaryArchSuffix
dateutil_$pythonPackage
fonttools_$pythonPackage
contourpy_$pythonPackage
cycler_$pythonPackage
numpy_$pythonPackage
kiwisolver_$pythonPackage
pyparsing_$pythonPackage
"
if [ "$targetArchitecture" = x86_gcc2 ]; then
eval "PROVIDES_python310+=\"
matplotlib_python310 = $portVersion
\""
fi
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libfreetype$secondaryArchSuffix
devel:libqhull_r$secondaryArchSuffix
numpy_$pythonPackage
packaging_$pythonPackage
pybind11_$pythonPackage
setuptools_scm_$pythonPackage
tomli_$pythonPackage
"
BUILD_PREREQUIRES="
cmd:awk
cmd:cmp
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python$pythonVersion
"
INSTALL()
{
cat > mplsetup.cfg << EOF
[libs]
enable_lto = True
system_freetype = True
system_qhull = True
[packages]
sample_data = True
[gui_support]
macosx = False
[rc_options]
backend = Agg
EOF
export SETUPTOOLS_SCM_PRETEND_VERSION=$portVersion
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
rm -rf build
$python setup.py build install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python*
}
TEST()
{
python=python$pythonVersion
$python test.py
}