From 61e58f7dc480f9833b6b2e4c71d58e016536ce76 Mon Sep 17 00:00:00 2001 From: mrkn Date: Wed, 13 Dec 2017 15:28:30 +0000 Subject: bigdecimal: version 1.3.3 Import bigdecimal version 1.3.3. The full commit log is here: https://github.com/ruby/bigdecimal/compare/v1.3.2...v1.3.3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/bigdecimal/extconf.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ext/bigdecimal/extconf.rb') diff --git a/ext/bigdecimal/extconf.rb b/ext/bigdecimal/extconf.rb index dccf2d2d83..4bef91eafe 100644 --- a/ext/bigdecimal/extconf.rb +++ b/ext/bigdecimal/extconf.rb @@ -1,6 +1,22 @@ # frozen_string_literal: false require 'mkmf' +case +when File.file?(File.expand_path('../bigdecimal.gemspec', __FILE__)) + gemspec_path = File.expand_path('../bigdecimal.gemspec', __FILE__) +when File.file?(File.expand_path('../../../bigdecimal.gemspec', __FILE__)) + gemspec_path = File.expand_path('../../../bigdecimal.gemspec', __FILE__) +else + $stderr.puts "Unable to find bigdecimal.gemspec" + abort +end + +bigdecimal_version = + IO.readlines(gemspec_path) + .grep(/\Abigdecimal_version\s+=\s+/)[0][/\'([\d\.]+)\'/, 1] + +$defs << %Q[-DRUBY_BIGDECIMAL_VERSION=\\"#{bigdecimal_version}\\"] + alias __have_macro__ have_macro have_func("labs", "stdlib.h") -- cgit v1.2.3