# $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		{libart ruby-gnome2} 0.90.5 extconf.rb \
				{ libart/README libart/sample } \
				sourceforge:ruby-gnome2
revision		2
maintainers		kimuraw
platforms		darwin
description		Ruby/Libart2 is a Ruby binding of Libart_lgpl.
long_description	Ruby/Libart2 is a Ruby binding of Libart_lgpl.
license			LGPL-2
checksums		md5 58ee234ef8b121b11de8a245c61cd4a9 \
				rmd160 7c96480e366bac2408a3790c355ad517cc0b0023 \
				sha1 320fc4c9b65b6494abac894e84013683584acf54
configure.env	RUBYOPT=-rvendor-specific
configure.args	--strict libart
depends_lib-append	port:libart_lgpl port:libpng port:jpeg port:rb-glib2 \
					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}/libart extconf.rb --vendor"
		}
	}
}

