Easily build Portfiles from ruby gems
Paul Guyot
pguyot at kallisys.net
Mon Nov 6 06:40:15 PST 2006
Hi all,
I wrote a script that generates a ready to use Portfile for any gem.
You can find it here:
http://www.opendarwin.org/~pguyot/gems_to_portfile.rb
The syntax is pretty simple:
./gems_to_portfile.rb gem_file.gem
or
./gems_to_portfile.rb gem_name
In both cases, it creates a new directory, rb-gem_name, with the
Portfile in it. Please note that this portfile uses the new
rubyforge_gem fetch syntax (available with the ruby group
modification I just committed to the svn repository). The second
version will download the gem in the current directory. I need the
file to be able to compute the checksums. Besides, if several gems
exist and some of them are binaries, it will ask you to choose a
version (using the native gem mechanism).
This script requires gems (sudo port install rb-rubygems).
With such a script, there's no reason to continue to use gem to
install ruby gems. Using gem may yield in inconsistencies. I know
that most ruby tutorial around say: get ruby with darwinports, then
use gem. But I strongly disagree. At some point, we may rename gem
binary and put a fake one that displays a warning message.
Enjoy!
Paul
--
Ministre ultraplénipotentiaire en disponibilité.
Mobile. Sans baignoire fixe.
http://www.kallisys.com/
http://www-poleia.lip6.fr/~guyot/
More information about the macports-dev
mailing list