Looks like there is two ways to name pc-files for lua. In Exherbo currently there is used lua-5.1.pc naming instead of lua5.1.pc.
ionice -c 3 nice -n 19 make -j12 --load-average=8 PREFIX=/usr/x86_64-pc-linux-gnu CC=x86_64-pc-linux-gnu-gcc LUA_VERSION=5.1 PKG_CONFIG=x86_64-pc-linux-gnu-pkg-config Package lua5.1 was not found in the pkg-config search path. Perhaps you should add the directory containing `lua5.1.pc' to the PKG_CONFIG_PATH environment variable No package 'lua5.1' found build/lua-detect.mk:30: *** "x86_64-pc-linux-gnu-pkg-config couldn't find linker flags for lua5.1!". Stop.
Let's enhance yet again how we do configure Lua.
My suggestion is to try both lua-$(ver) and lua$(ver:5.0=) pkg-config modules.
Besides that Exherbo switched to target-prefixed tools. I.e.
ionice -c 3 nice -n 19 make -j12 --load-average=8 PREFIX=/usr LIBDIR=/usr/lib X11_PREFIX=/usr CC=x86_64-pc-linux-gnu-gcc /bin/sh: pkg-config: command not found
Also as I already mentioned in [#64] I'd like to have a better control over Lua version being used.
So... Another patch regarding build process is comming...
Here comes the patch suggestion
Applied, thanks!!