# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 82000 2011-08-06 19:12:46Z jmr@macports.org $

PortSystem      1.0

name            py26-webkitgtk
version         1.1.8
revision        1
categories      python www
description     Python bindings for the WebKit GTK+ port
long_description ${description}
maintainers     nodamage.com:nodamage openmaintainer
homepage        http://code.google.com/p/pywebkitgtk/

platforms       darwin
depends_build   port:pkgconfig
depends_lib     port:webkit-gtk port:python26 port:py26-gtk port:libffi

distname        pywebkitgtk-${version}
master_sites    http://pywebkitgtk.googlecode.com/files/

checksums       md5     158335385354ba38090c9324b37bf225 \
                sha1    74ff2222d9aa9af6ab0aa4279b28dd2b26f5824e \
                rmd160  e857939e65a9a409390f1fd256310988f592935f

set python_prefix ${frameworks_dir}/Python.framework/Versions/2.6

configure.pre_args-delete  --prefix=${prefix}
configure.pre_args-append  --prefix=${python_prefix}
configure.args-append      --includedir=${python_prefix}/include/python2.6
configure.pkg_config_path  ${python_prefix}/lib/pkgconfig
configure.env-append PYGOBJECT_CODEGEN=${python_prefix}/bin/pygobject-codegen-2.0

configure.python    ${prefix}/bin/python2.6

post-destroot {
	# Add a .pth file pointing to the proper location
	# See: http://code.google.com/p/pywebkitgtk/issues/detail?id=38
	system "echo webkit-1.0 > ${destroot}${python_prefix}/lib/python2.6/site-packages/webkit.pth"
}

livecheck.type  regex
livecheck.url   ${homepage}
livecheck.regex pywebkitgtk-(\\d+.\\d+\\.\\d+)
