# $Id: Portfile 99155 2012-10-28 20:31:06Z jeremyhu@macports.org $

PortSystem 1.0

name		midori
version		0.4.7
categories	www
description	Midori is a lightweight web browser
long_description	${description}
homepage	http://www.twotoasts.de/index.php?/pages/midori_summary.html
platforms	darwin
license		MIT
maintainers	afb openmaintainer

set branch              [join [lrange [split ${version} .] 0 1] .]
master_sites	http://archive.xfce.org/src/apps/midori/${branch}
use_bzip2	yes

checksums           sha1    f32b1dc76061de3cefc222d779a7d6441b92a4fa \
                    rmd160  72b0cf1290ed2a6c5e306b9b2dbb1ad4ce565860 \
                    sha256  65bf9976733597c405492ce91aa664fd10547cb7df16e0a70f260c7a3e97ea5d

patchfiles	patch-wscript.diff

		# glib 2.16.5 or later is required:
depends_lib	port:gtk2 path:include/gio/gio.h:glib2 \
		port:webkit-gtk lib:libxml2:libxml2 \
		port:pkgconfig port:intltool \
		port:libunique  port:libnotify port:vala
                # last line is optional

# Not autoconf
configure.env-append	LINKFLAGS="-L${prefix}/lib"
configure.universal_args-delete --disable-dependency-tracking

platform darwin {
	configure.env-append  PYTHON=/usr/bin/python 
	patchfiles-append patch-extensions-wscript_build.diff \
	                  patch-wscript-darwin-options.diff
}

variant quartz description {Disable libnotify support (doesn't work with gtk2+quartz)} {
	depends_lib-delete	port:libnotify
	configure.args-append 	--disable-libnotify
}

livecheck.url   ${homepage}
livecheck.regex ${name}-(\[0-9.a-z\]*)\.tar\.bz2
livecheck.type  regexm
