Sha256: 826df35ccd23500bf0cd3152abfa45e47f749a8e18d5ae9ed4867a4e95433f1a

Contents?: true

Size: 1.71 KB

Versions: 3

Compression:

Stored size: 1.71 KB

Contents

require 'mkmf'

filegdb_path = File.expand_path("#{File.dirname(__FILE__)}/filegdb")

dir_config '', File.join(filegdb_path, 'include'), File.join(filegdb_path, 'lib')

have_library 'FileGDBAPI' or raise 'libFileGDBAPI not found'

$libs = append_library $libs, 'FileGDBAPI'

$LDFLAGS << " -Wl,-rpath,#{File.join(filegdb_path, 'lib')}"

if RUBY_PLATFORM =~ /darwin/
  # libFileGDBAPI requires GCC compilation because its C++ symbols are incompatible with LLVM/clang
  #
  # To install GCC on OSX:
  #
  #   $ brew install gcc
  #

  msg = <<-GCC


\e[31m
===========================================================================================================================
===========================================================================================================================

The filegdb gem requires GCC on OSX because the C++ symbols in libFileGDBAPI.dylib are incompatible with LLVM/clang

To install GCC on OSX:

   $ brew install gcc

Note: Installing GCC through homebrew is safe and will not interfere with your Xcode installation.

Report installation bugs here: https://github.com/spatialnetworks/filegdb-ruby

===========================================================================================================================
===========================================================================================================================
\e[0m

GCC

  if `which gcc-4.9`.strip.length == 0
    puts msg
    exit
  end

  require 'rbconfig'
  RbConfig::MAKEFILE_CONFIG['CC']  = 'gcc-4.9'
  RbConfig::MAKEFILE_CONFIG['CXX'] = 'gcc-4.9'

  # remove -Wshorten-64-to-32 since it's incompatible with GCC
  $warnflags = $warnflags.gsub(/-Wshorten-64-to-32/, '')
end

create_makefile 'filegdb/filegdb'

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
filegdb-0.0.6 ext/filegdb/extconf.rb
filegdb-0.0.5 ext/filegdb/extconf.rb
filegdb-0.0.4 ext/filegdb/extconf.rb