# $Id: Portfile,v 1.28 2006/03/31 18:48:39 matt Exp $

PortSystem 1.0
name			sylpheed
version			2.2.3
categories		mail
maintainers		mij@opendarwin.org
description		Fast, lightweight GTK+ mail client
homepage		http://sylpheed.good-day.net/
platforms		darwin

long_description	Sylpheed is a fast, lightweight email client written \
			in GTK+.  The appearance and interface are similar to \
			popular Windows clients, such as Outlook Express, \
			Becky!, and Datula.

master_sites    	http://sylpheed.good-day.net/sylpheed/v2.2/

checksums		md5 4fe29639ac4f628f348120361310e0af \
			sha1 ec11e9544110b9b883d544688f192b254fd1dcfe \
			rmd160 1c425f3873c8d6bcd8a33cc375d09b759a4af17a

use_bzip2		yes

depends_lib		lib:libgtk.2:gtk2

pre-configure {		reinplace "s|-traditional-cpp|-no-cpp-precomp|g" \
				${worksrcpath}/configure
			}

configure.env		LDFLAGS="-L${prefix}/lib" \
			CPPFLAGS="-I${prefix}/include" \
			CFLAGS="-O3 \
				-fstrict-aliasing \
				-funroll-loops \
				-pipe \
				-bind_at_load \
				-multiply_defined suppress"

configure.args		--disable-compface \
			--disable-jpilot \
			--disable-gdk-pixbuf \
			--disable-ipv6 \
			--disable-ssl \
			--disable-gtkspell

post-destroot {		set docpath ${destroot}${prefix}/share/doc/${name}
			file mkdir ${docpath}
			foreach f {AUTHORS ChangeLog* COPYING* LICENSE NEWS* README* TODO*} {
				eval file copy [glob ${worksrcpath}/${f}] ${docpath}
			}
		}
			

variant ssl {		depends_lib-append	lib:libssl.0.9:openssl
			configure.args-delete	--disable-ssl
			configure.args-append	--enable-ssl
			}

variant gpg {		depends_lib-append	lib:libgpgme:gpgme
			configure.args-append	--enable-gpgme \
						--with-gpgme-prefix=${prefix}
			}

variant ipv6 {		configure.args-delete	--disable-ipv6 
			configure.args-append	--enable-ipv6
			}

variant gdk {		depends_lib-append	lib:libgdk-pixbuf:gdk-pixbuf
			configure.args-delete	--disable-gdk-pixbuf
			configure.args-append	--enable-gdk-pixbuf
			}

variant ldap		{ configure.args-append	--enable-ldap }

variant gtkspell {      depends_lib-append      lib:libgtkspell:gtkspell2
			configure.args-delete	--disable-gtkspell
                        configure.args-append   --enable-gtkspell
			}

variant compface {      depends_lib-append      port:compface
                        configure.args-delete   --disable-compface
			configure.args-append   --enable-compface
			}

