Page MenuHomeFreeBSD

Add Flavor helpers for PLIST_FILES, COMMENT, CONFIGURE_[ARGS|ENV]
Needs ReviewPublic

Authored by fluffy on Nov 16 2018, 1:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 20, 3:23 PM
Unknown Object (File)
Mon, Oct 20, 3:23 PM
Unknown Object (File)
Mon, Oct 20, 1:35 AM
Unknown Object (File)
Sep 17 2025, 11:31 AM
Unknown Object (File)
Jun 27 2025, 10:25 PM
Unknown Object (File)
Jun 25 2025, 9:02 AM
Unknown Object (File)
Jun 17 2025, 1:51 AM
Unknown Object (File)
Jun 14 2025, 11:06 PM
Subscribers

Details

Reviewers
None
Group Reviewers
portmgr
Summary

If a port have dozen of flavors, using additional helpers allow to dramatically desrease size of Makefile

PLIST is always handled by helper, wonder why PLIST_FILES was missed.
Override COMMENT is useful for flavored plugins, CONFIGURE_[ARGS|ENV] is also useful as helper — it allow to avoid extra .ifdef in Makefile

For example, with additional helpers I can simply use

filter-clamav_COMMENT=                  Check messages with ClamAV in OpenSMTPD
filter-clamav_RUN_DEPENDS=              clamscan:security/clamav
filter-clamav_PLIST_FILES=              libexec/opensmtpd/filter-clamav \
                                        man/man8/filter-clamav.8.gz
filter-clamav_CONFIGURE_ARGS=           --with-experimental-filter-clamav

instead of two blocks

filter-clamav_RUN_DEPENDS=              clamscan:security/clamav

and

.if ${FLAVOR:M*clamav}
COMMENT=                  Check messages with ClamAV in OpenSMTPD
PLIST_FILES=              libexec/opensmtpd/filter-clamav \
                                        man/man8/filter-clamav.8.gz
CONFIGURE_ARGS=           --with-experimental-filter-clamav
.endif
Test Plan

exp-run?

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

No port will ever have a dozen flavors. Flavors are few, not many.

I do not see a reason to change the COMMENT, it is the same software, it is just built differently, and I don't think I ever saw COMMENT being changed when options changes.

Also, from your example, it seems you are trying to abuse flavors to get some sort of subpackages, which will never be approved.