Commit ce726bae authored by Yegor Yefremov's avatar Yegor Yefremov Committed by Thomas Petazzoni
Browse files

python-cffi: add host variant



Host variant is needed to cross-compile CFFI based C library wrappers.

Signed-off-by: default avatarYegor Yefremov <yegorslists@googlemail.com>
[Thomas:
 - add dependency on host-pkgconf for the host package variant.
 - add various environment variables needed to make pkg-config behave
   properly when building host-python-cffi. Otherwise, pkg-config
   returns values that are appropriate to build things for the target,
   and the build fails.]
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 60093650
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -12,4 +12,16 @@ PYTHON_CFFI_DEPENDENCIES = host-pkgconf libffi
PYTHON_CFFI_LICENSE = MIT
PYTHON_CFFI_LICENSE_FILES = LICENSE

# This host package uses pkg-config to find libffi, so we have to
# provide the proper hints for pkg-config to behave properly for host
# packages.
HOST_PYTHON_CFFI_ENV = \
	PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
	PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
	PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
	PKG_CONFIG_SYSROOT_DIR="/" \
	PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig"
HOST_PYTHON_CFFI_DEPENDENCIES = host-pkgconf host-python-pycparser host-libffi

$(eval $(python-package))
$(eval $(host-python-package))