class Gears::SWIG

Public Instance Methods

build() click to toggle source
# File lib/gears/swig.rb, line 23
def build()
  puts "Building SWIG in #{@build_path}"
  Dir.chdir(@build_path)
  `./autogen.sh`
  `./configure --prefix=#{@@install_path}`
  `make`
  @built = true
  true
end
check() click to toggle source
# File lib/gears/swig.rb, line 7
def check()
  puts 'Checking for SWIG'
  if RUBY_PLATFORM.match(/darwin/)
    @checked = gear_exec_mac > 0 ? true : false
  else
    gear_exec 'swig -version'
    @checked = $?.exitstatus == 0 ? true : false
  end
  @checked
end
install() click to toggle source
# File lib/gears/swig.rb, line 33
def install()
  puts "Installing SWIG to #{@@install_path}"
  Dir.chdir(@build_path)
  `make install-main`
  `make install-lib`
  @installed = true
  true
end
obtain() click to toggle source
# File lib/gears/swig.rb, line 18
def obtain()
  puts 'Obtaining SWIG'
  github_obtain('swig', 'swig')
end
uninstall() click to toggle source
# File lib/gears/swig.rb, line 42
def uninstall()
  puts 'Uninstalling SWIG'
  FileUtils.rm_f("#{@@install_path}/bin/swig")
  FileUtils.rm_f("#{@@install_path}/bin/ccache-swig")
  FileUtils.rm_rf("#{@@install_path}/share/swig")
  FileUtils.rm_f("#{@@install_path}/share/man/man1/ccache-swig.1")
  @installed = false
  true
end