# $NetBSD: Makefile,v 1.30 2000/01/17 17:36:35 pooka Exp $

.include		"../vim-share/Makefile.common"

PKGNAME=		vim-${VIM_VERSION}

DEPENDS+=		vim-share-${VIM_VERSION}:../vim-share

CONFLICTS=		vim-xaw-* vim-gtk-*

CONFIGURE_ARGS+=	--enable-gui=no --without-x --with-tlib=ncurses
CPPFLAGS+=              -I${LOCALBASE}/include  # for ncurses' termcap.h
LDFLAGS+=               -L${LOCALBASE}/lib      # for -lncurses
CONFIGURE_ENV+=         CPPFLAGS="${CPPFLAGS}"

ALL_TARGET=		vim
INSTALL_TARGET=		installvimbin

.include "../../mk/bsd.prefs.mk"

.if (${OPSYS} == "NetBSD")
DEPENDS+=               ncurses>=4.2:../../devel/ncurses
.endif

post-install:
	${LN} -fs vim ${PREFIX}/bin/ex
	${LN} -fs vim ${PREFIX}/bin/view
	${LN} -fs vim ${PREFIX}/bin/rvim
	${LN} -fs vim ${PREFIX}/bin/rview

.include "../../mk/bsd.pkg.mk"