2016-12-10 10:49:15 +03:00
|
|
|
# coding: utf-8
|
2017-12-13 18:28:30 +03:00
|
|
|
|
2023-02-19 12:45:06 +03:00
|
|
|
name = File.basename(__FILE__, '.*')
|
|
|
|
source_version = ["", "ext/#{name}/"].find do |dir|
|
|
|
|
begin
|
|
|
|
break File.foreach(File.join(__dir__, "#{dir}#{name}.c")) {|line|
|
|
|
|
break $1.sub("-", ".") if /^#define\s+#{name.upcase}_VERSION\s+"(.+)"/o =~ line
|
|
|
|
}
|
|
|
|
rescue Errno::ENOENT
|
|
|
|
end
|
|
|
|
end or raise "can't find #{name.upcase}_VERSION"
|
|
|
|
|
2011-07-30 09:31:45 +04:00
|
|
|
Gem::Specification.new do |s|
|
2023-02-19 12:45:06 +03:00
|
|
|
s.name = name
|
|
|
|
s.version = source_version
|
2016-12-10 10:49:15 +03:00
|
|
|
s.authors = ["Kenta Murata", "Zachary Scott", "Shigeo Kobayashi"]
|
|
|
|
s.email = ["mrkn@mrkn.jp"]
|
|
|
|
|
|
|
|
s.summary = "Arbitrary-precision decimal floating-point number library."
|
|
|
|
s.description = "This library provides arbitrary-precision decimal floating-point number class."
|
|
|
|
s.homepage = "https://github.com/ruby/bigdecimal"
|
2023-02-19 12:54:43 +03:00
|
|
|
s.licenses = ["Ruby", "BSD-2-Clause"]
|
2016-12-10 10:49:15 +03:00
|
|
|
|
|
|
|
s.require_paths = %w[lib]
|
|
|
|
s.files = %w[
|
2011-07-30 09:31:45 +04:00
|
|
|
bigdecimal.gemspec
|
2018-12-25 04:17:59 +03:00
|
|
|
lib/bigdecimal.rb
|
2011-07-30 09:31:45 +04:00
|
|
|
lib/bigdecimal/jacobian.rb
|
2011-10-16 14:46:30 +04:00
|
|
|
lib/bigdecimal/ludcmp.rb
|
2011-07-30 09:31:45 +04:00
|
|
|
lib/bigdecimal/math.rb
|
|
|
|
lib/bigdecimal/newton.rb
|
|
|
|
lib/bigdecimal/util.rb
|
|
|
|
sample/linear.rb
|
|
|
|
sample/nlsolve.rb
|
|
|
|
sample/pi.rb
|
|
|
|
]
|
2023-02-08 23:01:46 +03:00
|
|
|
if Gem::Platform === s.platform and s.platform =~ 'java' or RUBY_ENGINE == 'jruby'
|
|
|
|
s.platform = 'java'
|
|
|
|
else
|
|
|
|
s.extensions = %w[ext/bigdecimal/extconf.rb]
|
|
|
|
s.files += %w[
|
|
|
|
ext/bigdecimal/bigdecimal.c
|
|
|
|
ext/bigdecimal/bigdecimal.h
|
|
|
|
ext/bigdecimal/bits.h
|
|
|
|
ext/bigdecimal/feature.h
|
|
|
|
ext/bigdecimal/missing.c
|
|
|
|
ext/bigdecimal/missing.h
|
|
|
|
ext/bigdecimal/missing/dtoa.c
|
|
|
|
ext/bigdecimal/static_assert.h
|
|
|
|
]
|
|
|
|
end
|
2016-12-10 10:49:15 +03:00
|
|
|
|
2021-10-22 07:04:42 +03:00
|
|
|
s.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
2011-07-30 09:31:45 +04:00
|
|
|
end
|