ports/175276: [patch] devel/py-gobject OPTIONSFILE eval order problem

John W. O'Brien john at saltant.com
Sun Mar 17 03:35:27 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When applied together, the two attached patches implement a very rough
example of the "B" option I described in my 2013-02-23 response to
ports/175276.

I have smoke tested this patch by building and installing from scratch
some representative ports that might be affected by it. For example:
math/py-pandas and many of its dependencies don't use OptionsNG;
devel/py-bison and devel/py-gobject use OptionsNG and are currently
broken as described in this PR; while graphics/py-blockdiag and
devel/py-mock use OptionsNG but implement one of the workarounds.

# pkg_delete -x py27- python27
# portmaster -Dg \
  math/py-pandas \
  devel/py-bison \
  devel/py-gobject \
  graphics/py-blockdiag \
  devel/py-mock

Everything builds, installs, and packages without apparent error.

This shows that approach "B" is viable, though these patches would
need work to improve the quality to a sufficient level. I suspect that
approach "B" will not gain much traction, though, given that the
maintainers of so many of the affected ports (74%) have elected to use
the following workaround, or a variation of it, omitting ${PYTHON_SUFFIX}.

OPTIONSFILE=      ${PORT_DBDIR}/py-${PORTNAME}/options

Nevertheless, I welcome slings, arrows, and outrageous suggestions.

PS: gnome@, please decide: commit the original patch to fix
devel/py-gobject via OPTIONSFILE, close this PR, and I will file a new
PR for the larger scope issue; or consider assigning this to python@
for resolution and closure.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJRRTfvAAoJEBRzAKlhyP/FYCsIAIkzfSnuvHAOfxdwCxjgimOq
vYgsTPE65UNjjsXIWOUMC9Tpg684lFfxwJ4brxvmtpKWnSCKHwSEHOD9cXPaNAwj
yufLuGMB4FYZLahJpxqKek+g1cI6g01E3OXvM2c0VT9rfiJplrE58DlBHSkNwqH/
X0lg8e/U5Ikrma7HtoZxy94SM+CgRhUU5leQzP2jjI8GUP2XWuBhAzbdLYCd7obE
mU4Y1M8hk4jZfxWwWD5TK1GLE9Zu2gweLfnbEEML9fPGNPp5sY0wF8Jx/cBjXzPC
RyjvzgirOdNykaVdqg/hWU/j7MjBHDc8wANfsUzn89hZSssU4PNJf/HMRgfiUCU=
=3B7a
-----END PGP SIGNATURE-----
-------------- next part --------------
Index: Mk/bsd.port.mk
===================================================================
--- Mk/bsd.port.mk	(revision 314388)
+++ Mk/bsd.port.mk	(working copy)
@@ -1308,6 +1308,11 @@
 STRIP=	#none
 .endif
 
+# Latest possible point to correctly influence location of OPTIONSFILE
+INEARLYMK=
+.include "${PORTSDIR}/Mk/bsd.python.mk"
+.undef INEARLYMK
+
 .include "${PORTSDIR}/Mk/bsd.options.mk"
 
 # Start of pre-makefile section.
-------------- next part --------------
Index: Mk/bsd.python.mk
===================================================================
--- Mk/bsd.python.mk	(revision 314388)
+++ Mk/bsd.python.mk	(working copy)
@@ -4,10 +4,9 @@
 # $FreeBSD$
 #
 
-.if !defined(_POSTMKINCLUDED) && !defined(Python_Pre_Include)
+.if defined(INEARLYMK) && !defined(Python_Early_Include)
 
-Python_Pre_Include=		bsd.python.mk
-Python_Include_MAINTAINER=	python at FreeBSD.org
+Python_Early_Include=
 
 # This file contains some variable definitions that are supposed to
 # make your life easier when dealing with ports related to the Python
@@ -458,6 +457,14 @@
 PYTHONPREFIX_LIBDIR=		${PYTHON_LIBDIR:S;${PYTHONBASE};${PREFIX};}
 PYTHONPREFIX_SITELIBDIR=	${PYTHON_SITELIBDIR:S;${PYTHONBASE};${PREFIX};}
 
+.endif # Python_Early_Include
+
+
+.if !defined(_POSTMKINCLUDED) && !defined(Python_Pre_Include) && !defined(INEARLYMK)
+
+Python_Pre_Include=		bsd.python.mk
+Python_Include_MAINTAINER=	python at FreeBSD.org
+
 # setuptools support
 .if defined(USE_PYDISTUTILS) && ${USE_PYDISTUTILS} == "easy_install"
 BUILD_DEPENDS+=		${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-distribute
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-usr__ports__Mk__bsd.port.mk.txt.sig
Type: application/octet-stream
Size: 287 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-python/attachments/20130316/ffe22894/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-usr__ports__Mk__bsd.python.mk.txt.sig
Type: application/octet-stream
Size: 287 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-python/attachments/20130316/ffe22894/attachment-0001.obj>


More information about the freebsd-python mailing list