-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathlibui.gemspec
More file actions
40 lines (32 loc) · 1.36 KB
/
Copy pathlibui.gemspec
File metadata and controls
40 lines (32 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
require_relative 'lib/libui/version'
require_relative 'lib/libui/platform'
Gem::Specification.new do |spec|
spec.name = 'libui'
spec.version = LibUI::VERSION
spec.summary = 'Ruby bindings to libui'
spec.homepage = 'https://github.com/kojix2/libui'
spec.license = 'MIT'
spec.authors = ['kojix2']
spec.email = ['2xijok@gmail.com']
spec.files = Dir['*.{md,txt}', '{lib}/**/*', 'vendor/{LICENSE,README}.md']
spec.require_paths = 'lib'
spec.required_ruby_version = '>= 2.6'
# Use the GEM_PLATFORM environment variable if specified
gem_platform = ENV['GEM_PLATFORM']
spec.platform = gem_platform if gem_platform && !gem_platform.empty? && gem_platform != 'ruby'
platform_for_vendor = if gem_platform && !gem_platform.empty? && gem_platform != 'ruby'
gem_platform
else
spec.platform.to_s
end
vendor_file = LibUI::Platform.vendor_file_for(platform_for_vendor)
if vendor_file
# Platform-specific gem: ship only the matching native library.
spec.files << vendor_file
else
# Generic "ruby"-platform gem: include every bundled native library so
# runtime platform detection can select the matching one.
spec.files.concat(Dir['vendor/*.{dll,dylib,so}'])
end
spec.add_dependency 'fiddle'
end