Sha256: a92594644bd1050d556ff27fec939e84c7588973d35638825be17c693c16e9fe

Contents?: true

Size: 829 Bytes

Versions: 26

Compression:

Stored size: 829 Bytes

Contents

# We can't use Ruby's standard build procedures
# on Windows because the Ruby executable is
# built with VC++ while here we want to build
# with MingW.  So just roll our own...

require 'fileutils'
require 'rbconfig'

EXTENSION_NAME = "libxml_ruby.#{Config::CONFIG["DLEXT"]}"

# MingW insists the import library is .dll.a
EXTENSION_LIB_NAME = "libxml_ruby.dll.a"

# This is called when the Windows GEM is installed!
task :install do
  # Gems will pass these two environment variables:
  # RUBYARCHDIR=#{dest_path}
  # RUBYLIBDIR=#{dest_path}
  
  dest_path = ENV['RUBYLIBDIR']
  
  # Copy the extension
  cp(EXTENSION_NAME, dest_path)
  
  # Copy the import library (used by libxslt)
  cp(EXTENSION_LIB_NAME, dest_path)

  # Copy dlls
  Dir.glob('*.dll').each do |dll|
    cp(dll, dest_path)
  end
end

task :default => :install

Version data entries

26 entries across 26 versions & 3 rubygems

Version Path
libxml-ruby-2.0.0-x86-mingw32 ext/mingw/Rakefile
libxml-ruby-2.0.0 ext/mingw/Rakefile
libxml-ruby-r19mingw-1.1.4 ext/mingw/Rakefile
libxml-ruby-1.1.4 ext/mingw/Rakefile
libxml-ruby-1.1.4-x86-mswin32-60 ext/mingw/Rakefile
coupa-libxml-ruby-1.1.4 ext/mingw/Rakefile
libxml-ruby-0.9.6-x86-mswin32-60 ext/mingw/Rakefile
libxml-ruby-0.9.5 ext/mingw/Rakefile
libxml-ruby-0.9.5-x86-mswin32-60 ext/mingw/Rakefile
libxml-ruby-0.9.6 ext/mingw/Rakefile
libxml-ruby-0.9.7-x86-mswin32-60 ext/mingw/Rakefile
libxml-ruby-0.9.7 ext/mingw/Rakefile
libxml-ruby-0.9.8 ext/mingw/Rakefile
libxml-ruby-0.9.8-x86-mswin32-60 ext/mingw/Rakefile
libxml-ruby-0.9.9 ext/mingw/Rakefile
libxml-ruby-0.9.9-x86-mswin32-60 ext/mingw/Rakefile
libxml-ruby-1.0.0 ext/mingw/Rakefile
libxml-ruby-1.0.0-x86-mswin32-60 ext/mingw/Rakefile
libxml-ruby-1.1.0-x86-mswin32-60 ext/mingw/Rakefile
libxml-ruby-1.1.0 ext/mingw/Rakefile