Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #12317 (assigned enhancement)

Opened 14 months ago

Last modified 3 months ago

RFE: base-1.5.0 ruby group - rubygems have no universal variant

Reported by: eloy.de.enige@… Owned by: imajes@…
Priority: Normal Milestone: MacPorts base enhancements
Component: base Version: 1.5.0
Keywords: ruby rubygems universal Cc: eloy.de.enige@…, pguyot@…, ryandesign@…

Description

This patch adds: "universal_variant no" to the ruby port group for any ports that use gems. If a gem has a C extension the config will be picked up from the ruby config by mkmf.rb/extconf.rb. So a universal ruby will build universal gems.

Patch for a universal ruby is at: http://trac.macosforge.org/projects/macports/ticket/12314

Attachments

ruby-group_gem_no_universal_variant.diff (0.8 kB) - added by eloy.de.enige@… 14 months ago.
ruby-group_gems_get_universal_if_ruby_is_universal.diff (1.0 kB) - added by eloy.de.enige@… 14 months ago.

Change History

Changed 14 months ago by eloy.de.enige@…

Changed 14 months ago by ryandesign@…

  • cc eloy.de.enige@…, pguyot@…, ryandesign@… added; macports-dev@… removed
  • milestone set to MacPorts 1.5

Always using "universal_variant no" seems misleading to me. If ruby is universal, and you build a gem, it too is universal, but when you say "port installed somegem" it will not show the +universal variant, and that's the part I don't like. I say if an installed port is universal, it should advertise itself as such.

For example, I maintain the ports sleepwatcher and isightcapture which always build universal by virtue of their Xcode projects. So I add this to the portfile to indicate this:

default_variants +universal variant universal {}

In the case of the ruby group, this is only slightly more complicated... the decision of whether to use "universal_variant no" or "default_variants +universal; variant universal {}" must be based on whether or not the installed ruby port is universal. But hopefully there is some syntax that can accomplish that.

Changed 14 months ago by ryandesign@…

Edit: It should be on two lines:

default_variants +universal
variant universal {}

Changed 14 months ago by eloy.de.enige@…

Yes I understand what you mean.... I could have a look if something like this works (absolutely not a tcl expert so this is more ruby, but it gives a rough idea):

pre-configure {

if file ${prefix}/bin/ruby =~ /ppc\.i386/ {

default_variants +universal

}

}

variant universal {}

If someone has a better idea before I come up with the working tcl code I would be glad to hear it of course :)

Cheers, Eloy

Changed 14 months ago by eloy.de.enige@…

With formatting:

pre-configure {
  if `file ${prefix}/bin/ruby` =~ /ppc\.i386/ {
    default_variants +universal
  }
}

variant universal {}

Changed 14 months ago by eloy.de.enige@…

Changed 14 months ago by eloy.de.enige@…

Added a new patch which adds +universal to the default_variants if the ruby in ${prefix}/bin/ruby is a universal binary.

Changed 13 months ago by nox@…

  • priority changed from Expected to Normal

Changed 9 months ago by jmpp@…

  • milestone changed from MacPorts 1.5 to MacPorts base enhancements

Changed 3 months ago by imajes@…

  • owner changed from macports-tickets@… to imajes@…
  • status changed from new to assigned
Note: See TracTickets for help on using tickets.