English German (de_DE)
.if ${FLAVOR:Upy27:Mpy2*}
USE_GNOME= pygobject3
CONFIGURE_ARGS+= --enable-python2 --disable-python3
BUILD_WRKSRC= ${WRKSRC}/loaders/python
INSTALL_WRKSRC= ${WRKSRC}/loaders/python
.else # py3*
USE_GNOME+= py3gobject3
CONFIGURE_ARGS+= --disable-python2 --enable-python3 \
ac_cv_path_PYTHON3_CONFIG=${LOCALBASE}/bin/python${PYTHON_VER}-config
BUILD_WRKSRC= ${WRKSRC}/loaders/python3
INSTALL_WRKSRC= ${WRKSRC}/loaders/python3
.endif
py34_PLIST= ${.CURDIR}/pkg-plist-py3
py35_PLIST= ${.CURDIR}/pkg-plist-py3
py36_PLIST= ${.CURDIR}/pkg-plist-py3
This port does not use `USE_PYTHON=distutils` but needs Python flavors anyway. To guard against `FLAVOR` being empty, which would cause a man:make[1] error, use `${FLAVOR:U}` in string comparisons instead of `${FLAVOR}`. The Gnome Python gobject3 bindings have two different names, one for Python 2, pygobject3 and one for Python 3, py3gobject3. The `configure` script has to run in [.filename]#${WRKSRC}#, but we are only interested in building and installing the Python 2 or Python 3 parts of the software, so set the build and install base directories appropriately. Hint about the correct Python 3 config script path name. The packing list is different when the built with Python 3. As there are three possible Python 3 versions, set `PLIST` for all three using the <<flavors-using-helpers,helper>>.
Flavors Helpers
To make the [.filename]#Makefile# easier to write, a few flavors helpers exist.
This list of helpers will set their variable:
`_flavor__PKGNAMEPREFIX`
`_flavor__PKGNAMESUFFIX`
`_flavor__PLIST`
`_flavor__DESCR`
This list of helpers will append to their variable:
`_flavor__CONFLICTS`
`_flavor__CONFLICTS_BUILD`
`_flavor__CONFLICTS_INSTALL`
`_flavor__PKG_DEPENDS`
`_flavor__EXTRACT_DEPENDS`