2015-04-19 10:03:52 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# python-sip
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2016-06-26 07:54:46 +02:00
|
|
|
PYTHON_SIP_VERSION = 4.18
|
2015-04-19 10:03:52 +02:00
|
|
|
PYTHON_SIP_SOURCE = sip-$(PYTHON_SIP_VERSION).tar.gz
|
|
|
|
PYTHON_SIP_SITE = http://downloads.sourceforge.net/project/pyqt/sip/sip-$(PYTHON_SIP_VERSION)
|
2017-03-30 15:43:33 +02:00
|
|
|
PYTHON_SIP_LICENSE = SIP license or GPL-2.0 or GPL-3.0
|
2015-04-19 10:03:52 +02:00
|
|
|
PYTHON_SIP_LICENSE_FILES = LICENSE LICENSE-GPL2 LICENSE-GPL3
|
|
|
|
|
2016-08-19 15:42:24 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_QT5),y)
|
|
|
|
PYTHON_SIP_DEPENDENCIES = qt5base
|
|
|
|
else
|
2015-04-19 10:03:52 +02:00
|
|
|
PYTHON_SIP_DEPENDENCIES = qt
|
2016-08-19 15:42:24 +02:00
|
|
|
endif
|
2015-04-19 10:03:52 +02:00
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON),y)
|
|
|
|
PYTHON_SIP_DEPENDENCIES += python
|
|
|
|
HOST_PYTHON_SIP_DEPENDENCIES += host-python
|
2015-04-19 15:58:58 +02:00
|
|
|
PYTHON_SIP_LIB_DIR = usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
|
|
|
|
PYTHON_SIP_INCLUDE_DIR = usr/include/python$(PYTHON_VERSION_MAJOR)
|
2015-04-19 10:03:52 +02:00
|
|
|
else ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
|
|
|
PYTHON_SIP_DEPENDENCIES += python3
|
|
|
|
HOST_PYTHON_SIP_DEPENDENCIES += host-python3
|
2015-04-19 15:58:58 +02:00
|
|
|
PYTHON_SIP_LIB_DIR = usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages
|
|
|
|
PYTHON_SIP_INCLUDE_DIR = usr/include/python$(PYTHON3_VERSION_MAJOR)m
|
2015-04-19 10:03:52 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
define HOST_PYTHON_SIP_CONFIGURE_CMDS
|
|
|
|
(cd $(@D); \
|
2017-07-05 13:14:19 +02:00
|
|
|
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py)
|
2015-04-19 10:03:52 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_PYTHON_SIP_BUILD_CMDS
|
|
|
|
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_PYTHON_SIP_INSTALL_CMDS
|
|
|
|
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) install -C $(@D)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define PYTHON_SIP_CONFIGURE_CMDS
|
|
|
|
(cd $(@D); \
|
2017-07-05 13:14:19 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py \
|
2015-04-19 10:03:52 +02:00
|
|
|
--bindir $(TARGET_DIR)/usr/bin \
|
2015-04-19 15:58:58 +02:00
|
|
|
--destdir $(TARGET_DIR)/$(PYTHON_SIP_LIB_DIR) \
|
2017-04-21 17:24:48 +02:00
|
|
|
--incdir $(STAGING_DIR)/$(PYTHON_SIP_INCLUDE_DIR) \
|
2015-04-19 10:03:52 +02:00
|
|
|
--sipdir $(TARGET_DIR)/usr/share/sip \
|
|
|
|
--sysroot $(STAGING_DIR)/usr \
|
|
|
|
--use-qmake && \
|
2017-07-05 13:14:19 +02:00
|
|
|
$(HOST_DIR)/bin/qmake)
|
2015-04-19 10:03:52 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define PYTHON_SIP_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define PYTHON_SIP_INSTALL_TARGET_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) install -C $(@D)
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|
|
|
|
$(eval $(host-generic-package))
|