package/python-matplotlib: add QT5 support
authorGwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Mon, 27 Jul 2020 13:00:22 +0000 (15:00 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Mon, 27 Jul 2020 14:55:46 +0000 (16:55 +0200)
python-matplotlib may be used in qt5 application. This patch add option to
enable qt5. Since this backend is automatically enabled when pyqt5 is detected,
list dependencies is simply an updated (no enable/disable options).

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/python-matplotlib/Config.in
package/python-matplotlib/python-matplotlib.mk

index e6ed8cda2f2800f77c575b06b0e21ddb764cf63c..cfa0bc30c32fbfcbc0978126759d742767febed3 100644 (file)
@@ -23,6 +23,18 @@ config BR2_PACKAGE_PYTHON_MATPLOTLIB
 
          https://matplotlib.org/
 
+if BR2_PACKAGE_PYTHON_MATPLOTLIB
+
+config BR2_PACKAGE_PYTHON_MATPLOTLIB_QT
+       bool "qt display"
+       depends on BR2_PACKAGE_QT5 # python-pyqt5
+       select BR2_PACKAGE_PYTHON_PYQT5
+       select BR2_PACKAGE_QT5BASE
+       select BR2_PACKAGE_QT5BASE_FONTCONFIG
+       select BR2_PACKAGE_QT5BASE_WIDGETS
+
+endif
+
 comment "python-matplotlib needs a toolchain w/ C++"
        depends on !BR2_INSTALL_LIBSTDCPP
 
index 7082637d0988fe000497404bc956ab8540e82f45..8d00ac8a07e52bf7e6f37d0d7d88686104e81608 100644 (file)
@@ -13,4 +13,8 @@ PYTHON_MATPLOTLIB_DEPENDENCIES = host-pkgconf freetype host-python-numpy \
        libpng python-cycler
 PYTHON_MATPLOTLIB_SETUP_TYPE = setuptools
 
+ifeq ($(BR2_PACKAGE_PYTHON_MATPLOTLIB_QT),y)
+PYTHON_MATPLOTLIB_DEPENDENCIES += python-pyqt5
+endif
+
 $(eval $(python-package))