Sha256: 59bef3738f47e7ea1aafdd166d2b313c70551b22952b78d9b8c51269fd12dfa6

Contents?: true

Size: 775 Bytes

Versions: 2

Compression:

Stored size: 775 Bytes

Contents

require 'mkmf'

def using_system_libraries?
  arg_config('--use-system-libraries', !!ENV['RUBYJQ_USE_SYSTEM_LIBRARIES'])
end

unless using_system_libraries?
  message "Buildling jq using packaged libraries.\n"

  require 'rubygems'
  require 'mini_portile2'

  recipe = MiniPortile.new("jq", "1.6")
  recipe.files = ["https://github.com/stedolan/jq/archive/jq-1.6.tar.gz"]
  recipe.configure_options = [
    "--enable-shared",
    "--disable-maintainer-mode"
  ]
  class << recipe
    def configure
      execute("autoreconf", "autoreconf -i")
      super
    end
  end
  recipe.cook
  recipe.activate
  $LIBPATH = ["#{recipe.path}/lib"] | $LIBPATH
  $CPPFLAGS << " -I#{recipe.path}/include"
end

abort "libjq not found" unless have_library('jq')

create_makefile('jq_core')

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-jq-0.1.9 ext/extconf.rb
ruby-jq-0.1.8 ext/extconf.rb