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

[ncurses]
recipe = slapos.recipe.cmmi
shared = true
url = http://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz
md5sum = e812da327b1c2214ac1aed440ea3ae8d
patch-options = -p1
patches =
  ${:_profile_base_location_}/ncurses-5.9-gcc-5.patch#57f4cd0cc0c0a42a5ddb2167f9546d72
configure-options =
  --prefix=@@LOCATION@@
  --enable-pc-files
  --with-pkg-config-libdir=@@LOCATION@@/lib/pkgconfig
  --with-shared
  --without-ada
  --without-manpages
  --without-tests
  --without-normal
  --without-debug
  --without-gpm
  --enable-rpath
# tricky way to rerun with --enable-widec
# we even clean before rerun otherwise some steps like the installation of pc files are skipped
make-targets =
  install clean && ./configure ${:configure-options} --enable-widec && make ${:make-options} && make ${:make-options} install
post-install =
  cd '%(location)s/include'
  mv ncursesw/* .
  rm -r ncurses ncursesw
  ln -s . ncursesw
# pass dummy LDCONFIG to skip needless calling of ldconfig by non-root user
environment =
  LDCONFIG=/bin/echo
  PATH=${patch:location}/bin:%(PATH)s
make-options =
  -j1
