# $Id: Portfile 50980 2009-05-14 19:41:55Z and.damore@macports.org $

PortSystem 1.0

name            efte
version         0.96
revision	3
categories      editors
platforms       darwin
maintainers     reiffert openmaintainer
description     configurable programmers editor
long_description \
    eFTE is a lightweight, extendable, folding text editor \
    geared toward the programmer. eFTE is a fork of FTE with goals of \
    taking FTE to the next step, hence, Enhanced FTE.

homepage        http://efte.sourceforge.net
master_sites    http://downloads.sourceforge.net/sourceforge/efte/
checksums       efte-${version}.tar.gz md5 ae60a3056e73d4655569f455e4c6283e
depends_build\
	bin:cmake:cmake \
	port:xorg-libsm \
	port:xorg-libXext \
	port:xpm

configure.args  -DCMAKE_BUIL_TYPE=Release \
                -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
                -DUSE_GPM=OFF -DBUILD_CONSOLE=ON -DBUILD_X=ON

configure {
    system "cd ${worksrcpath} && ${configure.env} cmake ${configure.args} ${worksrcpath}"
}

variant no_x11 {
    depends_build-delete    port:xorg-libsm port:xorg-libXext port:xpm
    configure.args-append   "-DBUILD_X=OFF"
    configure.args-delete   "-DBUILD_X=ON"
}

post-destroot {
    system "cd ${destroot}${prefix}/share/efte && ../../bin/cefte config/mymain.fte system.fterc"
}
