# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 57453 2009-09-11 08:17:15Z ryandesign@macports.org $

PortSystem			1.0

name				mlterm
version				2.9.4
revision                        1
categories			x11
maintainers			nomaintainer
description			Multi-lingual X11 terminal emulator
long_description \
	mlterm is a multi-lingual terminal emulator written from scratch, which \
	supports various character sets and encodings in the world and complex \
	characters such as double width for East Asian, combining for Thai, \
	Vietnamese, and so on, and bi-direction for Arabic and Hebrew.  Indic \
	scripts in ISCII encoding are experimentally supported using libind \
	library.  It also supports various unique feature such as anti-alias \
	using FreeType, multiple XIM, multiple windows, scrollbar API, scroll by \
	mouse wheel, automatic selection of encoding, daemon mode, and so on.

platforms			darwin

homepage			http://mlterm.sourceforge.net/
master_sites		sourceforge

checksums			md5     67fc33f09da045f86b0d4ceebed76aac \
					sha1    cb2ac8ea34609e387e87bac8198a3256c6cc215f \
                    rmd160  7267ab5f413571611c6b568b5bac5cea41123d92

universal_variant no

depends_lib \
	port:xorg-libsm \
	port:Xft2

patchfiles			patch-kik_pty_streams.c.diff

use_autoconf		yes

pre-configure {
	system "cd ${worksrcpath}/kiklib && autoconf"
	system "cd ${worksrcpath}/mkf && autoconf"
}
configure.cppflags-append -D_DARWIN_C_SOURCE=1
configure.args		--mandir=${prefix}/share/man

post-destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	eval file copy [glob ${worksrcpath}/doc/*] \
		${destroot}${prefix}/share/doc/${name}
}

variant antialias description {Enable antialiasing support} {
	depends_lib-append		port:freetype
	configure.args-append	--enable-anti-alias
}

variant bidi description {Enable bidirectional support} {
	depends_lib-append		port:fribidi
	configure.args-append	--enable-fribidi
}

variant bgImages description {Enable background image support} {
	depends_lib-append		port:imlib
	configure.args-append	--with-imagelib=imlib
}

# auto-detected, so no configure.args changes
# this really needs to be disabled by default in case gtk2 happens to be
# installed when the variant is not selected
variant gtk2 description {Enable building of mlconfig and mlterm-menu} {
	depends_lib-append		port:gtk2
}
