[buildout]
parts =
  ncurses

[ncurses]
recipe = slapos.recipe.cmmi
shared = true
url = http://ftp.gnu.org/gnu/ncurses/ncurses-6.4.tar.gz
md5sum = 5a62487b5d4ac6b132fe2bf9f8fad29b
configure-options =
  --prefix=%(location)s
  --enable-pc-files
  --disable-termcap
  --with-pkg-config-libdir=%(location)s/lib/pkgconfig
  --with-shared
  --with-termlib
  --with-versioned-syms
  --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
  echo 'GROUP( libtinfo.so )' > %(location)s/lib/libtermcap.so
# pass dummy LDCONFIG to skip needless calling of ldconfig by non-root user
environment =
  LDCONFIG=/bin/echo
make-options =
  -j1
