# $Id: Portfile 65097 2010-03-22 03:03:11Z adfernandes@macports.org $

PortSystem 1.0

name                qscintilla
version             2.4.3
categories          devel
maintainers         adfernandes 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. See the py*-qscintilla port to install python bindings.

#
# NOTE: the version of this port must be kept in sync with the 'py*-qscintilla' port(s),
#       since they contain the python bindings!
#

distname            QScintilla-gpl-${version}
master_sites        http://www.riverbankcomputing.com/static/Downloads/QScintilla2/ \
                    http://gentoo.mirrors.easynews.com/linux/gentoo/distfiles/ \
                    http://www.gtlib.gatech.edu/pub/gentoo/distfiles/ \
                    http://gentoo.osuosl.org/distfiles/

checksums           sha1    772bb3cfca8716e035f2cdc4536d5d8025b855a8

depends_lib         port:qt4-mac

universal_variant   no

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

configure.env       QTDIR=${qt_dir}
configure.cmd       "cd ${worksrcpath}/Qt4; ${qt_dir}/bin/qmake qscintilla.pro; \
                     cd ${worksrcpath}/designer-Qt4; ${qt_dir}/bin/qmake designer.pro; \
                     echo"

build.env           QTDIR=${qt_dir} CPLUS_INCLUDE_PATH=${worksrcpath}/Qt4 LIBRARY_PATH=${worksrcpath}/Qt4
build.cmd           "cd ${worksrcpath}/Qt4; make; cd ${worksrcpath}/designer-Qt4; make; echo"

destroot.env        QTDIR=${qt_dir} INSTALL_ROOT=${destroot}
destroot.cmd        "cd ${worksrcpath}/Qt4; make install; cd ${worksrcpath}/designer-Qt4; make install; echo"

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

livecheck.type      regex
livecheck.url       ${master_sites}
livecheck.regex     QScintilla-gpl-\(\\d+.\\d+.\\d+\).tar.gz
