English German (de_DE)
.if ${FLAVOR:Upy27:Mpy2*}
USE_GNOME= pygobject3
Adding Flavors support to a PHP application is straightforward:
An Introduction to Flavors
Another Basic Flavors Usage
Another example could be, a port can have a GTK flavor and a QT flavor, depending on which toolkit it uses.
As all packages must have a different package name, flavors must change theirs, using `_flavor__PKGNAMEPREFIX` and `_flavor__PKGNAMESUFFIX` makes this easy:
BUILD_WRKSRC= ${WRKSRC}/loaders/python
INSTALL_WRKSRC= ${WRKSRC}/loaders/python
.else # py3*
USE_GNOME+= py3gobject3
BUILD_WRKSRC= ${WRKSRC}/loaders/python3
INSTALL_WRKSRC= ${WRKSRC}/loaders/python3
.endif
Basic Flavors Usage
CONFIGURE_ARGS+= --disable-python2 --enable-python3 \
ac_cv_path_PYTHON3_CONFIG=${LOCALBASE}/bin/python${PYTHON_VER}-config
CONFIGURE_ARGS+= --enable-python2 --disable-python3
Chapter 7. Flavors
FLAVOR?= ${FLAVORS:[1]}
FLAVORS= default lite
lite_PKGNAMESUFFIX= -lite
[...]
.if ${FLAVOR:U} != lite
[enable non lite features]
.endif
FLAVORS= normal lite
lite_PKGNAMESUFFIX= -lite
FLAVORS= x11 nox11
FLAVOR?= ${FLAVORS:[1]}
nox11_PKGNAMESUFFIX= -nox11
[...]
.if ${FLAVOR} == x11
[enable x11 features]
.endif
Flavor Specific `PKGNAME`
Flavorizing a PHP Application
Flavors
Flavors Helpers