To make ports' Makefiles easier to read and review portlint should warn about conditionals that can be eliminated with option helpers. At least for new ports. For example, $ cd net/ocserv $ portlint -C WARN: Makefile: [49]: USES is defined with `+='. Consider using option helper FOO_USES instead. WARN: Makefile: [50]: LIB_DEPENDS is defined with `+='. Consider using option helper FOO_LIB_DEPENDS instead. WARN: Makefile: [52]: CONFIGURE_ARGS is defined with `+='. Consider using option helpers instead: FOO_CONFIGURE_ENABLE, FOO_CONFIGURE_WITH or FOO_CONFIGURE_ON. WARN: Makefile: [68]: PORT_OPTIONS found within *-install target. Consider using target option helper pre-install-FOO-on or post-install-FOO-on instead. WARN: Makefile: [73]: PORT_OPTIONS found within *-install target. Consider using target option helper pre-install-FOO-on or post-install-FOO-on instead.
Are you asking for literal examples below? Meaning that if something is spotted with a += assignment, I should recommend FOO_* helpers? That is doable, but being able to detect the specific option would be difficult.
Anything with "/^\.[[:space:]]*if.*PORT_OPTIONS/,/^\.[[:space:]]*endif/" awk/sed range can potentially be converted. If they aren't enough sometimes one can write custom helpers e.g., # From multimedia/openh264 DEBUG_BUILD_DEPENDS_OFF= ${DEBUG_BUILD_DEPENDS_OFF_${ARCH}} DEBUG_BUILD_DEPENDS_OFF_amd64= nasm:${PORTSDIR}/devel/nasm DEBUG_BUILD_DEPENDS_OFF_i386= nasm:${PORTSDIR}/devel/nasm Contrary to comment 0 no need to emphasize on patterns like += to avoid a lot of false positives from other conditionals, shared files or slave ports.
Forgotten to close?