# $Id: Portfile 54239 2009-07-23 17:35:24Z macsforever2000@macports.org $

PortSystem 1.0

name                qscintilla
version             2.4
categories          devel
maintainers         ricci openmaintainer
description         QScintilla is a port to Qt of Neil Hodgson's Scintilla C++ editor control.
homepage            http://www.riverbankcomputing.com/software/qscintilla/
platforms           darwin

long_description QScintilla is a port to Qt of Neil Hodgson's Scintilla C++ editor control. \
	As well as features found in standard text editing components,		\
	QScintilla includes features especially useful when editing and		\
	debugging source code. These include support for syntax styling,	\
	error indicators, code completion and call tips. The selection		\
	margin can contain markers like those used in debuggers to indicate	\
	breakpoints and the current line. Styling choices are more open		\
	than with many editors, allowing the use of proportional fonts,		\
	bold and italics, multiple foreground and background colours and	\
	multiple fonts. 

distname            QScintilla-gpl-${version}
distfiles           ${distname}.tar.gz
master_sites        http://www.riverbankcomputing.com/static/Downloads/QScintilla2/

checksums           md5     dd69520ec91f1acb97a4eb74ddde37c9 \
                    sha1    17962bb64d2641f9e181b39fdca39228170488a3 \
                    rmd160  19e5d5c331705c217c5192b1fcac5d298942db69

depends_lib         port:qt4-mac \
                    path:bin/python:python25

worksrcdir          ${distname}

set qt_dir          ${prefix}/libexec/qt4-mac

configure.dir       ${worksrcpath}/Qt4
configure.pre_args  INSTALLDIR=${prefix}/lib
configure.cmd       ${qt_dir}/bin/qmake qscintilla.pro

build.dir           ${worksrcpath}/Qt4

build.env           QTDIR=${qt_dir} PREFIX=${prefix}

post-build {
	system "install_name_tool -id	\
		${qt_dir}/lib/libqscintilla2.5.dylib	\
		${worksrcpath}/Qt4/libqscintilla2.5.dylib"
}

post-activate {
	system "cd ${worksrcpath}/Python;python configure.py;make;make install"
}

destroot.env        QTDIR=${qt_dir} INSTALL_ROOT=${destroot}

## post-configure {
##         system "cd ${worksrcpath}/clib/qtc && qmake qtc.pro INSTALLDIR=${prefix}/lib -o Makefile"
##         reinplace "s;-lqt;-lqt-mt;" ${worksrcpath}/clib/qtc/Makefile
## }


#
##EOF
