[56242] trunk/dports/math/shogun/Portfile
jameskyle at macports.org
jameskyle at macports.org
Tue Aug 25 09:51:09 PDT 2009
Revision: 56242
http://trac.macports.org/changeset/56242
Author: jameskyle at macports.org
Date: 2009-08-25 09:51:09 -0700 (Tue, 25 Aug 2009)
Log Message:
-----------
Updated to check for new swig. Abstracted the check to work for future versions.
Modified Paths:
--------------
trunk/dports/math/shogun/Portfile
Modified: trunk/dports/math/shogun/Portfile
===================================================================
--- trunk/dports/math/shogun/Portfile 2009-08-25 16:51:06 UTC (rev 56241)
+++ trunk/dports/math/shogun/Portfile 2009-08-25 16:51:09 UTC (rev 56242)
@@ -132,22 +132,29 @@
pre-extract {
# Before doing anything, verify the correct swig bindings are present for
# our variants
+ if {![file exists ${prefix}/bin/swig]} {
+ set swig_version [exec ${prefix}/bin/swig -version]
+ regexp {(\d.?)+} $swig_version version
+
+ } else {
+ set version 0.0.0
+ }
if {[variant_isset python] || [variant_isset python26]} {
- if {![file exists ${prefix}/share/swig/1.3.39/python/python.swg]} {
+ if {![file exists ${prefix}/share/swig/${version}/python/python.swg]} {
ui_error "To install shogun with the python variant, swig must be installed with the python variant as well."
return -code error "incompatible swig installation"
}
}
if {[variant_isset r]} {
- if {![file exists ${prefix}/share/swig/1.3.39/r/r.swg]} {
+ if {![file exists ${prefix}/share/swig/${version}/r/r.swg]} {
ui_error "To install shogun with the r variant, swig must be installed with the r variant as well."
return -code error "incompatible swig installation"
}
}
if {[variant_isset octave]} {
- if {![file exists ${prefix}/share/swig/1.3.39/octave/octave.swg]} {
+ if {![file exists ${prefix}/share/swig/${version}/octave/octave.swg]} {
ui_error "To install shogun with the octave variant, swig must be installed with the octave variant as well."
return -code error "incompatible swig installation"
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090825/fb279686/attachment.html>
More information about the macports-changes
mailing list