Sha256: debbf1444f26c5106ad6c41b98c05fcd3a827e25b009b8ce2710dd76ce77a300

Contents?: true

Size: 993 Bytes

Versions: 2

Compression:

Stored size: 993 Bytes

Contents

require 'mkmf'

return unless have_library('stdc++') # make sure we don't have some funny system

$stdout.write 'Checking for APNGAsm.'
if have_library('apngasm')
  $stdout.write 'APNGAsm found, building RAPNGAsm.'
else
  $stdout.write 'APNGAsm NOT found. Please install libapngasm.'
  exit 1
end

#find header location
header_loc = `echo '#include <apngasm-conf.h>' | gcc -xc - -E`
header_loc = header_loc.to_s.match(".*apngasm-conf\.h")
header_loc = header_loc.to_s.match("\/.*\/")
$stdout.write "\nAPNGAsm config header found in: #{header_loc.to_s}"

dir_config('rapngasm')

$stdout.write "\nGenerating native interface wrappers with SWIG\n"
$stdout.write "Using SWIG from #{`which swig`}\n"
$stdout.write "Generating wrapper sources from #{File.expand_path(File.dirname(__FILE__))}/apngasm.i\n"
`swig -c++ -ruby -I#{header_loc.to_s} #{File.expand_path(File.dirname(__FILE__))}/apng.i`
$stdout.write 'Wrappers generated'
$distcleanfiles += ['apngasm_wrap.cxx']

create_makefile('rapngasm')

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rapngasm-3.2.0 ext/rapngasm/extconf.rb
rapngasm-3.2.0.pre2 ext/rapngasm/extconf.rb