Date: Thu, 18 Apr 2019 13:16:45 +0000 (UTC) From: Tobias Kortkamp <tobik@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r499257 - head/Mk/Uses Message-ID: <201904181316.x3IDGjW2025159@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tobik Date: Thu Apr 18 13:16:44 2019 New Revision: 499257 URL: https://svnweb.freebsd.org/changeset/ports/499257 Log: Mk/Uses/python.mk: Flag unknown USES=python args and unknown USE_PYTHON features PR: 235901 Approved by: mat Differential Revision: https://reviews.freebsd.org/D19569 Modified: head/Mk/Uses/python.mk Modified: head/Mk/Uses/python.mk ============================================================================== --- head/Mk/Uses/python.mk Thu Apr 18 13:07:26 2019 (r499256) +++ head/Mk/Uses/python.mk Thu Apr 18 13:16:44 2019 (r499257) @@ -246,6 +246,20 @@ _PYTHON_PORTBRANCH= 2.7 # ${_PYTHON_VERSIONS:[1]} _PYTHON_BASECMD= ${LOCALBASE}/bin/python _PYTHON_RELPORTDIR= lang/python +# List all valid USE_PYTHON features here +_VALID_PYTHON_FEATURES= allflavors autoplist concurrent cython cython_run \ + distutils flavors noegginfo noflavors optsuffix \ + py3kplist pythonprefix +_INVALID_PYTHON_FEATURES= +.for var in ${USE_PYTHON} +. if empty(_VALID_PYTHON_FEATURES:M${var}) +_INVALID_PYTHON_FEATURES+= ${var} +. endif +.endfor +.if !empty(_INVALID_PYTHON_FEATURES) +IGNORE= uses unknown USE_PYTHON features: ${_INVALID_PYTHON_FEATURES} +.endif + # Make each individual feature available as _PYTHON_FEATURE_<FEATURENAME> .for var in ${USE_PYTHON} _PYTHON_FEATURE_${var:C/=.*$//:tu}= ${var:C/.*=//:S/,/ /g} @@ -334,6 +348,13 @@ _PYTHON_VERSION_MINIMUM_TMP:= ${_PYTHON_VERSION_CHECK: _PYTHON_VERSION_MINIMUM:= ${_PYTHON_VERSION_MINIMUM_TMP:M[1-9].[0-9]} _PYTHON_VERSION_MAXIMUM_TMP:= ${_PYTHON_VERSION_CHECK:C/.*-([1-9]\.[0-9])/\1/} _PYTHON_VERSION_MAXIMUM:= ${_PYTHON_VERSION_MAXIMUM_TMP:M[1-9].[0-9]} + +# At this point we should have no argument left in ${_PYTHON_ARGS} +# except a version spec +_PYTHON_ARGS:= ${_PYTHON_ARGS:N[1-9].[0-9]-[1-9].[0-9]:N[1-9].[0-9]:N[1-9].[0-9]+:N-[1-9].[0-9]} +.if !empty(_PYTHON_ARGS) +IGNORE= uses unknown USES=python arguments: ${_PYTHON_ARGS} +.endif .undef _PYTHON_VERSION_NONSUPPORTED .if !empty(_PYTHON_VERSION_MINIMUM) && (${_PYTHON_VERSION} < ${_PYTHON_VERSION_MINIMUM})
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904181316.x3IDGjW2025159>