From owner-svn-ports-all@freebsd.org Thu Jan 25 12:36:55 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DD8CED54DB; Thu, 25 Jan 2018 12:36:55 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D35C679FFE; Thu, 25 Jan 2018 12:36:54 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4F184EEE; Thu, 25 Jan 2018 12:36:54 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0PCasdr026362; Thu, 25 Jan 2018 12:36:54 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0PCaskq026361; Thu, 25 Jan 2018 12:36:54 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201801251236.w0PCaskq026361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Thu, 25 Jan 2018 12:36:54 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r459923 - head/Mk/Uses X-SVN-Group: ports-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: head/Mk/Uses X-SVN-Commit-Revision: 459923 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2018 12:36:55 -0000 Author: mat Date: Thu Jan 25 12:36:54 2018 New Revision: 459923 URL: https://svnweb.freebsd.org/changeset/ports/459923 Log: Add a USES=python:patch for when Python is needed during the patch phase. Sponsored by: Absolight Modified: head/Mk/Uses/python.mk Modified: head/Mk/Uses/python.mk ============================================================================== --- head/Mk/Uses/python.mk Thu Jan 25 11:42:11 2018 (r459922) +++ head/Mk/Uses/python.mk Thu Jan 25 12:36:54 2018 (r459923) @@ -6,7 +6,7 @@ # # Feature: python # Usage: USES=python or USES=python:args -# Valid ARGS: , build, run, test +# Valid ARGS: , patch, build, run, test # # version If your port requires only some set of Python versions, you # can set this to [min]-[max] or min+ or -max or as an @@ -22,6 +22,8 @@ # USES=python # Use the set default Python # # version # +# patch Indicates that Python is needed at patch time and adds +# it to PATCH_DEPENDS. # build Indicates that Python is needed at build time and adds # it to BUILD_DEPENDS. # run Indicates that Python is needed at run time and adds @@ -35,8 +37,10 @@ # PYTHON_NO_DEPENDS. # # If build, run and test are omitted, Python will be added as BUILD_DEPENDS, -# RUN_DEPENDS and TEST_DEPENDS. PYTHON_NO_DEPENDS can be set to not add any -# dependencies. +# RUN_DEPENDS and TEST_DEPENDS. +# patch is independant, it does not prevent the default build/run/test +# dependency. +# env or PYTHON_NO_DEPENDS can be set to not add any dependencies. # # Variables, which can be set by a user: # @@ -268,6 +272,10 @@ _PYTHON_FEATURE_FLAVORS= yes .undef _PYTHON_RUN_DEP .undef _PYTHON_TEST_DEP _PYTHON_ARGS= ${python_ARGS:S/,/ /g} +.if ${_PYTHON_ARGS:Mpatch} +_PYTHON_PATCH_DEP= yes +_PYTHON_ARGS:= ${_PYTHON_ARGS:Npatch} +.endif .if ${_PYTHON_ARGS:Mbuild} _PYTHON_BUILD_DEP= yes _PYTHON_ARGS:= ${_PYTHON_ARGS:Nbuild} @@ -660,24 +668,14 @@ PY_FUTURES= .endif # dependencies -.if defined(_PYTHON_BUILD_DEP) -BUILD_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} -.if defined(_WANTS_META_PORT) -BUILD_DEPENDS+= python${_WANTS_META_PORT}:${_PYTHON_RELPORTDIR}${_WANTS_META_PORT} -.endif -.endif -.if defined(_PYTHON_RUN_DEP) -RUN_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} -.if defined(_WANTS_META_PORT) -RUN_DEPENDS+= python${_WANTS_META_PORT}:${_PYTHON_RELPORTDIR}${_WANTS_META_PORT} -.endif -.endif -.if defined(_PYTHON_TEST_DEP) -TEST_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} -.if defined(_WANTS_META_PORT) -TEST_DEPENDS+= python${_WANTS_META_PORT}:${_PYTHON_RELPORTDIR}${_WANTS_META_PORT} -.endif -.endif +.for _stage in PATCH BUILD RUN TEST +. if defined(_PYTHON_${_stage}_DEP) +${_stage}_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} +. if defined(_WANTS_META_PORT) +${_stage}_DEPENDS+= python${_WANTS_META_PORT}:${_PYTHON_RELPORTDIR}${_WANTS_META_PORT} +. endif +. endif +.endfor # set $PREFIX as Python's one .if defined(_PYTHON_FEATURE_PYTHONPREFIX)