Ignore:
Timestamp:
Sep 23, 2013, 3:42:54 AM (6 years ago)
Author:
kimuraw@…
Message:

port1.0/group/ruby-1.0.tcl: support ruby-1.8 universal extentions with extconf.rb (#39096)

write "Portgroup muniversal 1.0" to Portfile, then rb-* ports with
extconf.rb become to support universal.

TODO: setup.rb support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/ruby-1.0.tcl

    r105953 r111453  
    133133proc ruby.setup {module vers {type "install.rb"} {docs {}} {source "custom"} {implementation "ruby"}} {
    134134    global destroot prefix worksrcpath os.platform
    135     global ruby.bin ruby.rdoc ruby.gem
     135    global ruby.bin ruby.rdoc ruby.gem ruby.branch
    136136    global ruby.api_version ruby.lib ruby.suffix ruby.bindir ruby.gemdir
    137137    global ruby.module ruby.filename ruby.project ruby.docs ruby.srcdir
     
    139139    # ruby.version is obsoleted. use ruby.gemdir.
    140140    global ruby.prog_suffix
     141    # from muniversal
     142    global universal_archs_supported merger_configure_env
    141143
    142144    if {${implementation} eq "ruby19"} {
     
    353355
    354356            destroot.args       RUBY="${ruby.bin}"
     357
     358            # extconf.rb|mkmf.rb of ruby-1.8 does not support universal binary.
     359            # to build universal extentions, write "Portgrourp muniversal 1.0" in the Portfile.
     360            if {[variant_isset universal] && (${ruby.branch} eq "1.8") && [info exists universal_archs_supported]} {
     361                foreach arch ${universal_archs_supported} {
     362                    lappend merger_configure_env(${arch}) \
     363                        ARCHPREFERENCE=ruby${ruby.branch}:${arch}
     364                }
     365                configure.cmd   /usr/bin/arch ${ruby.bin} extconf.rb
     366            }
    355367            post-destroot {
    356368                foreach file [readdir ${destroot}${prefix}/bin] {
Note: See TracChangeset for help on using the changeset viewer.