Add more dependencies and apply patches