# $Id$

PortSystem 1.0

name		qtsharp
version		0.7.1
categories	devel
license		GPL-2+
platforms	darwin
supported_archs i386 ppc
maintainers	nomaintainer
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.
homepage	http://qtcsharp.sourceforge.net/
master_sites	sourceforge:project/qtcsharp/qtsharp/${version}
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 {
	system "cd ${worksrcpath}/src && ${prefix}/bin/qmake src.pro INSTALLDIR=${prefix}/lib CSC=cscc CLI=ilrun -o Makefile"
	system "cd ${worksrcpath}/src/libqtsharp && ${prefix}/bin/qmake libqtsharp.pro INSTALLDIR=${prefix}/lib CSC=cscc CLI=ilrun -o Makefile"
	system "cd ${worksrcpath}/src/generator && ${prefix}/bin/qmake generator.pro INSTALLDIR=${prefix}/lib CSC=cscc CLI=ilrun -o Makefile"
	system "cd ${worksrcpath}/src/bindings && ${prefix}/bin/qmake bindings.pro INSTALLDIR=${prefix}/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"
}