Easily build Portfiles from ruby gems

Mark Fredrickson mark.m.fredrickson at gmail.com
Mon Nov 6 06:55:37 PST 2006


Salut Paul,

Would you mind explaining this a little more? It is not clear to me
why (as a developer just starting to use Ruby) I would want to get my
libraries from MacPorts instead directly from rubyforge or another gem
server. In a similar vein, should MacPorts replace CPAN (Perl) or PEAR
(PHP)?

I'm replying on-list, as I suspect others have the same question. But
feel free to respond privately if this falls outside the scope of the
macports list.

Merci,

-Mark


On 11/6/06, Paul Guyot <pguyot at kallisys.net> wrote:
> 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/
>
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo/macports-dev
>



More information about the macports-dev mailing list