# $Id: Portfile,v 1.3 2005/06/14 06:28:43 jkh Exp $

PortSystem 1.0

name		qtsharp
version		0.7.1
categories	devel
platforms	darwin
maintainers	darwinports@opendarwin.org
description	Qt bindings for C#
long_description	A cross-platform GUI toolkit for Mono and Portable.Net which provides set of classes that bind any CIL language to the Qt toolkit.
master_sites	sourceforge:qtcsharp/
homepage	http://qtcsharp.sourceforge.net/
checksums	md5 d5433e139f9362231119b0c742f67b64
depends_run	bin:cscc:pnet
depends_lib	lib:libqt.3.3:qt3-mac \
		lib:libqtc.1:qtc-qtsharp
use_bzip2	yes
worksrcdir	qtsharp
configure.cmd   qmake
configure.pre_args	INSTALLDIR=${prefix}/lib CSC=cscc CLI=ilrun
build.env	QTDIR=${prefix} PREFIX=${prefix} CSC=cscc CLI=ilrun
destroot.env	QTDIR=${prefix} INSTALL_ROOT=${destroot}
post-configure {
	cd ${worksrcpath}/src
	system "${prefix}/bin/qmake src.pro INSTALLDIR=${prefix}/lib CSC=cscc CLI=ilrun -o Makefile"
	system "cd libqtsharp && ${prefix}/bin/qmake libqtsharp.pro INSTALLDIR=/opt/local/lib CSC=cscc CLI=ilrun -o Makefile"
	system "cd generator && ${prefix}/bin/qmake generator.pro INSTALLDIR=/opt/local/lib CSC=cscc CLI=ilrun -o Makefile"
	system "cd bindings && ${prefix}/bin/qmake bindings.pro INSTALLDIR=/opt/local/lib CSC=cscc CLI=ilrun -o Makefile"
	system "cd ${worksrcpath} && patch -p0 < ${filespath}/patch-src-Makefile"
	system "cd ${worksrcpath} && patch -p0 < ${filespath}/patch-generator-Makefile"
	system "cd ${worksrcpath} && patch -p0 < ${filespath}/patch-bindings-Makefile"
}
