default_pre_build &&
cd "${SOURCE_DIRECTORY}" &&

echo "PREFIX=\"/usr\"" >> mandoc/configure.local &&
echo "MANDIR=\"\${PREFIX}/share/man\"" >> mandoc/configure.local &&
echo "CFLAGS=\"${CFLAGS}\"" >> mandoc/configure.local &&
echo "LDFLAGS=\"${LDFLAGS}\"" >> mandoc/configure.local &&

sedit "s:-g -O2:-std=c99 ${CFLAGS}:;s:-lm:-lm ${LDFLAGS}:" Makefile &&

patch -p0 < "${SPELL_DIRECTORY}/select.patch"
