source: trunk/dports/ruby/rb-rubygems/Portfile @ 103919

Last change on this file since 103919 was 103919, checked in by kimuraw@…, 7 years ago

ruby/rb-rubygems: support port select ruby

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1# $Id: Portfile 103919 2013-03-10 02:19:43Z kimuraw@macports.org $
2
3PortSystem              1.0
4PortGroup               ruby 1.0
5
6name                    rb-rubygems
7categories              ruby devel
8license                 {Ruby GPL-2}
9version                 1.3.7
10revision                1
11
12homepage                http://rubygems.org/
13master_sites            http://rubyforge.org/frs/download.php/70696/
14
15
16distname                rubygems-${version}
17dist_subdir             ruby
18
19maintainers             mr_bond openmaintainer
20description             a package management framework for Ruby
21long_description        RubyGems is the Ruby standard for publishing and \
22                                        managing third party libraries.
23
24checksums               md5     e85cfadd025ff6ab689375adbf344bbe \
25                        sha1    68ad2970963db9893b76acc8777be72a77c4bee4 \
26                        rmd160  2ea8e16d1535216045798258603d5f2f9e3dbfea
27
28patchfiles              patch-lib_rubygems_commands_setup_command.rb.diff
29
30
31extract.suffix          .tgz
32platforms               darwin
33supported_archs         noarch
34
35use_configure           no
36build { }
37
38destroot.cmd    ${ruby.bin} setup.rb
39destroot.args   --prefix=${prefix} --destdir=${destroot}
40destroot.env
41
42set gems_libdir ${destroot}${prefix}/lib/ruby/gems/${ruby.api_version}
43destroot.keepdirs \
44        ${gems_libdir}/doc \
45        ${gems_libdir}/gems \
46        ${gems_libdir}/specifications
47
48variant ruby conflicts ruby186 ruby19 description {add Ruby 1.8.7 support} {
49    depends_lib-append      port:ruby
50    destroot.args-append    --vendor --no-format-executable
51    ruby.branch             1.8
52    post-destroot {
53        xinstall -d ${destroot}${ruby.bindir}
54        move ${destroot}${prefix}/bin/gem ${destroot}/${ruby.bindir}/gem
55        ln -s ${destroot}/${ruby.bindir}/gem ${destroot}${prefix}/bin/gem${ruby.link_binaries_suffix}
56    }
57}
58
59variant ruby186 conflicts ruby ruby19 description {add Ruby 1.8.6 support} {
60    depends_lib-append      port:ruby186
61}
62
63variant ruby19 conflicts ruby ruby186 description {add Ruby 1.9 support} {
64    depends_lib-append      port:ruby19
65    destroot.args-append    --vendor --no-format-executable
66    ruby.branch             1.9
67    post-destroot {
68        xinstall -d ${destroot}${ruby.bindir}
69        move ${destroot}${prefix}/bin/gem ${destroot}/${ruby.bindir}/gem
70    }
71}
72
73if {![variant_isset ruby186] && ![variant_isset ruby19]} {
74    default_variants +ruby
75}
76
77# clean up mess from previous portfile that bypassed the destroot
78pre-activate {
79    set docpath "${prefix}/lib/ruby/gems/1.8/doc/rubygems-1.3.7"
80    set adocfile "${docpath}/rdoc/classes/Gem/Builder.html"
81    if {[file exists $adocfile] && [registry_file_registered $adocfile] == "0"} {
82        delete $docpath
83    }
84}
Note: See TracBrowser for help on using the repository browser.