# $Id: Portfile 83610 2011-09-07 09:19:18Z ryandesign@macports.org $

PortSystem      1.0

name            nvi
version         1.81.6
revision        1
categories      editors
maintainers     toby
description     A vi/ex clone

long_description \
    Nvi is an implementation of the ex/vi text editor originally \
    distributed as part of the Fourth Berkeley Software Distribution \
    (4BSD), by the University of California, Berkeley.

homepage        http://www.bostic.com/vi/
platforms       darwin
master_sites    http://www.kotnet.org/~skimo/nvi/devel/
checksums       md5 88d1e23115ee9f2961186b62e55f5704
use_bzip2       yes

configure.dir   ${worksrcpath}/dist
build.dir       ${configure.dir}

set my_db_version db47

depends_lib     port:ncurses port:${my_db_version}

patchfiles \
    patch-common__db.h \
    patch-common__key.h \
    patch-dist__port.h.in \
    patch-ex_script.c.diff

configure.args \
    --program-prefix=n \
    --without-x \
    --mandir=${prefix}/share/man

configure.cppflags-append \
    -I${prefix}/include/${my_db_version}
configure.ldflags-append \
    -L${prefix}/lib/${my_db_version}

variant x11 {
    configure.args-delete --without-x
    configure.args-append --with-x
}
