[buildout]
extends =
  ../gmp/buildout.cfg
  ../perl/buildout.cfg
  ../xz-utils/buildout.cfg
parts =
  coreutils-output

[coreutils]
recipe = slapos.recipe.cmmi
shared = true
url = https://ftp.gnu.org/gnu/coreutils/coreutils-9.5.tar.xz
md5sum = e99adfa059a63db3503cc71f3d151e31
configure-options =
  --disable-libcap
  --without-selinux
  --prefix=@@LOCATION@@
  --with-openssl=no
environment =
  PATH=${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
  LDFLAGS=-Wl,--as-needed -L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib

# disable year 2038 problem ONLY for 32 bit architectures
[coreutils:bits32]
configure-options += --disable-year2038

[coreutils-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${:test} -x ${:test} -a -x ${:cat} -a -x ${:rm} -a -x ${:echo} -a -x ${:date} -a -x ${:md5sum} -a -x ${:basename} -a -x ${:sort} -a -x ${:tail}
test = ${coreutils:location}/bin/test
cat = ${coreutils:location}/bin/cat
rm = ${coreutils:location}/bin/rm
echo = ${coreutils:location}/bin/echo
date = ${coreutils:location}/bin/date
md5sum = ${coreutils:location}/bin/md5sum
basename = ${coreutils:location}/bin/basename
sort = ${coreutils:location}/bin/sort
tail = ${coreutils:location}/bin/tail
