add lib and patches dirs