Sha256: 741d84f5225c64d56b564bc739c5a0242a7cfb5d2a5cb89f8a9b5efd215b9bbd

Contents?: true

Size: 808 Bytes

Versions: 4

Compression:

Stored size: 808 Bytes

Contents

require 'mkmf'

# see https://github.com/zhm/gdal-ruby/issues/5
require_relative '../ruby-2.2-patch'

raise 'gdal-config not found.' if `which gdal-config`.empty?

dir_config 'gdal',
           `gdal-config --cflags`.split(' ')[0].gsub(/-I/, ''),
           `gdal-config --libs`.split(' ')[0].gsub(/-L/, '')

have_library 'gdal' or raise 'libgdal not found'

pkg_config 'gdal'

$libs = append_library $libs, 'gdal'

# earlier versions of ruby do not define $CXXFLAGS
$CXXFLAGS = CONFIG["CXXFLAGS"] unless defined?($CXXFLAGS)

$CFLAGS << ' -Wno-format-security'
$CXXFLAGS << ' -Wno-format-security'

if !(`gdal-config --version`.strip =~ /^1/)
  $CFLAGS << ' -Wno-reserved-user-defined-literal -std=c++11'
  $CXXFLAGS << ' -Wno-reserved-user-defined-literal -std=c++11'
end

create_makefile 'gdal-ruby/gdal'

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
gdal3-3.0.1 ext/gdal-ruby/gdal/extconf.rb
gdal3-3.0.0 ext/gdal-ruby/gdal/extconf.rb
gdal-3.0.0 ext/gdal-ruby/gdal/extconf.rb
gdal-2.0.0 ext/gdal-ruby/gdal/extconf.rb