gdal3 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,29 @@
1
+ require 'mkmf'
2
+
3
+ # see https://github.com/zhm/gdal-ruby/issues/5
4
+ require_relative '../ruby-2.2-patch'
5
+
6
+ raise 'gdal-config not found.' if `which gdal-config`.empty?
7
+
8
+ dir_config 'gdal',
9
+ `gdal-config --cflags`.split(' ')[0].gsub(/-I/, ''),
10
+ `gdal-config --libs`.split(' ')[0].gsub(/-L/, '')
11
+
12
+ have_library 'gdal' or raise 'libgdal not found'
13
+
14
+ pkg_config 'gdal'
15
+
16
+ $libs = append_library $libs, 'gdal'
17
+
18
+ # earlier versions of ruby do not define $CXXFLAGS
19
+ $CXXFLAGS = CONFIG["CXXFLAGS"] unless defined?($CXXFLAGS)
20
+
21
+ $CFLAGS << ' -Wno-format-security'
22
+ $CXXFLAGS << ' -Wno-format-security'
23
+
24
+ if !(`gdal-config --version`.strip =~ /^1/)
25
+ $CFLAGS << ' -Wno-reserved-user-defined-literal -std=c++11'
26
+ $CXXFLAGS << ' -Wno-reserved-user-defined-literal -std=c++11'
27
+ end
28
+
29
+ create_makefile('gdal-ruby/ogr')