# $Id: Portfile 80525 2011-07-14 09:37:02Z jmr@macports.org $

PortSystem		1.0
PortGroup		ruby 1.0

name			rb-rubygems
categories		ruby devel
license			{Ruby GPL-2}
version			1.3.7

homepage		http://rubygems.org/
master_sites		http://rubyforge.org/frs/download.php/70696/


distname                rubygems-${version}
dist_subdir             ruby

maintainers		mr_bond openmaintainer
description		a package management framework for Ruby
long_description	RubyGems is the Ruby standard for publishing and \
					managing third party libraries.

checksums		md5     e85cfadd025ff6ab689375adbf344bbe \
			sha1    68ad2970963db9893b76acc8777be72a77c4bee4 \
			rmd160  2ea8e16d1535216045798258603d5f2f9e3dbfea

patchfiles		patch-lib_rubygems_commands_setup_command.rb.diff


extract.suffix		.tgz
platforms		darwin
supported_archs		noarch

use_configure		no
build { }

destroot.cmd	${ruby.bin} setup.rb
destroot.args	--prefix=${prefix} --destdir=${destroot}
destroot.env

set gems_libdir ${destroot}${prefix}/lib/ruby/gems/${ruby.version}
destroot.keepdirs \
        ${gems_libdir}/doc \
        ${gems_libdir}/gems \
        ${gems_libdir}/specifications

variant ruby conflicts ruby186 ruby19 description {add Ruby 1.8.7 support} {
    depends_lib-append    port:ruby
	destroot.args-append  --vendor
}

variant ruby186 conflicts ruby ruby19 description {add Ruby 1.8.6 support} {
    depends_lib-append    port:ruby186
}

variant ruby19 conflicts ruby ruby186 description {add Ruby 1.9 support} {
    depends_lib-append    port:ruby19
	destroot.args-append  --vendor
}

if {![variant_isset ruby186] && ![variant_isset ruby19]} {
    default_variants +ruby
}
