graphics/png fails when it's built with ninja. It dies while forcing you
to run the optional tests.
Fix: There are two possible fixes. The first is to use the attached patch,
which uses MAKE_CMD (which ninja.mk sets) instead of MAKE.
But the option I'd like to suggest is to stop forcing users to run the tests.
Just turn the post-build: into test: or wrap it in DEVELOPER or something.
Users are smart enough to figure out whether they want to waste cycles on
optional tests (hint: I bet they don't).
How-To-Repeat:
[root@apnoea /usr/ports/BUILD/png] CMAKE_NINJA=yes make
===> Building for png-1.5.17
ninja: no work to do.
make[2]: make[2]: don't know how to make test. Stop
make[2]: stopped in /usr/BUILD-ports/png/work/libpng-1.5.17
[: xTry: unexpected operator
*** Error code 1
Stop.
make[1]: stopped in /usr/BUILD-ports/png
*** Error code 1
Stop.
make: stopped in /usr/BUILD-ports/png