Changeset View
Standalone View
CHANGES
Updating Information for FreeBSD ports developers | Updating Information for FreeBSD ports developers | ||||
This file is maintained by portmgr@FreeBSD.org and copyrighted by the | This file is maintained by portmgr@FreeBSD.org and copyrighted by the | ||||
FreeBSD Foundation. | FreeBSD Foundation. | ||||
This file contains major changes to ports and the ports infrastructure. | This file contains major changes to ports and the ports infrastructure. | ||||
Intended audience are ports committers, maintainers and other | Intended audience are ports committers, maintainers and other | ||||
developers. User oriented changes should be submitted for inclusion | developers. User oriented changes should be submitted for inclusion | ||||
in the release notes and/or placed into UPDATING. | in the release notes and/or placed into UPDATING. | ||||
All ports committers are allowed to commit to this file. | All ports committers are allowed to commit to this file. | ||||
20171113: | |||||
AUTHOR: mat@FreeBSD.org | |||||
Flavors is a way to have a variations on a port. The port is built multiple | |||||
allanjude: Flavors are a way to have multiple variants of a port. | |||||
bdreweryUnsubmitted Done Inline ActionsI don't think we should use the word 'variant' anywhere as then people ask "Why not call them variants?? I will just do that anyway". And there is prior art for "variant" in macports which seems to be analogous to our OPTIONS and not FLAVORS. bdrewery: I don't think we should use the word 'variant' anywhere as then people ask "Why not call them… | |||||
matAuthorUnsubmitted Done Inline ActionsI am at a loss of synonyms, what would you want me to use ? I can't use flavor again because I cannot define some word with itself, "version" would be bad... mat: I am at a loss of synonyms, what would you want me to use ? I can't use flavor again because I… | |||||
adamwUnsubmitted Done Inline ActionsI'm not sure that "variant" will be confused for OPTIONS, because we've been pretty clear on what OPTIONS are in FreeBSD for many years. But if not variants: configurations, variations, forms, arrangements. adamw: I'm not sure that "variant" will be confused for OPTIONS, because we've been pretty clear on… | |||||
times, with the variations. To declare flavors, set the FLAVORS variable | |||||
with the flavors you want defined. The first flavor will be the default: | |||||
Done Inline Actionsto the flavors adamw: to the flavors | |||||
FLAVORS= flavor1 flavor2 | |||||
The flavors MUST be lowercase, and can contain [[:lower:][:digit:]_]. | |||||
Then, when building the port, pass the FLAVOR variable to the environment to | |||||
select the flavor. | |||||
Done Inline Actions"pass the FLAVOR as an argument after make". Your example is not environment, and as far as I can tell it is safer to use it as an argument rather than as environment anyway. bdrewery: "pass the FLAVOR as an argument after make". Your example is not environment, and as far as I… | |||||
$ make install FLAVOR=flavor2 | |||||
In the port, you can then change the behavior depending on the value of the | |||||
FLAVOR variable. Note that the different flavors MUST have different | |||||
PKGNAMEs. As it can be empty be sure to guard against that: | |||||
Done Inline ActionsBe sure to guard against an empty FLAVOR variable by using ${FLAVOR:U}: adamw: Be sure to guard against an empty FLAVOR variable by using ${FLAVOR:U}: | |||||
.if ${FLAVOR:U} == flavor2 | |||||
PKGNAMESUFFIX= -foo | |||||
OPTIONS_DEFAULT+= FOO | |||||
.endif | |||||
20171020: | 20171020: | ||||
AUTHOR: ak@FreeBSD.org | AUTHOR: ak@FreeBSD.org | ||||
The USES=fmake has been removed. It was created to help migration from | The USES=fmake has been removed. It was created to help migration from | ||||
old FreeBSD make (pmake) and there are no more users of it left in | old FreeBSD make (pmake) and there are no more users of it left in | ||||
the ports tree. | the ports tree. | ||||
20171012: | 20171012: | ||||
▲ Show 20 Lines • Show All 3,364 Lines • Show Last 20 Lines |
Flavors are a way to have multiple variants of a port.