1 ################################################################################
5 ################################################################################
7 PYTHON_PYQT5_VERSION
= 5.7
8 PYTHON_PYQT5_SOURCE
= PyQt5_gpl-
$(PYTHON_PYQT5_VERSION
).
tar.gz
9 PYTHON_PYQT5_SITE
= http
://downloads.sourceforge.net
/project
/pyqt
/PyQt5
/PyQt-
$(PYTHON_PYQT5_VERSION
)
10 PYTHON_PYQT5_LICENSE
= GPLv3
11 PYTHON_PYQT5_LICENSE_FILES
= LICENSE
13 PYTHON_PYQT5_DEPENDENCIES
= python-sip host-python-sip qt5base
15 ifeq ($(BR2_PACKAGE_PYTHON
),y
)
16 PYTHON_PYQT5_PYTHON_DIR
= python
$(PYTHON_VERSION_MAJOR
)
17 PYTHON_PYQT5_RM_PORT_BASE
= port_v3
18 else ifeq ($(BR2_PACKAGE_PYTHON3
),y
)
19 PYTHON_PYQT5_PYTHON_DIR
= python
$(PYTHON3_VERSION_MAJOR
)
20 PYTHON_PYQT5_RM_PORT_BASE
= port_v2
23 PYTHON_PYQT5_QTDETAIL_LICENSE
= Open Source
25 PYTHON_PYQT5_QTDETAIL_TYPE
= shared
27 # Turn off features that aren't available in current qt configuration
28 PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES
+= $(if
$(BR2_PACKAGE_OPENSSL
),,PyQt_SSL
)
29 PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES
+= $(if
$(BR2_PACKAGE_QT5BASE_OPENGL
),,PyQt_OpenGL
)
30 PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES
+= $(if
$(BR2_PACKAGE_QT5BASE_OPENGL_DESKTOP
),,PyQt_Desktop_OpenGL
)
32 define PYTHON_PYQT5_QTDETAIL
33 echo
$(1) >> $(2)/qtdetail.out
36 # Since we can't run generate qtdetail.out by running qtdetail on target device
37 # we must generate the configuration.
38 define PYTHON_PYQT5_GENERATE_QTDETAIL
39 $(RM
) -f
$(1)/qtdetail.out
40 $(call PYTHON_PYQT5_QTDETAIL
,$(PYTHON_PYQT5_QTDETAIL_LICENSE
),$(1))
41 $(call PYTHON_PYQT5_QTDETAIL
,$(PYTHON_PYQT5_QTDETAIL_TYPE
),$(1))
42 $(foreach f
,$(PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES
),
43 $(call PYTHON_PYQT5_QTDETAIL
,$(f
),$(1)) \
47 PYTHON_PYQT5_CONF_OPTS
= \
48 --bindir $(TARGET_DIR
)/usr
/bin \
49 --destdir
$(TARGET_DIR
)/usr
/lib
/$(PYTHON_PYQT5_PYTHON_DIR
)/site-packages \
50 --qmake
$(HOST_DIR
)/usr
/bin
/qmake \
51 --sysroot
$(STAGING_DIR
)/usr \
52 -w
--confirm-license \
53 --no-designer-plugin \
57 define PYTHON_PYQT5_CONFIGURE_CMDS
58 $(call PYTHON_PYQT5_GENERATE_QTDETAIL
,$(@D
))
61 $(TARGET_CONFIGURE_OPTS
) \
62 $(HOST_DIR
)/usr
/bin
/python configure.py \
63 $(PYTHON_PYQT5_CONF_OPTS
) \
67 define PYTHON_PYQT5_BUILD_CMDS
68 $(TARGET_MAKE_ENV
) $(TARGET_CONFIGURE_OPTS
) $(MAKE
) -C
$(@D
)
71 # __init__.py is needed to import PyQt5
72 # __init__.pyc is needed if BR2_PACKAGE_PYTHON_PYC_ONLY is set
73 define PYTHON_PYQT5_INSTALL_TARGET_CMDS
74 $(TARGET_MAKE_ENV
) $(TARGET_CONFIGURE_OPTS
) $(MAKE
) -C
$(@D
) install
75 touch
$(TARGET_DIR
)/usr
/lib
/$(PYTHON_PYQT5_PYTHON_DIR
)/site-packages
/PyQt5
/__init__.py
76 $(RM
) -rf
$(TARGET_DIR
)/usr
/lib
/$(PYTHON_PYQT5_PYTHON_DIR
)/site-packages
/PyQt5
/uic
/$(PYTHON_PYQT5_RM_PORT_BASE
)
79 $(eval
$(generic-package
))