Bug 196340

Summary: Mk/Uses/python.mk: PYTHON_VERSION variable in DEPENDS_ARGS conflicts with and breaks autoconf-based ports
Product: Ports & Packages Reporter: Antoine Brodin <antoine>
Component: Ports FrameworkAssignee: freebsd-python (Nobody) <python>
Status: Closed FIXED    
Severity: Affects Many People CC: koobs, mva, portmgr
Priority: Normal Keywords: needs-patch, needs-qa
Version: Latest   
Hardware: Any   
OS: Any   

Description Antoine Brodin freebsd_committer freebsd_triage 2014-12-28 22:21:35 UTC
In Mk/Uses/python.mk we have:

DEPENDS_ARGS+=          PYTHON_VERSION=${PYTHON_VERSION}
where PYTHON_VERSION is python2.7 or python3.x

But autoconf based ports use PYTHON_VERSION with a different meaning:

  [ax_prog_python_version=`${PYTHON} -c "import sys; sys.stdout.write(sys.version[[:3]])" 2>/dev/null`;
  AC_SUBST(
   [PYTHON_VERSION],
   [$ax_prog_python_version])

so there, PYTHON_VERSION is 2.7 or 3.x

This commit workarounded for devel/py*-gobject3 but other ports are likely affected:

https://svnweb.freebsd.org/changeset/ports/374402
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2014-12-29 02:06:05 UTC
antoine, 

Any considerations and/or suggestions for a renamed variable?
Is this a good time to also introduce a prefixed variable namespace?
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2015-01-02 16:49:18 UTC
(In reply to Kubilay Kocak from comment #1)
> Any considerations and/or suggestions for a renamed variable?

FLAVOR ?  bapt@ is working on something but no ETA as it breaks portupgrade / portmaster
Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2020-01-25 07:25:18 UTC
Fixed in ports r522485