kumquat-buildroot/package/python-sip/python-sip.mk

62 lines
2.0 KiB
Makefile
Raw Normal View History

################################################################################
#
# python-sip
#
################################################################################
Revert "package/python-sip: bump to version 4.19.13" This reverts commit 9135ab7a7c76b38b50dadbc381c55e77c86e9e0d. This version bump causes a major issue: the entire root filesystem of the build machine is being copied into $(STAGING_DIR)/usr/lib/python2.7/, causing the build to consume the entire disk space of the machine. >>> python-sip 4.19.13 Installing to target [...] make[2]: Leaving directory `/home/test/buildroot/output/build/python-sip-4.19.13/siplib' Traceback (most recent call last): File "/home/test/buildroot/output/build/python-sip-4.19.13/mk_distinfo.py", line 108, in <module> fn_f = open(fn, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/home/test/buildroot/output/target/usr/lib/python3.7/site-packages/sip.pyi' make[1]: *** [install_distinfo] Error 1 make[1]: *** Waiting for unfinished jobs.... cp: cannot open `/proc/fs/aufs/plink_maint' for reading: Permission denied cp: cannot open `/proc/sys/fs/protected_fifos' for reading: Permission denied cp: cannot open `/proc/sys/fs/protected_hardlinks' for reading: Permission denied cp: cannot open `/proc/sys/fs/protected_regular' for reading: Permission denied cp: cannot open `/proc/sys/fs/protected_symlinks' for reading: Permission denied cp: cannot open `/proc/sys/kernel/cad_pid' for reading: Permission denied cp: cannot open `/proc/sys/kernel/unprivileged_userns_apparmor_policy' for reading: Permission denied cp: cannot open `/proc/sys/kernel/usermodehelper/bset' for reading: Permission denied ... Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-09-21 14:48:40 +02:00
PYTHON_SIP_VERSION = 4.18
PYTHON_SIP_SOURCE = sip-$(PYTHON_SIP_VERSION).tar.gz
PYTHON_SIP_SITE = http://downloads.sourceforge.net/project/pyqt/sip/sip-$(PYTHON_SIP_VERSION)
PYTHON_SIP_LICENSE = SIP license or GPL-2.0 or GPL-3.0
PYTHON_SIP_LICENSE_FILES = LICENSE LICENSE-GPL2 LICENSE-GPL3
PYTHON_SIP_DEPENDENCIES = qt5base
ifeq ($(BR2_PACKAGE_PYTHON),y)
PYTHON_SIP_DEPENDENCIES += python
HOST_PYTHON_SIP_DEPENDENCIES += host-python
PYTHON_SIP_LIB_DIR = usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
PYTHON_SIP_INCLUDE_DIR = usr/include/python$(PYTHON_VERSION_MAJOR)
else ifeq ($(BR2_PACKAGE_PYTHON3),y)
PYTHON_SIP_DEPENDENCIES += python3
HOST_PYTHON_SIP_DEPENDENCIES += host-python3
PYTHON_SIP_LIB_DIR = usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages
PYTHON_SIP_INCLUDE_DIR = usr/include/python$(PYTHON3_VERSION_MAJOR)m
endif
define HOST_PYTHON_SIP_CONFIGURE_CMDS
(cd $(@D); \
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py)
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); \
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py \
--bindir $(TARGET_DIR)/usr/bin \
--destdir $(TARGET_DIR)/$(PYTHON_SIP_LIB_DIR) \
--incdir $(STAGING_DIR)/$(PYTHON_SIP_INCLUDE_DIR) \
--sipdir $(TARGET_DIR)/usr/share/sip \
--sysroot $(STAGING_DIR)/usr \
--use-qmake && \
$(HOST_DIR)/bin/qmake)
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))