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

parts =
  libffi

[libffi]
recipe = slapos.recipe.cmmi
shared = true
version = 3.3
url = http://sourceware.org/pub/libffi/libffi-${:version}.tar.gz
md5sum = 6313289e32f1d38a9df4770b014a2ca7
location = @@LOCATION@@
patch-options = -p1
patches =
  ${:_profile_base_location_}/libdir.patch#f7274250c8ca43b10e7fc968f730b833
configure-options =
  --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
