Ignore:
Timestamp:
Nov 1, 2013, 3:24:39 PM (6 years ago)
Author:
kimuraw@…
Message:

group/ruby-1.0.tcl: fix portindex error when port:ruby* or rb-rubygems not installed

File:
1 edited

Legend:

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

    r112773 r112791  
    7070options ruby.branch
    7171options ruby.bin ruby.rdoc ruby.gem ruby.rake ruby.bindir ruby.gemdir ruby.suffix
     72options ruby.api_version ruby.lib ruby.archlib
     73# ruby.version is obsoleted. use ruby.api_version.
     74options ruby.version
    7275option_proc ruby.branch ruby_set_branch
    7376proc ruby_set_branch {option action args} {
     
    7780    global prefix ruby.branch \
    7881           ruby.bin ruby.rdoc ruby.gem ruby.rake ruby.bindir ruby.gemdir \
    79            ruby.suffix ruby.link_binaries_suffix ruby.api_version \
    80            ruby.prog_suffix
     82           ruby.suffix ruby.link_binaries_suffix ruby.prog_suffix \
     83           ruby.api_version ruby.lib ruby.archlib ruby.arch
    8184    set ruby.bin            ${prefix}/bin/ruby${ruby.branch}
    8285    set ruby.rdoc           ${prefix}/bin/rdoc${ruby.branch}
     
    8487    set ruby.rake           ${prefix}/bin/rake${ruby.branch}
    8588    set ruby.bindir         ${prefix}/libexec/ruby${ruby.branch}
    86     default ruby.gemdir     {[exec ${ruby.gem} environment gemdir]}
    8789    # gem, rake command for 1.8 from port:rb-rubygems, port:rb-rake
    8890    if {${ruby.branch} eq "1.8"} {
     
    99101        set ruby.prog_suffix     ""
    100102    }
     103    #
     104    switch -exact ${ruby.branch} {
     105        1.8 {set ruby.api_version 1.8}
     106        1.9 {set ruby.api_version 1.9.1}
     107        2.0 {set ruby.api_version 2.0.0}
     108    }
     109    set ruby.gemdir         ${prefix}/lib/ruby${ruby.prog_suffix}/gems/${ruby.api_version}
     110    # define installation libraries as vendor location
     111    default ruby.lib        {[ruby.extract_config vendorlibdir ${prefix}/lib/ruby${ruby.prog_suffix}/vendor_ruby/${ruby.api_version}]}
     112    default ruby.archlib    {[ruby.extract_config vendorarchdir ${ruby.lib}/${ruby.arch}]}
     113    set ruby.version        ${ruby.api_version}
    101114}
    102115
     
    109122}
    110123
    111 options ruby.api_version ruby.lib ruby.archlib
    112 default ruby.api_version    {[ruby.extract_config ruby_version]}
     124options ruby.arch
    113125default ruby.arch           {[ruby.extract_config arch "${os.arch}-${os.platform}${os.major}"]}
    114 # define installation libraries as vendor location
    115 default ruby.lib            {[ruby.extract_config vendorlibdir ${prefix}/lib/ruby/vendor_ruby/${ruby.api_version}]}
    116 default ruby.archlib        {[ruby.extract_config vendorarchdir ${ruby.lib}/${ruby.arch}]}
    117 # ruby.version is obsoleted. use ruby.api_version.
    118 options ruby.version
    119 default ruby.version        {[ruby.extract_config ruby_version]}
    120126
    121127set ruby.module         ""
     
    124130set ruby.docs           {}
    125131set ruby.srcdir         ""
     132set ruby.prog_suffix    ""
    126133
    127134options ruby.link_binaries
Note: See TracChangeset for help on using the changeset viewer.