Sha256: a4198cf1e82295f32e9b8c675967474cd7ba3c441f1ee26d0e29c68a756d4d3a

Contents?: true

Size: 917 Bytes

Versions: 1

Compression:

Stored size: 917 Bytes

Contents

require 'mkmf'
require 'nokogiri'

def barf message = 'dependencies not met'
  raise message
end

barf unless have_header('ruby.h')

pkg_config('xmlsec1')
$CFLAGS << " " + `xmlsec1-config  --cflags`.strip
$CFLAGS << " -fvisibility=hidden"

if $CFLAGS =~ /\-DXMLSEC_CRYPTO=\\\\\\"openssl\\\\\\"/
puts "Changing escaping: #{$CFLAGS}"
  $CFLAGS['-DXMLSEC_CRYPTO=\\\\\\"openssl\\\\\\"'] =
    '-DXMLSEC_CRYPTO=\\"openssl\\"'
end

if $CFLAGS =~ /\-DXMLSEC_CRYPTO="openssl"/
puts "Ensure we escaping: #{$CFLAGS}"
  $CFLAGS['-DXMLSEC_CRYPTO="openssl"'] =
  '-DXMLSEC_CRYPTO=\\"openssl\\"'
end

$CFLAGS << Dir[Gem.loaded_specs['nokogiri'].full_gem_path + "/ext/*"].map { |dir| " -I#{dir}"}.join("")

puts "Clfags: #{$CFLAGS}"
$libs = `xmlsec1-config  --libs`.strip

# We reference symbols out of nokogiri but don't link directly against it
$LDFLAGS << ' -Wl,-undefined,dynamic_lookup'

create_makefile('nokogiri_ext_xmlsec')

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nokogiri-xmlsec-instructure-0.10.2 ext/nokogiri_ext_xmlsec/extconf.rb