# $Id: Portfile,v 1.16 2005/09/21 18:13:27 toby Exp $
PortSystem		1.0
PortGroup		ruby 1.0

ruby.setup		rubygems 0.8.11 setup.rb {README doc examples gemspecs} \
			rubyforge:5207
maintainers		yuhei@pop21.odn.ne.jp
description		a package management framework for Ruby
long_description	RubyGems is the Ruby standard for publishing and \
					managing third party libraries.
categories-append	devel
checksums		md5 aa363b428c4c1fc2e076a4ff77b957d7
extract.suffix		.tgz
platforms		darwin

post-patch {
	reinplace "s%Gem.dir%'${destroot}'+&%" ${worksrcpath}/post-install.rb
}
pre-destroot {
	xinstall -d -m 0755 ${destroot}/${prefix}/lib/ruby/gems/${ruby.version}
}
post-destroot {
	foreach script {gem gem_server generate_yaml_index.rb update_rubygems} {
		reinplace "s%^#!.*ruby%#!${ruby.bin}%" ${destroot}${prefix}/bin/$script
	}
}

