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)
Change History (14)
Changed 17 years ago by eloy.de.enige@…
Attachment: | ruby-group_gem_no_universal_variant.diff added |
---|
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 |
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@…
Attachment: | ruby-group_gems_get_universal_if_ruby_is_universal.diff added |
---|
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: | Expected → Normal |
---|
comment:7 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)
Milestone: | MacPorts 1.5 → MacPorts base enhancements |
---|
comment:8 Changed 16 years ago by imajes@…
Owner: | changed from macports-tickets@… to imajes@… |
---|---|
Status: | new → assigned |
comment:9 Changed 14 years ago by jmroot (Joshua Root)
Cc: | eloy.de.enige@… removed |
---|---|
Component: | base → ports |
Keywords: | ruby rubygems universal removed |
Milestone: | MacPorts Future |
Summary: | RFE: base-1.5.0 ruby group - rubygems have no universal variant → RFE: 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: | assigned → closed |
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
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.