Ignore:
Timestamp:
Aug 25, 2009, 4:51:09 PM (8 years ago)
Author:
jameskyle@…
Message:

Updated to check for new swig. Abstracted the check to work for future versions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/math/shogun/Portfile

    r56240 r56242  
    133133  # Before doing anything, verify the correct swig bindings are present for
    134134  # our variants
     135  if {![file exists ${prefix}/bin/swig]} {
     136      set swig_version [exec ${prefix}/bin/swig -version]
     137      regexp {(\d.?)+} $swig_version version
     138     
     139  } else {
     140      set version 0.0.0
     141  }
    135142  if {[variant_isset python] || [variant_isset python26]} {
    136     if {![file exists ${prefix}/share/swig/1.3.39/python/python.swg]} {
     143    if {![file exists ${prefix}/share/swig/${version}/python/python.swg]} {
    137144      ui_error "To install shogun with the python variant, swig must be installed with the python variant as well."
    138145      return -code error "incompatible swig installation"
     
    141148   
    142149  if {[variant_isset r]} {
    143     if {![file exists ${prefix}/share/swig/1.3.39/r/r.swg]} {
     150    if {![file exists ${prefix}/share/swig/${version}/r/r.swg]} {
    144151      ui_error "To install shogun with the r variant, swig must be installed with the r variant as well."
    145152      return -code error "incompatible swig installation"
     
    148155 
    149156  if {[variant_isset octave]} {
    150     if {![file exists ${prefix}/share/swig/1.3.39/octave/octave.swg]} {
     157    if {![file exists ${prefix}/share/swig/${version}/octave/octave.swg]} {
    151158      ui_error "To install shogun with the octave variant, swig must be installed with the octave variant as well."
    152159      return -code error "incompatible swig installation"
Note: See TracChangeset for help on using the changeset viewer.