# $Id: Portfile 82873 2011-08-21 08:45:13Z jmr@macports.org $

PortSystem 1.0

name			wxstedit
version			1.2.5
categories		devel
platforms		darwin freebsd
maintainers		afb
description		styled text editor component for wxWidgets
long_description	wxStEdit is a library and sample program for the wxWidgets's \
			wxStyledTextCtrl wrapper around the Scintilla text editor \
			widget. It provides a number of convenience functions and \
			added capabilities, including the necessary prefs/styles/language \
			management, menu creation and updating, a splitter, notebook, and \
			frame component. Additionally it provides a find/replace, editor \
			settings, and property dialogs.

homepage		http://wxcode.sourceforge.net/components/wxstedit/
master_sites		sourceforge:wxcode

checksums		${name}-${version}${extract.suffix} \
				md5 8ba50bdd40b1a0b43643de8f40e0ea0d \
			${name}-${version}${extract.suffix} \
				sha1 081c0c0b0b4f86c924d65b44415838c81759b887 \
			${name}-${version}${extract.suffix} \
				rmd160 f75bbf4fa1a8a5b092cc28a7b3bbbafae6ca0c90

worksrcdir		${name}

configure.args		--mandir=${prefix}/share/man \
			--with-wx-prefix=${prefix}

post-configure		{ copy -force "${worksrcpath}/include/wx/stedit/setup0.h" \
			              "${worksrcpath}/include/wx/stedit/setup.h" }
post-destroot		{ copy -force "${destroot}${prefix}/include/wx/stedit/setup0.h" \
			              "${destroot}${prefix}/include/wx/stedit/setup.h" }


platform macosx {}
if { ([variant_isset macosx] || ([info exists os.subplatform] && ${os.subplatform} == "macosx"))
     && ![variant_isset x11] } {
    default_variants +aqua
} else {
    default_variants +x11
}

if { ([variant_isset macosx] || ([info exists os.subplatform] && ${os.subplatform} == "macosx")) } {
variant aqua conflicts x11 description "Use the wxMac port of wxWidgets" {
depends_lib		port:wxWidgets
# wxWidgets is not 64-bit
supported_archs i386 ppc
}
}

variant x11 description "Use the wxGTK port of wxWidgets" {
# wxgtk is not universal
universal_variant	no
depends_lib		port:wxgtk
}

livecheck.distname	wxStEdit
#			abusing the SourceForge file release system, with "Components":
livecheck.url		http://sourceforge.net/export/rss2_projnews.php?project=wxcode
livecheck.regex		<title>${livecheck.distname} (.*) \[rR\]eleased.*</title>
