Skip to content

Commit

Permalink
Add msys2 library dependency tag in gem metadata.
Browse files Browse the repository at this point in the history
RubyInstaller2 supports metadata tags for installation of dependent
MSYS2/MINGW libraries. The glut source gem requires the freeglut
package to be installed on the system, which the gem installer takes
care about, when this tag is set.

The feature is documented here:
https://github.com/oneclick/rubyinstaller2/wiki/For-gem-developers#msys2-library-dependency
  • Loading branch information
larskanis committed May 30, 2017
1 parent 95b3817 commit 32c7591
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ hoe = Hoe.spec 'glut' do
self.spec_extras = {
:extensions => %w[ext/glut/extconf.rb],
:required_ruby_version => '>= 1.9.2',
:metadata => {'msys2_mingw_dependencies' => 'freeglut'},
}
end

Expand All @@ -49,6 +50,10 @@ Rake::ExtensionTask.new 'glut', hoe.spec do |ext|
ext.cross_config_options += [
"--enable-win32-cross",
]
ext.cross_compiling do |spec|
# The fat binary gem doesn't depend on the freeglut package, since it bundles the library.
spec.metadata.delete('msys2_mingw_dependencies')
end
end


Expand Down

0 comments on commit 32c7591

Please sign in to comment.