apply patch.txt from ports/176705 by Olivier Cochard-Labbe