Disable scala
Extract build_r so it can be run standalone easily.