From owner-svn-ports-all@FreeBSD.ORG Sat Jun 7 16:13:12 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04DF8B01; Sat, 7 Jun 2014 16:13:12 +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 D957F2AF9; Sat, 7 Jun 2014 16:13:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s57GDBlN094019; Sat, 7 Jun 2014 16:13:11 GMT (envelope-from mva@svn.freebsd.org) Received: (from mva@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s57GDBRa094017; Sat, 7 Jun 2014 16:13:11 GMT (envelope-from mva@svn.freebsd.org) Message-Id: <201406071613.s57GDBRa094017@svn.freebsd.org> From: Marcus von Appen Date: Sat, 7 Jun 2014 16:13:11 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r356921 - in 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-all@freebsd.org X-Mailman-Version: 2.1.18 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: Sat, 07 Jun 2014 16:13:12 -0000 Author: mva Date: Sat Jun 7 16:13:11 2014 New Revision: 356921 URL: http://svnweb.freebsd.org/changeset/ports/356921 QAT: https://qat.redports.org/buildarchive/r356921/ Log: Introduce a new PYTHON_CONCURRENT_INSTALL knob to support the parallel installation of ports for different python versions. If set to yes, the knob indicates that the port can be installed for different python versions at the same time. The port will use a unique prefix for certain directories using USES=uniquefiles:dirs (see the uniquefiles.mk Uses for details about the directories). Binaries receive an additional suffix, based on ${PYTHON_VER}. With hat: python@ Modified: head/CHANGES head/Mk/bsd.python.mk Modified: head/CHANGES ============================================================================== --- head/CHANGES Sat Jun 7 16:06:11 2014 (r356920) +++ head/CHANGES Sat Jun 7 16:13:11 2014 (r356921) @@ -10,6 +10,33 @@ in the release notes and/or placed into All ports committers are allowed to commit to this file. +20140607: +AUTHOR: mva@FreeBSD.org + + New PYTHON_CONCURRENT_INSTALL knob to support the parallel installation + of ports for different python versions. + + If set to yes, the knob indicates that the port can be installed for + different python versions at the same time. The port will use a unique + prefix for certain directories using USES=uniquefiles:dirs (see the + uniquefiles.mk Uses for details about the directories). Binaries + receive an additional suffix, based on ${PYTHON_VER}. + + The values for the uniquefiles USES are set as follows: + + UNIQUE_PREFIX= ${PYTHON_PKGNAMEPREFIX} + UNIQUE_SUFFIX= -${PYTHON_VER} + + If the port is installed for the current default python version, scripts and + binaries in + + ${PREFIX}/bin + ${PREFIX}/sbin + ${PREFIX}/libexec + + are linked from the prefixed version to the prefix-less original name, + e.g. bin/foo-2.7 --> bin/foo. + 20140529: AUTHOR: miwi@FreeBSD.org Modified: head/Mk/bsd.python.mk ============================================================================== --- head/Mk/bsd.python.mk Sat Jun 7 16:06:11 2014 (r356920) +++ head/Mk/bsd.python.mk Sat Jun 7 16:13:11 2014 (r356921) @@ -122,6 +122,29 @@ Python_Include_MAINTAINER= python@FreeBS # PYXML - Dependency line for the XML extension. As of Python-2.0, # this extension is in the base distribution. # +# PYTHON_CONCURRENT_INSTALL +# - Indicates that the port can be installed for different +# python versions at the same time. The port is supposed +# to use a unique prefix for certain directories using +# USES=uniquefiles:dirs (see the uniquefiles.mk Uses for +# details about the directories), if set to yes. Binaries +# receive an additional suffix, based on PYTHON_VER. +# +# The values for the uniquefiles USES are set as follows: +# +# UNIQUE_PREFIX= ${PYTHON_PKGNAMEPREFIX} +# UNIQUE_SUFFIX= -${PYTHON_VER} +# +# If the port is installed for the current default +# python version, scripts and binaries in +# +# ${PREFIX}/bin +# ${PREFIX}/sbin +# ${PREFIX}/libexec +# +# are linked from the prefixed version to the prefix-less +# original name, e.g. bin/foo-2.7 --> bin/foo. +# # USE_PYTHON_PREFIX - Says that the port installs in ${PYTHONBASE}. # # USE_PYDISTUTILS - Use distutils as do-configure, do-build and do-install @@ -414,6 +437,46 @@ PYTHONPREFIX_INCLUDEDIR= ${PYTHON_INCLUD PYTHONPREFIX_LIBDIR= ${PYTHON_LIBDIR:S;${PYTHONBASE};${PREFIX};} PYTHONPREFIX_SITELIBDIR= ${PYTHON_SITELIBDIR:S;${PYTHONBASE};${PREFIX};} +# Used for recording the installed files. +_PYTHONPKGLIST= ${WRKDIR}/.PLIST.pymodtmp + +# Ports bound to a certain python version SHOULD +# - use the PYTHON_PKGNAMEPREFIX +# - use directories using the PYTHON_PKGNAMEPREFIX +# - install binaries using the required PYTHON_VER, with +# the default python version creating a symlink to the original binary +# name (for staging-aware ports). +# +# What makes a port 'bound' to a certain python version? +# - it installs data into PYTHON_SITELIBDIR, PYTHON_INCLUDEDIR, ... +# - it links against libpython*.so +# - it uses USE_PYDISTUTILS +# +PYTHON_CONCURRENT_INSTALL?= no +.if defined(NO_STAGE) && ${PYTHON_CONCURRENT_INSTALL} == "yes" +BROKEN= PYTHON_CONCURRENT_INSTALL uses USES=uniquefiles, which is not stage-safe +.endif + +.if ${PYTHON_CONCURRENT_INSTALL} == "yes" +_USES_POST+= uniquefiles:dirs +.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} +UNIQUE_DEFAULT_LINKS= yes +.else +UNIQUE_DEFAULT_LINKS= no +.endif +UNIQUE_PREFIX= ${PYTHON_PKGNAMEPREFIX} +UNIQUE_SUFFIX= -${PYTHON_VER} + +.if defined(PYDISTUTILS_AUTOPLIST) +UNIQUE_FIND_SUFFIX_FILES= \ + ${SED} -e 's|^${PREFIX}/||' ${_PYTHONPKGLIST} ${TMPPLIST} | \ + ${GREP} -e '^bin/.*$$\|^sbin/.*$$\|^libexec/.*$$' +.else +UNIQUE_FIND_SUFFIX_FILES= \ + ${GREP} -he '^bin/.*$$\|^sbin/.*$$\|^libexec/.*$$' ${TMPPLIST} 2>/dev/null +.endif +.endif # ${PYTHON_CONCURRENT_INSTALL} == "yes" + _CURRENTPORT:= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} .if defined(USE_PYDISTUTILS) && ${_CURRENTPORT:S/${PYTHON_SUFFIX}$//} != ${PYTHON_PKGNAMEPREFIX}setuptools BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools${PYTHON_SUFFIX}>0:${PORTSDIR}/devel/py-setuptools${PYTHON_SUFFIX} @@ -497,7 +560,6 @@ PYDISTUTILS_INSTALLARGS+= --single-versi PYDISTUTILS_INSTALLARGS+= --root=${STAGEDIR} . endif .endif -_PYTHONPKGLIST= ${WRKDIR}/.PLIST.pymodtmp PYDISTUTILS_INSTALLARGS:= --record ${_PYTHONPKGLIST} \ ${PYDISTUTILS_INSTALLARGS}