From owner-svn-ports-head@FreeBSD.ORG Mon Oct 27 18:58:22 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D56187E6; Mon, 27 Oct 2014 18:58:22 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7C98204; Mon, 27 Oct 2014 18:58:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9RIwMAS027488; Mon, 27 Oct 2014 18:58:22 GMT (envelope-from mva@FreeBSD.org) Received: (from mva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9RIwMQS027487; Mon, 27 Oct 2014 18:58:22 GMT (envelope-from mva@FreeBSD.org) Message-Id: <201410271858.s9RIwMQS027487@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mva set sender to mva@FreeBSD.org using -f From: Marcus von Appen Date: Mon, 27 Oct 2014 18:58:22 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r371600 - head/Mk/Uses 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.18-1 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, 27 Oct 2014 18:58:22 -0000 Author: mva Date: Mon Oct 27 18:58:21 2014 New Revision: 371600 URL: https://svnweb.freebsd.org/changeset/ports/371600 QAT: https://qat.redports.org/buildarchive/r371600/ Log: - Second attempt to fix the python version usage on single port builds If a port requests a different python version from the one being the default or provided at the command line, certain directories as well as plist entries will use the wrong python version value (the one being the default or provided at the command line), instead of the value, the port requests. PR: 194605 exp-run by: antoine@ With hat: python@ Modified: head/Mk/Uses/python.mk Modified: head/Mk/Uses/python.mk ============================================================================== --- head/Mk/Uses/python.mk Mon Oct 27 18:34:37 2014 (r371599) +++ head/Mk/Uses/python.mk Mon Oct 27 18:58:21 2014 (r371600) @@ -448,6 +448,16 @@ IGNORE= needs an unsupported version of PYTHON_VERSION?= python${_PYTHON_VERSION} DEPENDS_ARGS+= PYTHON_VERSION=${PYTHON_VERSION} +# NOTE: +# +# PYTHON_VERSION will hold whatever is passed down the dependency chain. +# If a user runs `make PYTHON_VERSION=python3.3, PYTHON_VERSION will be +# set to 'python3.3'. A port however may require a different version, +# which is stored (above) in _PYTHON_VERSION. +# Every python bit below hence should use python${_PYTHON_VERSION}, since +# this is the value, the _port_ requires +# + # Got the correct python version, set some publicly accessible variables PYTHON_VER= ${_PYTHON_VERSION} PYTHON_SUFFIX= ${_PYTHON_VERSION:S/.//g} @@ -467,8 +477,8 @@ PYTHON_ABIVER!= ${PYTHON_CMD}-config -- PYTHONBASE!= (${PYTHON_CMD} -c 'import sys; print(sys.prefix)' \ 2> /dev/null || ${ECHO_CMD} ${LOCALBASE}) | ${TAIL} -1 -PYTHON_INCLUDEDIR= ${PYTHONBASE}/include/${PYTHON_VERSION}${PYTHON_ABIVER} -PYTHON_LIBDIR= ${PYTHONBASE}/lib/${PYTHON_VERSION} +PYTHON_INCLUDEDIR= ${PYTHONBASE}/include/python${_PYTHON_VERSION}${PYTHON_ABIVER} +PYTHON_LIBDIR= ${PYTHONBASE}/lib/python${_PYTHON_VERSION} PYTHON_PLATFORM= ${OPSYS:tl}${OSREL:C/\.[0-9.]*//} PYTHON_SITELIBDIR= ${PYTHON_LIBDIR}/site-packages PYTHON_PKGNAMEPREFIX= py${PYTHON_SUFFIX}- @@ -626,7 +636,7 @@ PLIST_SUB+= PYTHON_INCLUDEDIR=${PYTHONPR PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} \ PYTHON_PLATFORM=${PYTHON_PLATFORM} \ PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} \ - PYTHON_VERSION=${PYTHON_VERSION} \ + PYTHON_VERSION=python${_PYTHON_VERSION} \ PYTHON_VER=${PYTHON_VER} _USES_POST+= python