bsd.port.mk currently contains the following for not stripping targets when in, for example, debug mode: .if defined(INSTALL_TARGET) INSTALL_TARGET:= ${INSTALL_TARGET:S/^install-strip$/install/g} .endif This assumes the target for installing stuff with symbols stripped is always called "install-strip", which is not the case -- CMake calls this target "install/strip", for example, so all CMake-based ports currently cannot benefit from the stripping infrastructure at the moment. I'm not sure if there needs to be some INSTALL_STRIP_TARGET variable or something like that.
I'm not sure this is a bug. Ports using cmake do not use install-strip as a target so the line doesn't cause any problem to ports using cmake. Substitution specific to cmake can go in Uses/cmake.mk
Ports using CMake don't use install-strip, but they do use install/strip. My point is that the latter does not work with the infrastructure in bsd.port.mk so the symbols are never stripped even though they should.
install-strip is not defined by default as well but defined port by port, the default still is install
I know. What I am saying is that this does not work: INSTALL_TARGET=install/strip. It will stay like that even if I do not want to strip the symbols.
Uses/cmake.mk has some logic already: 67 .if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG) 68 INSTALL_TARGET?= install/strip 69 .endif % make -C www/faup -V INSTALL_TARGET install/strip % make -C www/faup -V INSTALL_TARGET WITH_DEBUG=yes install
Hmm, very interesting. IIRC I tested this with devel/cmake itself, but I guess the problem there's coming from bsd.port.mk being used instead of bsd.port.pre.mk + change INSTALL_TARGET + bsd.port.post.mk. Thanks!