[buildout]
extends =
  ../pcre/buildout.cfg
  ../coreutils/buildout.cfg
  ../xz-utils/buildout.cfg
parts =
  grep-output

[grep]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/grep/grep-2.25.tar.xz
md5sum = 04e96b0e6f0fe6a180ae62c88fcd0af6
environment =
  PATH=${xz-utils:location}/bin:%(PATH)s
  CPPFLAGS=-I${pcre:location}/include
  LDFLAGS=-L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib

[grep-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:grep}
grep = ${grep:location}/bin/grep
