[buildout]
extends =
  ../patch/buildout.cfg

parts =
  libffi

[libffi]
recipe = slapos.recipe.cmmi
shared = true
version = 3.4.6
url = https://github.com/libffi/libffi/releases/download/v${:version}/libffi-${:version}.tar.gz
md5sum = b9cac6c5997dca2b3787a59ede34e0eb
location = @@LOCATION@@
patch-options = -p1
patches =
  ${:_profile_base_location_}/libdir.patch#f7274250c8ca43b10e7fc968f730b833
configure-options =
  --disable-multi-os-directory
  --disable-static
  --enable-portable-binary
  --with-gcc-arch=generic
# on x86_64 OpenSuse, libraries are installed under parts/libffi/lib64.
make-targets =
  install && cp -av ${:location}/lib64/* ${:location}/lib/ || true
environment =
  PATH=${patch:location}/bin:%(PATH)s
