# $Id: Portfile,v 1.8 2005/04/21 15:57:44 jberry Exp $
PortSystem		1.0
PortGroup		ruby 1.0

name			freeride
version			0.9.2
description		A Ruby IDE for the Ruby programming language.
long_description	A Ruby IDE written in Ruby using the FOX GUI toolkit. \
					This IDE sports cross platform compatability, \
					with an extensive plugin architecture.
maintainers		tristan@opendarwin.org
categories		devel ruby
homepage		http://freeride.rubyforge.org/wiki/wiki.pl
master_sites	http://rubyforge.org/download.php/2185/
checksums		md5 04a9802f712074085349eac6d0d1483d
platforms		darwin 

depends_lib		port:rb-drb \
				port:rb-fxruby \
				port:rb-rexml \
				port:rb-ripper \
                port:rb-rrb \
                port:fontconfig

use_configure	no

patchfiles      patch-appframe.rb

build {
	# create simple execution script
	set fp [open ${workpath}/${name} w]
	puts $fp "#!/bin/sh"
	puts $fp "cd ${prefix}/share/${name}"
	puts $fp "${ruby.bin} ${name}.rb"
	close $fp
	# don't use the included copies of modules, use ports only
	system "rm -rf ${worksrcpath}/redist"
	reinplace {s|^$:.*redist|#&|} ${worksrcpath}/${name}.rb
}
destroot {
	xinstall -d -m 0755 ${destroot}${prefix}/bin
	xinstall -m 0755 ${workpath}/${name} ${destroot}${prefix}/bin
	xinstall -d -m 0755 ${destroot}${prefix}/share
	system "cp -R ${worksrcpath} ${destroot}${prefix}/share/${name}"
	system "chmod 0777 ${destroot}${prefix}/share/${name}/config"
}

