[75743] trunk/dports/graphics/vigra/Portfile
michaelld at macports.org
michaelld at macports.org
Sun Feb 6 11:23:19 PST 2011
Revision: 75743
http://trac.macports.org/changeset/75743
Author: michaelld at macports.org
Date: 2011-02-06 11:23:17 -0800 (Sun, 06 Feb 2011)
Log Message:
-----------
vigra: Change Python hackery to, rightly or not, assume Python 2.6.
Modified Paths:
--------------
trunk/dports/graphics/vigra/Portfile
Modified: trunk/dports/graphics/vigra/Portfile
===================================================================
--- trunk/dports/graphics/vigra/Portfile 2011-02-06 16:39:49 UTC (rev 75742)
+++ trunk/dports/graphics/vigra/Portfile 2011-02-06 19:23:17 UTC (rev 75743)
@@ -5,6 +5,7 @@
name vigra
version 1.7.1
+revision 1
categories graphics
platforms darwin
maintainers gmail.com:benjamin.seppke
@@ -89,42 +90,41 @@
configure.args-append -DWITH_VALGRIND=NO
}
-set python_version ""
-# figure out if Boost::Python exists,
-# and if so what Python version
-set boost_python_lib [exec find ${prefix}/lib \
- -name "lib*boost*python*mt*dylib" \
- -type f -maxdepth 1 | \
- awk "{ print \$1 }"]
-if {${boost_python_lib} != ""} {
- set python_version [exec otool -L ${boost_python_lib} | \
- grep Python | awk "{ print \$1 }" | \
- sed -e "s at .*Versions/\\(.*\\)/Python@\\1@"]
-}
-
-if { ${python_version} == ""} {
-
+# just like it's done in games/PlasmaClient and other ports that
+# require Boost::Python.
+if {![file exists ${prefix}/lib/libboost_python-mt.dylib]} {
# just disable NUMPY bindings via a CMake flag
configure.args-append -DWITH_VIGRANUMPY=NO
+ pre-fetch {
+ ui_msg "
+****
+**** To get NUMPY bindings, ${name} requires the port 'boost' to
+**** be installed with the variant +python26. If you want NUMPY
+**** bindings, then please do the following first:
+****
+**** sudo port install boost +python26
+****
+**** and then try installing ${name} again.
+****
+"
+ }
} else {
- # yes: allow for +numpy variant
- variant numpy description \
- "Include support for NUMPY (requires BOOST::Python)" {}
+ # assume Python version 2.6, no matter what the user has actually
+ # installed via "port install boost +pythonXY".
+ set python_version "2.6"
- if {[variant_isset numpy]} {
- # append cmake flags
- configure.args-append \
- -DPYTHON_EXECUTABLE=${prefix}/bin/python${python_version} \
- -DPYTHON_SPHINX=${prefix}/bin/sphinx-build-${python_version}
+ # append cmake flags
+ configure.args-append \
+ -DPYTHON_EXECUTABLE=${prefix}/bin/python${python_version} \
+ -DPYTHON_SPHINX=${prefix}/bin/sphinx-build-${python_version}
- # make sure dependencies are installed
- set python_version_join [join [split ${python_version} "."] ""]
- depends_lib-append port:boost \
- port:python${python_version_join} \
- port:py${python_version_join}-numpy \
- port:py${python_version_join}-sphinx
- }
+ # make sure dependencies are installed
+ set python_version_join [join [split ${python_version} "."] ""]
+ depends_lib-append port:boost \
+ port:python${python_version_join} \
+ port:py${python_version_join}-numpy \
+ port:py${python_version_join}-sphinx
}
livecheck.type regex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110206/179a3ad7/attachment.html>
More information about the macports-changes
mailing list