Commit f49ca5b9 authored by Torsten Zuehlsdorff's avatar Torsten Zuehlsdorff

Update to r455275

parent 12214552

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -10,6 +10,90 @@ in the release notes and/or placed into UPDATING.
All ports committers are allowed to commit to this file.
20171130:
AUTHOR: mat@FreeBSD.org
Ports using USE_PYTHON=distutils are now flavored. They will automatically
get flavors (py27, py34, py35, py36) depending on what versions they support.
There is also a USE_PYTHON=flavors for ports that do not use distutils but
need FLAVORS to be set. A USE_PYTHON=noflavors can be set if the port is
using distutils but flavors are not wanted.
A new USE_PYTHON=optsuffix that will adds PYTHON_PKGNAMESUFFIX has been added
to cope with Python ports that did not have the Python PKGNAMEPREFIX but are
flavored.
USES=python now also exports a PY_FLAVOR variable that contains the current
python flavor. It can be used in dependency lines when the port itself is
not python flavored, for example, deskutils/calibre.
By default it will only generate flavors for the versions in PYTHON2_DEFAULT
and PYTHON3_DEFAULT. Define BUILD_ALL_PYTHON_FLAVORS in your make.conf to
generate all possible flavors. A port can set USE_PYTHON=allflavors to have
all the flavors and not simply the default ones.
In all the ports with Python dependencies, the *_DEPENDS entries MUST end
with the flavor so that the framework knows which to build/use. This is done
by appending '@${PY_FLAVOR}' after the origin (or @${FLAVOR} if in a Python
module with Python flavors, as the content will be the same). For example:
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}
20171130:
AUTHOR: mat@FreeBSD.org
To help with flavored ports, helpers are available. In these, replace <*>
with the flavor name.
*_PKGNAMEPREFIX *_PKGNAMESUFFIX *_PLIST *_DESCR will overwrite the variable.
*_CONFLICTS *_CONFLICTS_BUILD *_CONFLICTS_INSTALL *_PKG_DEPENDS
*_EXTRACT_DEPENDS *_PATCH_DEPENDS *_FETCH_DEPENDS *_BUILD_DEPENDS
*_LIB_DEPENDS *_RUN_DEPENDS *_TEST_DEPENDS will append to the variable.
For example:
flavor2_PKGNAMESUFFIX= -foo
can replace:
.if ${FLAVOR:U} == flavor2
PKGNAMESUFFIX= -foo
.endif
20171130:
AUTHOR: mat@FreeBSD.org
Flavors are a way to have multiple variations of a port. The port is built
multiple times, with the variations. To declare flavors, set the FLAVORS
variable to the flavors you want defined. The first flavor will be the
default:
FLAVORS= flavor1 flavor2
The flavors MUST be lowercase, and can contain [[:lower:][:digit:]_].
Then, when building the port, pass the FLAVOR as an argument after make to
select the flavor.
$ 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. Be sure to guard against an empty FLAVOR variable by using
${FLAVOR:U}:
.if ${FLAVOR:U} == flavor2
PKGNAMESUFFIX= -foo
OPTIONS_DEFAULT+= FOO
.endif
A tools guide is available at:
https://wiki.freebsd.org/Ports/FlavorsTools
A port migration guide is available at:
https://wiki.freebsd.org/Ports/FlavorsMigration
20171020:
AUTHOR: ak@FreeBSD.org
......@@ -3381,4 +3465,4 @@ POSSIBILITY OF SUCH DAMAGE.
Contact portmgr@FreeBSD.org if you have any questions about your use of
this document.
$FreeBSD: head/CHANGES 452546 2017-10-20 17:23:47Z ak $
$FreeBSD: head/CHANGES 455217 2017-11-30 18:03:35Z bdrewery $
This diff is collapsed.
#!/bin/sh
# MAINTAINER: portmgr@FreeBSD.org
# $FreeBSD: head/Mk/Scripts/qa.sh 451250 2017-10-04 21:01:09Z adridg $
# $FreeBSD: head/Mk/Scripts/qa.sh 455205 2017-11-30 15:33:29Z mat $
if [ -z "${STAGEDIR}" -o -z "${PREFIX}" -o -z "${LOCALBASE}" ]; then
echo "STAGEDIR, PREFIX, LOCALBASE required in environment." >&2
......@@ -841,9 +841,26 @@ gemdeps()
return $rc
}
flavors()
{
local rc pkgnames uniques
rc=0
if [ -n "${FLAVOR}" ]; then
pkgnames=$(make -C "${CURDIR}" flavors-package-names|sort)
uniques=$(echo "${pkgnames}"|uniq)
if [ "$pkgnames" != "${uniques}" ]; then
err "Package names are not uniques with flavors:"
make -C "${CURDIR}" pretty-flavors-package-names >&2
err "maybe use <flavor>_PKGNAMEPREFIX/SUFFIX".
rc=1
fi
fi
return ${rc}
}
checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo"
checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo"
checks="$checks proxydeps sonames perlcore no_arch gemdeps"
checks="$checks proxydeps sonames perlcore no_arch gemdeps flavors"
ret=0
cd ${STAGEDIR}
......
# $FreeBSD: head/Mk/Uses/cargo.mk 452147 2017-10-15 14:05:04Z madpilot $
# $FreeBSD: head/Mk/Uses/cargo.mk 455101 2017-11-29 11:06:11Z tobik $
#
# This file contains logic to ease porting of Rust packages or
# binaries using the `cargo` command.
......@@ -72,6 +72,13 @@ CARGO_ENV+= \
RUSTDOC=${LOCALBASE}/bin/rustdoc \
RUSTFLAGS="${RUSTFLAGS}"
# Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk
.if ${ARCH} == amd64 || ${ARCH} == i386
RUSTFLAGS+= ${CFLAGS:M-march=*:S/-march=/-C target-cpu=/}
.else
RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/}
.endif
# Helper to shorten cargo calls.
CARGO_CARGO_RUN= \
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} \
......
#-*- tab-width: 4; -*-
# ex:ts=4
#
# $FreeBSD: head/Mk/Uses/gnome.mk 451901 2017-10-12 15:57:51Z mat $
# $FreeBSD: head/Mk/Uses/gnome.mk 455210 2017-11-30 15:50:30Z mat $
# $NetBSD: $
#
# Please view me with 4 column tabs!
......@@ -388,14 +388,15 @@ pygobject_BUILD_DEPENDS= pygobject-codegen-2.0:devel/py-gobject
pygobject_RUN_DEPENDS= pygobject-codegen-2.0:devel/py-gobject
pygobject_USE_GNOME_IMPL= glib20
# Have to keep two components because the _DETECT file is not the same.
py3gobject3_DETECT= ${LOCALBASE}/share/py3gobject3/.keep
py3gobject3_BUILD_DEPENDS= py3?-gobject3>=0:devel/py3-gobject3
py3gobject3_RUN_DEPENDS= py3?-gobject3>=0:devel/py3-gobject3
py3gobject3_BUILD_DEPENDS= py3?-gobject3>=0:devel/py-gobject3@${PY_FLAVOR}
py3gobject3_RUN_DEPENDS= py3?-gobject3>=0:devel/py-gobject3@${PY_FLAVOR}
py3gobject3_USE_GNOME_IMPL= glib20
pygobject3_DETECT= ${LOCALBASE}/share/pygobject3/.keep
pygobject3_BUILD_DEPENDS= py2?-gobject3>=0:devel/py-gobject3
pygobject3_RUN_DEPENDS= py2?-gobject3>=0:devel/py-gobject3
pygobject3_BUILD_DEPENDS= py2?-gobject3>=0:devel/py-gobject3@${PY_FLAVOR}
pygobject3_RUN_DEPENDS= py2?-gobject3>=0:devel/py-gobject3@${PY_FLAVOR}
pygobject3_USE_GNOME_IMPL= glib20
pygtk2_DETECT= ${LOCALBASE}/libdata/pkgconfig/pygtk-2.0.pc
......
# $FreeBSD: head/Mk/Uses/pyqt.mk 453263 2017-11-01 07:32:34Z antoine $
# $FreeBSD: head/Mk/Uses/pyqt.mk 455210 2017-11-30 15:50:30Z mat $
#
# Handle PyQt related ports
#
......@@ -241,8 +241,8 @@ do-configure:
_USE_PYQT_ALL+= ${_USE_PYQT${_PYQT_VERSION}_ONLY}
.for comp in ${_USE_PYQT_ALL:O:u}
_USE_PYQT_ALL_SUFFIXED+= py-${comp} py-${comp}_build py-${comp}_run
py-${comp}_BUILD_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT}
py-${comp}_RUN_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT}
py-${comp}_BUILD_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT}@${PY_FLAVOR}
py-${comp}_RUN_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT}@${PY_FLAVOR}
py-${comp}_build_BUILD_DEPENDS?= ${py-${comp}_BUILD_DEPENDS}
py-${comp}_run_RUN_DEPENDS?= ${py-${comp}_RUN_DEPENDS}
.endfor
......
# $FreeBSD: head/Mk/Uses/python.mk 449198 2017-09-03 10:36:15Z rene $
# $FreeBSD: head/Mk/Uses/python.mk 455210 2017-11-30 15:50:30Z mat $
#
# Provide support for Python related ports. This includes detecting Python
# interpreters, ports providing package and modules for python as well as
......@@ -71,8 +71,24 @@
# prefix-less original name, e.g.
# bin/foo-2.7 --> bin/foo.
#
# cython - Depend on lang/cython at build-time.
#
# cython_run - Depend on lang/cython at run-time.
#
# flavors - Force creation of flavors for Python 2 and 3 default
# versions, where applicable.
#
# noflavors - Disable automatic creation of flavors if they would
# otherwise be created and they are not wanted.
#
# allflavors - Generate flavors for all possible versions and not
# simply the default ones.
#
# optsuffix - Set PKGNAMESUFFIX to PYTHON_PKGNAMESUFFIX if not the
# default python version.
#
# distutils - Use distutils as do-configure, do-build and
# do-install targets.
# do-install targets. implies flavors.
#
# autoplist - Automatically generates the packaging list for a
# port that uses distutils when defined.
......@@ -235,9 +251,19 @@ _PYTHON_RELPORTDIR= lang/python
# Make each individual feature available as _PYTHON_FEATURE_<FEATURENAME>
.for var in ${USE_PYTHON}
_PYTHON_FEATURE_${var:tu}= yes
_PYTHON_FEATURE_${var:C/=.*$//:tu}= ${var:C/.*=//:S/,/ /g}
.endfor
# distutils automatically generates flavors depending on the supported
# versions.
.if defined(_PYTHON_FEATURE_DISTUTILS)
_PYTHON_FEATURE_FLAVORS= yes
.endif
.if defined(_PYTHON_FEATURE_NOFLAVORS)
.undef _PYTHON_FEATURE_FLAVORS
.endif
# Make sure that no dependency or some other environment variable
# pollutes the build/run dependency detection
.undef _PYTHON_BUILD_DEP
......@@ -307,6 +333,7 @@ PYTHON3_DEFAULT_VERSION?= python${PYTHON3_DEFAULT}
PYTHON3_DEFAULT_VERSION?= python${PYTHON3_DEFAULT}
.endif
# Keep this before the FLAVOR selection to get the meta port dependency.
.if ${_PYTHON_ARGS} == "2"
_PYTHON_ARGS= ${PYTHON2_DEFAULT_VERSION:S/^python//}
_WANTS_META_PORT= 2
......@@ -372,6 +399,60 @@ IGNORE= needs an unsupported version of Python
.endif
.endif # defined(_PYTHON_VERSION_NONSUPPORTED)
# Automatically generates FLAVORS if empty
.if empty(FLAVORS) && defined(_PYTHON_FEATURE_FLAVORS)
. undef _VALID_PYTHON_VERSIONS
. for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS}
__VER= ${ver}