Joshua Root wrote:
It errors out in pre-configure, by which time boost would already be
installed without the earlier depends_lib-delete. You can't error out
outside a phase because then you would get the error on targets like
'port info'.
- Josh
Right, I went through all of that already. In fact, you can't error out
in a variant either as they are processed
any time the port is parsed as in lint, info, etc.
So the key is to only delete the dependency in a first check and then
error out in a phase based check later. This
prevents attempting to build boost as a dependency unless the python
support is present but if it is the dependency
remains and everything proceeds as it should.
Here's the patch that I propose to commit which tests out in the three cases
* no boost installed/active (error)
* boost installed active but no python support (error)
* boost installed active with python support (no error)
Thanks for your suggestions
Dave
Index: Portfile
===================================================================
--- Portfile (revision 52860)
+++ Portfile (working copy)
@@ -25,7 +25,8 @@
port:py25-setuptools
depends_lib-append \
- port:dbus-python25 \
+ port:boost \
+ port:dbus-python25 \
port:gettext \
port:librsvg \
port:py25-chardet \
@@ -33,6 +34,10 @@
port:py25-setuptools \
port:py25-xdg
+if { ![file exists ${prefix}/lib/libboost_python-mt.dylib] } {
+ depends_lib-delete port:boost
+}
+
#patchfiles patch-setup.py.diff
configure.cflags-append -I${prefix}/include/boost
@@ -43,7 +48,7 @@
CFLAGS="-I${prefix}/include -I${prefix}/include/boost" \
CC=${configure.cc} CXX=${configure.cxx} CPP=${configure.cpp}
-pre-configure {
+pre-fetch {
if { ![file exists ${prefix}/lib/libboost_python-mt.dylib] } {
if { [file exists ${prefix}/lib/libboost_system-mt.dylib] } {
ui_error "
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev