python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / python-sip / python-sip.mk
blob0c0a94738ddf211e726e29977d6eb7e0e90d8d0d
1 ################################################################################
3 # python-sip
5 ################################################################################
7 PYTHON_SIP_VERSION = 4.18
8 PYTHON_SIP_SOURCE = sip-$(PYTHON_SIP_VERSION).tar.gz
9 PYTHON_SIP_SITE = http://downloads.sourceforge.net/project/pyqt/sip/sip-$(PYTHON_SIP_VERSION)
10 PYTHON_SIP_LICENSE = SIP license or GPLv2 or GPLv3
11 PYTHON_SIP_LICENSE_FILES = LICENSE LICENSE-GPL2 LICENSE-GPL3
13 ifeq ($(BR2_PACKAGE_QT5),y)
14 PYTHON_SIP_DEPENDENCIES = qt5base
15 else
16 PYTHON_SIP_DEPENDENCIES = qt
17 endif
19 ifeq ($(BR2_PACKAGE_PYTHON),y)
20 PYTHON_SIP_DEPENDENCIES += python
21 HOST_PYTHON_SIP_DEPENDENCIES += host-python
22 PYTHON_SIP_LIB_DIR = usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
23 PYTHON_SIP_INCLUDE_DIR = usr/include/python$(PYTHON_VERSION_MAJOR)
24 else ifeq ($(BR2_PACKAGE_PYTHON3),y)
25 PYTHON_SIP_DEPENDENCIES += python3
26 HOST_PYTHON_SIP_DEPENDENCIES += host-python3
27 PYTHON_SIP_LIB_DIR = usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages
28 PYTHON_SIP_INCLUDE_DIR = usr/include/python$(PYTHON3_VERSION_MAJOR)m
29 endif
31 define HOST_PYTHON_SIP_CONFIGURE_CMDS
32 (cd $(@D); \
33 $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(HOST_DIR)/usr/bin/python configure.py)
34 endef
36 define HOST_PYTHON_SIP_BUILD_CMDS
37 $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)
38 endef
40 define HOST_PYTHON_SIP_INSTALL_CMDS
41 $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) install -C $(@D)
42 endef
44 define PYTHON_SIP_CONFIGURE_CMDS
45 (cd $(@D); \
46 $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/usr/bin/python configure.py \
47 --bindir $(TARGET_DIR)/usr/bin \
48 --destdir $(TARGET_DIR)/$(PYTHON_SIP_LIB_DIR) \
49 --incdir $(STAGING_DIR)/$(PYTHON_SIP_INCLUDE_DIR) \
50 --sipdir $(TARGET_DIR)/usr/share/sip \
51 --sysroot $(STAGING_DIR)/usr \
52 --use-qmake && \
53 $(HOST_DIR)/usr/bin/qmake)
54 endef
56 define PYTHON_SIP_BUILD_CMDS
57 $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
58 endef
60 define PYTHON_SIP_INSTALL_TARGET_CMDS
61 $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) install -C $(@D)
62 endef
64 $(eval $(generic-package))
65 $(eval $(host-generic-package))