From owner-svn-ports-head@FreeBSD.ORG Mon Sep 30 17:56:29 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A345B7B0; Mon, 30 Sep 2013 17:56:29 +0000 (UTC) (envelope-from mva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7600828B7; Mon, 30 Sep 2013 17:56:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8UHuTRP025304; Mon, 30 Sep 2013 17:56:29 GMT (envelope-from mva@svn.freebsd.org) Received: (from mva@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8UHuTBi025303; Mon, 30 Sep 2013 17:56:29 GMT (envelope-from mva@svn.freebsd.org) Message-Id: <201309301756.r8UHuTBi025303@svn.freebsd.org> From: Marcus von Appen Date: Mon, 30 Sep 2013 17:56:29 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r328833 - head/Mk X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Sep 2013 17:56:29 -0000 Author: mva Date: Mon Sep 30 17:56:28 2013 New Revision: 328833 URL: http://svnweb.freebsd.org/changeset/ports/328833 Log: Enable python meta-ports to be used as direct dependencies via USE_PYTHON=2 (for lang/python2) or USE_PYTHON=3 (for lang/python3). This can be used for ports, which do not care, which specific minor release version of Python 2.x or Python 3.x is used, as long as there are proper symlinks to e.g. bin/python2 or bin/python3. Modified: head/Mk/bsd.python.mk Modified: head/Mk/bsd.python.mk ============================================================================== --- head/Mk/bsd.python.mk Mon Sep 30 16:47:56 2013 (r328832) +++ head/Mk/bsd.python.mk Mon Sep 30 17:56:28 2013 (r328833) @@ -14,8 +14,9 @@ Python_Include_MAINTAINER= python@FreeBS # language. It's automatically included when USE_PYTHON is defined in # the ports' makefile. If your port requires only some set of Python # versions, you can define USE_PYTHON as [min]-[max] or min+ or -max -# or as an explicit version (eg. 3.1-3.2 for [min]-[max], -# 2.7+ or -3.2 for min+ and -max or 2.6 for an explicit version). +# or as an explicit version or as a meta port version (eg. 3.1-3.2 +# for [min]-[max], 2.7+ or -3.2 for min+ and -max, 2.6 for an +# explicit version or 3 for a meta port version). # # The variables: # @@ -270,6 +271,14 @@ USE_PYTHON_BUILD= yes USE_PYTHON_RUN= yes .endif # !defined(USE_PYTHON) +.if ${USE_PYTHON} == "2" +USE_PYTHON= ${PYTHON2_DEFAULT_VERSION:S/^python//} +_WANTS_META_PORT= 2 +.elif ${USE_PYTHON} == "3" +USE_PYTHON= ${PYTHON3_DEFAULT_VERSION:S/^python//} +_WANTS_META_PORT= 3 +.endif # ${USE_PYTHON} == "2" + # Validate Python version whether it meets USE_PYTHON version restriction. _PYTHON_VERSION_CHECK:= ${USE_PYTHON:C/^([1-9]\.[0-9])$/\1-\1/} _PYTHON_VERSION_MINIMUM_TMP:= ${_PYTHON_VERSION_CHECK:C/([1-9]\.[0-9])[-+].*/\1/} @@ -561,11 +570,17 @@ PYTHON_NO_DEPENDS?= NO .if ${PYTHON_NO_DEPENDS} == "NO" .if defined(USE_PYTHON_BUILD) BUILD_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} \ - python:${PORTSDIR}/lang/python + python:${PORTSDIR}/lang/python +.if defined(_WANTS_META_PORT) +BUILD_DEPENDS+= python${_WANTS_META_PORT}:${PORTSDIR}/lang/python${_WANTS_META_PORT} +.endif .endif .if defined(USE_PYTHON_RUN) RUN_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} \ - python:${PORTSDIR}/lang/python + python:${PORTSDIR}/lang/python +.if defined(_WANTS_META_PORT) +RUN_DEPENDS+= python${_WANTS_META_PORT}:${PORTSDIR}/lang/python${_WANTS_META_PORT} +.endif .endif .endif # ${PYTHON_NO_DEPENDS} == "NO"