regenerate build system, apply patch