# $Id: Portfile 54331 2009-07-25 01:23:54Z kimuraw@macports.org $

PortSystem		1.0
PortGroup		ruby 1.0

ruby.setup		{cocoa rubycocoa} 1.0.0 install.rb {ChangeLog ReadMe.html ReadMe.ja.html}
maintainers		kimuraw
description		Ruby bindings for writing cocoa programs
long_description	RubyCocoa is a Ruby library for using Cocoa Objects \
					on Mac OS X in Ruby scripts. You can use RubyCocoa \
					to work with Cocoa objects in Ruby scripts, write \
					Cocoa applications with Ruby and Interface Builder, \
					develop small scale simple Cocoa applications and \
					such.
categories-append	devel
homepage		http://${ruby.project}.sourceforge.net/
master_sites	sourceforge:${ruby.project}
distname		RubyCocoa-${version}
checksums		md5 96e6a69191e862f60915c11d4d9ea7c0 \
				rmd160 1b304748a3c15163090a71fbc67e9bfb0cfa692f \
				sha1 d20504c3f7785ac4aba0f0df6d8f68fa4ffe6b33
platforms		darwin

# fix #16928: allow non MacOS's make, like gmake
patchfiles-append	patch-ext-rubycocoa-extconf.rb.in.diff

configure.args		--install-prefix=${destroot}${prefix} \
					--install-root=${destroot} \
					--documentation=${prefix}/share/doc/${name} \
					--examples=${prefix}/share/examples/${name}
destroot.violate_mtree	yes

platform darwin 9 {
	if {![variant_isset universal]} {
		configure.args-append --build-universal=no
    }
}

# by default, do not install Xcode templates. #18708
variant xcode description {install project templates for Xcode} { }
if {![variant_isset xcode]} {
	configure.args-append \
		--xcode-extras="${prefix}/share/doc/${name}/project-templates"
}

#test.run yes
test.cmd ${ruby.bin}
test.target install.rb test

