The build fails if you have openjpeg15 installed.
It was caused by the order of include paths.
/usr/local/include/openjpeg.h (from openjpeg15) will be used instead of /usr/local/include/openjpeg-2.3/openjpeg.h (from openjpeg 2.3.0)
-I. -I.. -I/usr/local/include/libpng16 -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include/openjpeg-2.3 -I/usr/local/include
Notified by: Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>
Approved by: portmgr (blanket)