diff options
author | Yegor Yefremov <yegorslists@googlemail.com> | 2016-01-05 08:17:24 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-02-03 22:34:14 +0100 |
commit | ce726bae3150506174fd612318615a3be81224bc (patch) | |
tree | c85d96569051b4c0141b7e499e76f9194c9e29ce /package/python-cffi | |
parent | 60093650c84d9b758a5919f663797fdb72fde323 (diff) | |
download | buildroot-ce726bae3150506174fd612318615a3be81224bc.tar.gz buildroot-ce726bae3150506174fd612318615a3be81224bc.zip |
python-cffi: add host variant
Host variant is needed to cross-compile CFFI based C library wrappers.
Signed-off-by: Yegor 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: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/python-cffi')
-rw-r--r-- | package/python-cffi/python-cffi.mk | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/package/python-cffi/python-cffi.mk b/package/python-cffi/python-cffi.mk index 70fbe02374..7151789926 100644 --- a/package/python-cffi/python-cffi.mk +++ b/package/python-cffi/python-cffi.mk @@ -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)) |