# $Id: Portfile 82586 2011-08-16 09:40:17Z ryandesign@macports.org $

PortSystem 1.0
PortGroup app 1.0

name			wap11gui
version			0.12
revision		12
categories		net
maintainers		nomaintainer
description		Linksys WAP11 Unix Configuration Utility
long_description	QT based SNMP client you can use to configure a \
					Linksys WAP11, similar to the one provided by the \
					Linksys client.  Supports most of the WAP11's \
					features.
platforms		darwin
homepage		http://wap11gui.sourceforge.net/
master_sites	sourceforge
checksums		md5 0fbf23ff6112d922daa984cf85871e53

depends_lib		port:jpeg \
				port:net-snmp \
				port:libpng \
				path:include/qt3/private/qt_x11_p.h:qt3 \
				port:openssl \
				port:zlib

patchfiles		patch-configure \
				patch-Makefile.in \
				patch-wap11gui-Makefile.in \
				patch-wap11gui-wap11config.cpp

platform darwin {
	if {[file isfile ${prefix}/include/qt3/qt_mac.h] || \
		![file isfile ${prefix}/include/qt3/private/qt_x11_p.h]} {
		depends_lib-delete	path:include/qt3/private/qt_x11_p.h:qt3
		depends_lib-append	path:include/qt3/qt_mac.h:qt3-mac
		supported_archs i386 ppc
		
		app.name		WAP11GUI
		app.executable	${worksrcpath}/${name}/${name}
		app.icon		${filespath}/wap11.icns
		
		post-destroot {
			delete ${destroot}${prefix}/bin/${name}
		}
	} else {
		app.create		no
	}

	patchfiles-append	patch-admin-ltmain.sh \
						patch-wap11gui-wap11config.h
}

configure.args	--with-extra-includes='${prefix}/include' \
				--with-extra-libs='${prefix}/lib' \
				--with-qt-dir='${prefix}' \
				--with-qt-includes='${prefix}/include/qt3' \
				--with-mibsdir=${prefix}/share/snmp/mibs \
				--without-xinerama \
				--disable-warnings \
				--disable-debug
configure.cflags-append	'-I${prefix}/include'
configure.cxxflags-append '-I${prefix}/include'
