Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. <callout type="warning"> **Do not start migrating *any* ports** Once this work is well tested, an all clear will be emailed to the %%FreeBSD%% Ports list. </callout> ===== New Port ===== Add <code> FLAVORS= default foo bar </code> //Note: The first in the list is the default, so depending on the use case it might be needed to have one that is the default case and does not change anything.// After either bsd.port.pre.mk or bsd.port.options.mk, check for the specific flavor option and tweak such as adding depends. <code> .if ${FLAVOR} == foo [[ .. do foo stuff .. ] .endif .if ${FLAVOR} == bar [[ .. do bar stuff .. ] .endif </code> ==== Future helpers ==== Some helpers https://reviews.freebsd.org/D12483 make your work easier. They **must be used before** any include (bsd.port.options.mk or bsd.port.pre.mk). All packages must have a different PKGNAME, so for flavored packages adding a PKGNAMEPREFIX or PKGNAMESUFFIX is required. <code> foo_PKGNAMESUFFIX= -foo bar_PKGNAMEPREFIX= bar- </code> ===== Converting an existing ===== ports/flavorsmigration.txt Last modified: 2022/04/20 11:10by StefanEsser