Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Sep 2017 13:54:26 -0400
From:      Ryan Steinmetz <zi@FreeBSD.org>
To:        ports-list freebsd <freebsd-ports@freebsd.org>
Cc:        freebsd-ports-announce@FreeBSD.org
Subject:   Re: [FreeBSD-Ports-Announce] [HEADUP] FLAVORS landing.
Message-ID:  <20170926175426.GA52009@exodus.zi0r.com>
In-Reply-To: <dcc6fa75-8325-01e9-4a86-e3bc61bb27a2@FreeBSD.org>
References:  <dcc6fa75-8325-01e9-4a86-e3bc61bb27a2@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On (09/26/17 16:05), Mathieu Arnold wrote:
>Hi,
>
>**Do not commit FLAVORS to any ports, a hook will prevent it, that being
>said, do try it and test what can be done.**
>
>To test this feature in poudriere, you need
>poudriere-devel-3.1.99.20170621 or later.
>
>This has been a long awaiting feature, most of the work has been done by
>bapt, bdrewery and antoine, I am just the one actually doing the
>announce and commit and all.
>
>All this information, and more to come are in the first link to our wiki
>in the bottom block. A roadmap is in the second link.
>
>To define a different flavors in a port, before any include, set:
>
>FLAVORS=3D=A0 flavor1 flavor2 [...]
>
>The first flavor in the list will be the default.
>
>You can then check for flavors after includ'ing bsd.port.options.mk with=
:
>
>.if ${FLAVOR} =3D=3D flavor2
>[change some stuff]
>.endif
>


Will we have the ability to do something like the following?:

FLAVORS=3DMYSQL REDIS NOTLS
FLAVOR_MYSQL_OPTIONS_ENABLE=3D MYSQL
FLAVOR_REDIS_OPTIONS_ENABLE=3D REDIS
FLAVOR_NOTLS_OPTIONS_DISABLE=3D TLS

I envision (at least for my ports) this being something very common.

I assume that the current code will already permit us to do something=20
like the following:

.if ${FLAVOR} =3D=3D MYSQL
OPTIONS_DEFAULT+=3D MYSQL
.endif


-r

>To build flavor2, simply run:
>
>make FLAVOR=3Dflavor2
>
>To depend on a specific flavor, write @<flavor> at the end of the depend
>string, for example, to depend on flavor "foo":
>
>RUN_DEPENDS=3D=A0=A0=A0 something:origin@foo
>
>--=20
>Mathieu Arnold
>
>




--=20
Ryan Steinmetz
PGP: 9079 51A3 34EF 0CD4 F228  EDC6 1EF8 BA6B D028 46D7



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170926175426.GA52009>