Opened 17 years ago

Closed 2 years ago

#12317 closed enhancement (wontfix)

RFE: ruby portgroup - rubygems have no universal variant

Reported by: eloy.de.enige@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.5.0
Keywords: portgroup Cc: pguyot (Paul Guyot), ryandesign (Ryan Carsten Schmidt)
Port:

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 (2)

ruby-group_gem_no_universal_variant.diff (824 bytes) - added by eloy.de.enige@… 17 years ago.
ruby-group_gems_get_universal_if_ruby_is_universal.diff (1.0 KB) - added by eloy.de.enige@… 17 years ago.

Download all attachments as: .zip

Change History (14)

Changed 17 years ago by eloy.de.enige@…

comment:1 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: eloy.de.enige@… pguyot@… ryandesign@… added; macports-dev@… removed
Milestone: 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.

comment:2 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Edit: It should be on two lines:

default_variants +universal
variant universal {}

comment:3 Changed 17 years 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

comment:4 Changed 17 years ago by eloy.de.enige@…

With formatting:

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

variant universal {}

Changed 17 years ago by eloy.de.enige@…

comment:5 Changed 17 years 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.

comment:6 Changed 17 years ago by nox@…

Priority: ExpectedNormal

comment:7 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)

Milestone: MacPorts 1.5MacPorts base enhancements

comment:8 Changed 16 years ago by imajes@…

Owner: changed from macports-tickets@… to imajes@…
Status: newassigned

comment:9 Changed 14 years ago by jmroot (Joshua Root)

Cc: eloy.de.enige@… removed
Component: baseports
Keywords: ruby rubygems universal removed
Milestone: MacPorts Future
Summary: RFE: base-1.5.0 ruby group - rubygems have no universal variantRFE: ruby portgroup - rubygems have no universal variant

comment:10 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from imajes@… to macports-tickets@…

James Cox (imajes) retires as MacPorts maintainer (see macports-mgr archives)

comment:11 Changed 2 years ago by mascguy (Christopher Nielsen)

Keywords: portgroup added

Add keyword portgroup, to pg-related tickets

comment:12 Changed 2 years ago by kimuraw (kimura wataru)

Resolution: wontfix
Status: assignedclosed

it is not clear a rubygems allows "universal".

maintainer should specify for each gem:

  • supported_archs: noarch / arm64 / x86_64 / ppc
  • allow universal or not
Note: See TracTickets for help on using tickets.