| 34 | | # |
| 35 | | # Set some variables. |
| 36 | | set ruby.bin ${prefix}/bin/ruby |
| 37 | | set ruby.rdoc ${prefix}/bin/rdoc |
| | 34 | |
| | 35 | # Define these variables assuming ruby1.8 to make them accessible in |
| | 36 | # the portfile after port group declaration. They can be modified by |
| | 37 | # ruby.setup, e.g. to use another ruby than 1.8. |
| | 38 | set ruby.bin ${prefix}/bin/ruby |
| | 39 | set ruby.rdoc ${prefix}/bin/rdoc |
| | 40 | set ruby.gem ${prefix}/bin/gem |
| 61 | | # ruby group setup procedure |
| 62 | | proc ruby.setup {module vers {type "install.rb"} {docs {}} {source "custom"}} { |
| 63 | | global destroot prefix worksrcpath |
| 64 | | global ruby.bin ruby.lib |
| 65 | | global ruby.module ruby.project ruby.filename ruby.docs ruby.srcdir |
| | 63 | # ruby group setup procedure; optional for ruby 1.8 if you want only |
| | 64 | # basic variables, like ruby.lib and ruby.archlib. |
| | 65 | proc ruby.setup {module vers {type "install.rb"} {docs {}} {source "custom"} {implementation "ruby"}} { |
| | 66 | global destroot prefix worksrcpath os.platform |
| | 67 | global ruby.bin ruby.rdoc ruby.gem |
| | 68 | global ruby.version |
| | 69 | global ruby.lib ruby.archlib |
| | 70 | global ruby.module ruby.filename ruby.project ruby.docs ruby.srcdir |
| | 71 | |
| | 72 | if {${implementation} eq "ruby19"} { |
| | 73 | set ruby.bin ${prefix}/bin/ruby1.9 |
| | 74 | set ruby.rdoc ${prefix}/bin/rdoc1.9 |
| | 75 | set ruby.gem ${prefix}/bin/gem1.9 |
| | 76 | set ruby.port_prefix rb19 |
| | 77 | } elseif {${implementation} eq "ruby"} { |
| | 78 | # ruby.bin, ruby.rdoc, and ruby.gem set to 1.8 by default |
| | 79 | set ruby.port_prefix rb |
| | 80 | } else { |
| | 81 | ui_error "ruby.setup: unknown implementation '${implementation}' specified (ruby, ruby19 possible)" |
| | 82 | return -code error "ruby.setup failed" |
| | 83 | } |
| | 84 | |
| | 85 | # re-define variables to pick up possible implemantation change |
| | 86 | set ruby.version [ruby.extract_config ruby_version] |
| | 87 | set ruby.arch [ruby.extract_config arch ${os.platform}] |
| | 88 | set ruby.lib [ruby.extract_config vendorlibdir ${prefix}/lib/ruby/vendor_ruby/${ruby.version}] |
| | 89 | set ruby.archlib [ruby.extract_config vendorarchdir ${ruby.lib}/${ruby.arch}] |