Build scripts: fixed the TODOs related to patching and added some comments.