# $Id: Portfile 30224 2007-10-22 22:49:14Z jmpp@macports.org $
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		nomaintainer
categories		devel ruby
homepage		http://freeride.rubyforge.org/wiki/wiki.pl
master_sites	http://rubyforge.org/frs/download.php/2185/
checksums		md5 04a9802f712074085349eac6d0d1483d
platforms		darwin 

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

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"
}

