# $Id: Portfile 83385 2011-08-31 01:52:26Z dports@macports.org $

PortSystem		1.0
PortGroup		muniversal 1.0
PortGroup		ruby 1.0

ruby.setup		{gconf ruby-gnome2} 0.90.5 extconf.rb \
				{ gconf/README gconf/sample } \
				sourceforge:ruby-gnome2
revision		1
maintainers		kimuraw
platforms		darwin
description		Gconf libraries for ruby (a part of Ruby-Gnome2)
long_description	Gconf libraries for ruby (a part of Ruby-Gnome2)
categories-append	gnome
license			LGPL-2
checksums		md5 58ee234ef8b121b11de8a245c61cd4a9 \
				rmd160 7c96480e366bac2408a3790c355ad517cc0b0023 \
				sha1 320fc4c9b65b6494abac894e84013683584acf54
configure.env	RUBYOPT=-rvendor-specific
configure.args		--strict gconf
depends_lib-append	port:gconf port:rb-pkg-config
distname		${ruby.project}-all-${version}

# run extconf.rb with each arch `ruby'
use_parallel_build	no
post-configure {
	if {[variant_isset universal]} {
		foreach arch ${universal_archs} {
			system "/usr/bin/arch -${arch} ${ruby.bin} -C ${worksrcpath}-${arch}/gconf extconf.rb --vendor"
		}
	}
}

# for developer only, this test requires rb-gtk2
#test.run		yes
test.cmd		${ruby.bin}
test.target		-Igconf/src -Igconf/src/lib gconf/tests/unittest.rb

