PortSystem      1.0

name            nvi
version         1.81.6
revision        6
categories      editors
license         BSD
maintainers     nomaintainer
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    ftp://ftp.stack.nl/pub/users/johans/nvi/
checksums       md5 88d1e23115ee9f2961186b62e55f5704 \
                rmd160 0db8568bea96392d9a027044177c60317c8ade36 \
                sha256 3441b8e3247b2b6dd19b5fd38355fe6593b2a92e960ecb3dd00d676f63d06b59
use_bzip2       yes

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

set my_db_version db48

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 \
    patch-includes.diff \
    patch-common_msg.c \
    patch-powerof2.diff

configure.args \
    --program-prefix=n \
    --without-x \
    --mandir=${prefix}/share/man \
    vi_cv_path_preserve=/var/tmp/vi.recover

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
}
