# -*- 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 82378 2011-08-12 23:42:49Z jmr@macports.org $

PortSystem          1.0

name                php5-gtk
version             2.0.1
categories          php x11
maintainers         kix.in:anant
homepage            http://gtk.php.net/
distname            php-gtk-${version}
platforms           darwin freebsd

description \
	PHP-GTK: Gtk+ bindings for PHP 5.

long_description \
	PHP-GTK is a Gtk+ bindings for the PHP 5 scripting \
	language, allowing you to build rich, cross-platform \
	desktop applications using PHP.

master_sites \
	http://gtk.php.net/distributions/ 

checksums \
	md5 d57ce885f32749320765e01c079e113b \
    sha1 a4f42c715b51554c1322de4beb3054012ec58696 \
    rmd160 2e305f45d95a2c1abbe8cd551c794823dfc3d919

depends_build \
	port:pkgconfig
depends_lib \
	port:gtk2 \
	path:bin/php:php5 \
	port:libglade2

configure.args \
	--disable-glibtest \
	--disable-gtktest

variant extra {
	depends_lib-append \
		port:gtk2-extra
	configure.args-append \
		--with-extra
}

variant html {
	depends_lib-append \
		port:libgtkhtml3
	configure.args-append \
		--with-html
}

variant libsexy {
	depends_lib-append \
		port:libsexy
	configure.args-append \
		--with-libsexy
}

variant sourceview {
	depends_lib-append \
		port:gtksourceview
	configure.args-append \
		--with-sourceview
}

variant spell {
	depends_lib-append \
		port:gtkspell2
	configure.args-append \
		--with-spell
}

configure.args  --enable-scintilla

pre-configure {
	system "cd ${worksrcpath} && ./buildconf"
}

use_parallel_build  yes

destroot.destdir    INSTALL_ROOT=${destroot}

post-destroot {
	set docdir ${prefix}/share/doc/${distname}
	xinstall -d ${destroot}${docdir}

	xinstall -m 644 -W ${worksrcpath} \
		README README.KNOWN-ISSUES NEWS AUTHORS \
		${destroot}${docdir}
}

post-install {
	ui_msg "\nIf this is your first install, you might want to enable PHP-GTK in the"
	ui_msg "ini file. Append the line: extension=php_gtk2.so to ${prefix}/etc/php.ini\n"
}

livecheck.name  php-gtk
