Sha256: 3de1c60d76a705c03ffa833462a69c7d79e4430538c3e17108a321640749581e

Contents?: true

Size: 896 Bytes

Versions: 6

Compression:

Stored size: 896 Bytes

Contents

libdir = File.dirname(File.expand_path(__FILE__))
extdir = File.join(libdir, 'ext')
$CLASSPATH << libdir

Dir["#{libdir}/*.jar"].each do |jar|
  # JRuby includes all the openssl stuff from 1.7.3 onwards
  unless JRUBY_VERSION >= '1.7.3' && /bcprov-jdk15\.jar/ =~ jar
    require jar
  end
end

platform = ''
if java.lang.System.get_property('os.name').downcase.include?('linux')
  p 'Using JAI & Java ImageIO native extensions'
  platform << '/linux'
  platform << if java.lang.System.get_property('os.arch').end_with?('64')
                '-amd64'
              else
                '-i586'
              end
  ENV['JAIHOME'] = extdir + platform

  # ld_library_path is bad: http://xahlee.info/UnixResource_dir/_/ldpath.html
  ENV['LD_RUN_PATH'] = ENV['JAIHOME']

  $CLASSPATH << ENV['JAIHOME']
  require "ext#{platform}/mlibwrapper_jai.jar"
  require "ext#{platform}/clibwrapper_jiio.jar"
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
trantor-pdf-converter-0.1.1-java lib/pdfconverter.rb
imageutils-0.0.6-java lib/imageutils.rb
trantor-pdf-converter-0.1.0-java lib/pdfconverter.rb
imageutils-0.0.5-java lib/imageutils.rb
imageutils-0.0.4-java lib/imageutils.rb
imageutils-0.0.3-java lib/imageutils.rb