Have you send these changes to the gem author?
Why mkmf modifications were required? all the mkmf modifications
should be avoided, if not, an update of Ruby will erase them.
> I can post more detailed info here, just let me know if anybody is
> interested.
Please do, but most important, get in touch with gem author and help
him get a gem working so others can use and we reduce the manual
"hacking" around them.
Thank you.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
Sounds interesting. How about putting it in a blog and putting a link in https://github.com/oneclick/rubyinstaller/wiki/Tutorials
Jon
---
blog: http://jonforums.github.com/
twitter: @jonforums
Sorry, I read incorrectly, you said mkrf, not mkmf.
I think mkrf is actively maintained and you should address the mkrf
patches to the gem author.
>
> I hope I didn't forget any of the steps.
> So now - is there a better way to achieve some of the steps? Especially
> modifying mkrf and rubygems does not seem pretty, so maybe they should be
> changed already inside the RubyInstaller, especially mkrf? And also - why
> there is no glut in the DevKit, but there is gl and glu? Is this some
> licensing problem?
What problems are in RubyGems? What version of RubyGems are you using?
what is the command and the output? Will be good to know so we can
point you to the right tools.
As for the mkrf, mentioned above.
If the gem author of ruby-opengl doesn't want to maintain it anymore,
perhaps you can fork the repository and put your changes in.
I think mkrf is actively maintained and you should address the mkrf
patches to the gem author.
What problems are in RubyGems? What version of RubyGems are you using?
what is the command and the output? Will be good to know so we can
point you to the right tools.
If you're using RubyGems 1.5.2+ double check whether you need to "prefer" psych on 1.9.x due to RubyGems preferring psych. This bit me when a dependency I was using did the expected "require 'yaml'" (which pulled in the deprecated syck engine) which then conflicted with RubyGems. Luis may want to say more on this or whether he thinks it's a non-issue for your case.
> And also - why there is no glut in the DevKit, but there is gl and glu? Is this some
> licensing problem?
We build up the DevKit by using other artifacts. For example, the default 4.5.1 DevKit integrates these artifacts for the mingw/ dir https://github.com/oneclick/rubyinstaller/blob/master/config/compilers/tdm_mingw.rb#L3-32 I don't want to maintain patch sets against these standard downloads for multiple reasons.
I think what you're doing re: glut is similar to what others are doing http://www.mingw.org/category/wiki/glut
That said, if more work goes on cleaning up the source gem it probably makes sense to update the extconf.rb (via dir_config('glut')) so that the when installed one can give the standard --with-glut-include, --with-glut-lib, --with-glut-dir to "gem install"
> I can post the details either here or I don't know where, maybe on an obscure blog I had once.
While I personally dislike tutorial doco being buried in mailing lists (usually gets overlooked even though you can search the list) if it's easier to document your final solution in a post to this list rather than a blog post linked to our tutorials, do it. I'd rather have the info documented than not...and you could always put a link to the mailing list topic in the tutorial page :)
"gem build" on RubyGems 1.5.2 should work properly
RubyGems 1.6.0 will iron the other details.
>> And also - why there is no glut in the DevKit, but there is gl and glu? Is this some
>> licensing problem?
>
> We build up the DevKit by using other artifacts. For example, the default 4.5.1 DevKit integrates these artifacts for the mingw/ dir https://github.com/oneclick/rubyinstaller/blob/master/config/compilers/tdm_mingw.rb#L3-32 I don't want to maintain patch sets against these standard downloads for multiple reasons.
>
GLU/GL fall into the "3rd party" category and similar to MySQL and
others, if you want to compile a gem that uses it, you need to provide
the compilation options.
>
>> I can post the details either here or I don't know where, maybe on an obscure blog I had once.
>
> While I personally dislike tutorial doco being buried in mailing lists (usually gets overlooked even though you can search the list) if it's easier to document your final solution in a post to this list rather than a blog post linked to our tutorials, do it. I'd rather have the info documented than not...and you could always put a link to the mailing list topic in the tutorial page :)
>
Agreed.
If you're using RubyGems 1.5.2+ double check whether you need to "prefer" psych on 1.9.x due to RubyGems preferring psych. This bit me when a dependency I was using did the expected "require 'yaml'" (which pulled in the deprecated syck engine) which then conflicted with RubyGems. Luis may want to say more on this or whether he thinks it's a non-issue for your case.
That said, if more work goes on cleaning up the source gem it probably makes sense to update the extconf.rb (via dir_config('glut')) so that the when installed one can give the standard --with-glut-include, --with-glut-lib, --with-glut-dir to "gem install"
While I personally dislike tutorial doco being buried in mailing lists (usually gets overlooked even though you can search the list) if it's easier to document your final solution in a post to this list rather than a blog post linked to our tutorials, do it. I'd rather have the info documented than not...and you could always put a link to the mailing list topic in the tutorial page :)
return true if RUBY_PLATFORM =~ /mswin/ # TODO: find a way on windows
to
return true if RUBY_PLATFORM =~ /mswin|mingw/ # TODO: find a way on windows
elsif RUBY_PLATFORM =~ /mingw/
"gcc -shared "
RUBYARCHDIR = "\#{ENV["RUBYARCHDIR"]}"
to
RUBYARCHDIR = "#{CONFIG["sitearchdir"]}"
when /mingw/
g.cflags << ' -DWIN32' + RUBYVER
g.include_library( 'glut32', 'glutSolidTeapot' )
g.include_library( 'glu32', 'gluLookAt' )
g.include_library( 'opengl32', 'glVertex3d' )