From owner-svn-ports-branches@freebsd.org Tue Sep 29 03:32:28 2015 Return-Path: Delivered-To: svn-ports-branches@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 120E5A0B0A0; Tue, 29 Sep 2015 03:32:28 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from repo.freebsd.org (repo.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 D9D8A1786; Tue, 29 Sep 2015 03:32:27 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8T3WRRg044811; Tue, 29 Sep 2015 03:32:27 GMT (envelope-from koobs@FreeBSD.org) Received: (from koobs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8T3WRfT044810; Tue, 29 Sep 2015 03:32:27 GMT (envelope-from koobs@FreeBSD.org) Message-Id: <201509290332.t8T3WRfT044810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: koobs set sender to koobs@FreeBSD.org using -f From: Kubilay Kocak Date: Tue, 29 Sep 2015 03:32:27 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r398153 - branches/2015Q3/Mk/Uses X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2015 03:32:28 -0000 Author: koobs Date: Tue Sep 29 03:32:27 2015 New Revision: 398153 URL: https://svnweb.freebsd.org/changeset/ports/398153 Log: MFH: r396885 Uses/python.mk: Fix PYTHON_REL for pre-release Python versions Modify the PYTHON_REL variable assignment in python.mk so that it can support PORTVERSION's that have non-integer suffixes such as the current lang/python35 version (PORTVERSION currently 3.5.0.r3). Currently, ports that use PYTHON_REL while DEFAULT_VERSIONS is set to 3.5, fail to build with the following make error: make: "/usr/ports/Mk/Uses/python.mk" line 503: warning: String comparison operator should be either == or != make: "/usr/ports/Mk/Uses/python.mk" line 503: Malformed conditional (${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST)) This is caused by a non-integer value ("r3") in PYTHON_REL. While I'm here, add a comment block to be clear on what we (currently) want to achieve. PR: 203093 Reported by: Andrew Berg (aberg010 my.hennepintech.edu) Reviewed by: antoine Differential Revision: https://reviews.freebsd.org/D3662 Approved by: portmgr (feld) Modified: branches/2015Q3/Mk/Uses/python.mk Directory Properties: branches/2015Q3/ (props changed) Modified: branches/2015Q3/Mk/Uses/python.mk ============================================================================== --- branches/2015Q3/Mk/Uses/python.mk Tue Sep 29 03:30:53 2015 (r398152) +++ branches/2015Q3/Mk/Uses/python.mk Tue Sep 29 03:32:27 2015 (r398153) @@ -383,7 +383,11 @@ PYTHON_REL= # empty PYTHON_ABIVER= # empty PYTHON_PORTSDIR= ${_PYTHON_RELPORTDIR}${PYTHON_SUFFIX} PYTHON_PORTVERSION!= ${MAKE} -V PORTVERSION -C ${PYTHON_PORTSDIR} -PYTHON_REL= ${PYTHON_PORTVERSION:C/\.([0-9]+)$/.0\1/:C/\.0?([0-9][0-9])$/.\1/:S/.//g} +# Create a 4 integer version string, prefixing 0 to the last token if +# it's a single character. Only use the the first 3 tokens of +# PORTVERSION to support pre-release versions (rc3, alpha4, etc) of +# any Python port (lang/pythonXY) +PYTHON_REL= ${PYTHON_PORTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/:C/\.([0-9]+)$/.0\1/:C/\.0?([0-9][0-9])$/.\1/:S/.//g} # Might be overridden by calling ports PYTHON_CMD?= ${_PYTHON_BASECMD}${_PYTHON_VERSION}