151 lines
4.1 KiB
Makefile
151 lines
4.1 KiB
Makefile
# $OpenBSD: Makefile,v 1.129 2013/03/26 08:12:35 sthen Exp $
|
|
|
|
COMMENT-main= vi clone, many additional features
|
|
COMMENT-lang= vi clone, NLS subpackage
|
|
|
|
VERSION= 7.3.850
|
|
DISTNAME= vim-${VERSION}
|
|
PKGNAME-main= vim-${VERSION}
|
|
PKGNAME-lang= vim-lang-${VERSION}
|
|
REVISION-lang= 2
|
|
P= vim${VERSION:R:S/.//}
|
|
CATEGORIES= editors
|
|
# Upstream's normal distribution (http://ftp.vim.org/pub/vim/unix/) consists
|
|
# of a relatively old tar, plus hundreds of patches, many of which require
|
|
# gnu patch. Port is using a distribution produced by the hgtar target below.
|
|
MASTER_SITES= http://spacehopper.org/mirrors/
|
|
EXTRACT_SUFX= .tar.bz2
|
|
|
|
HOMEPAGE= http://www.vim.org/
|
|
MAINTAINER= Chris Kuethe <ckuethe@openbsd.org>
|
|
|
|
# allow vim to build on vax?
|
|
.if (${MACHINE_ARCH} == "vax")
|
|
PATCH_LIST= patch-* sup-vax-*
|
|
.endif
|
|
|
|
# donation-ware
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
WANTLIB += c curses
|
|
|
|
USE_GROFF = Yes
|
|
MULTI_PACKAGES= -main -lang
|
|
|
|
FULLPKGNAME-lang= vim-lang-${VERSION}
|
|
FULLPKGPATH-lang= ${PKGPATH},-lang
|
|
|
|
FLAVORS= huge gtk2 athena motif no_x11 perl python ruby
|
|
FLAVOR?= gtk2
|
|
|
|
CONFIGURE_STYLE=gnu
|
|
CONFIGURE_ENV= CPPFLAGS="-I${DEPBASE}/include" \
|
|
LDFLAGS="-L${DEPBASE}/lib"
|
|
CONFIGURE_ARGS+= --with-tlib="curses" \
|
|
--enable-multibyte \
|
|
--enable-cscope
|
|
|
|
.if ${FLAVOR:Mhuge}
|
|
CONFIGURE_ARGS+= --with-features=huge
|
|
.endif
|
|
|
|
.if ${FLAVOR:Mperl}
|
|
CONFIGURE_ARGS+= --enable-perlinterp
|
|
WANTLIB+= m perl util
|
|
.endif
|
|
|
|
.if ${FLAVOR:Mpython}
|
|
MODULES+= lang/python
|
|
CONFIGURE_ENV+= vi_cv_path_python=${MODPY_BIN}
|
|
CONFIGURE_ARGS+= --enable-pythoninterp \
|
|
--with-python-config-dir=${MODPY_LIBDIR}/config
|
|
LIB_DEPENDS+= ${MODPY_LIB_DEPENDS}
|
|
WANTLIB+= m pthread util ${MODPY_WANTLIB}
|
|
.endif
|
|
|
|
.if ${FLAVOR:Mruby}
|
|
MODULES+= lang/ruby
|
|
MODRUBY_REV= 1.8
|
|
CONFIGURE_ARGS+= --enable-rubyinterp
|
|
MAKE_ENV+= RUBY="${RUBY}"
|
|
LIB_DEPENDS+= ${MODRUBY_LIB_DEPENDS}
|
|
WANTLIB+= m ${MODRUBY_WANTLIB}
|
|
.endif
|
|
|
|
.if ${FLAVOR:Mno_x11} && \
|
|
!${FLAVOR:Mmotif} && !${FLAVOR:Mathena} && !${FLAVOR:Mgtk2}
|
|
CONFIGURE_ARGS+= --disable-gui \
|
|
--without-x
|
|
WANTLIB+= m
|
|
.elif ${FLAVOR:Mmotif} && \
|
|
!${FLAVOR:Mno_x11} && !${FLAVOR:Mathena} && !${FLAVOR:Mgtk2}
|
|
CONFIGURE_ARGS+= --enable-gui="motif" \
|
|
--enable-fontset \
|
|
--enable-xim \
|
|
--with-x
|
|
CONFIGURE_ENV+= MOTIFHOME=${X11BASE}
|
|
LIB_DEPENDS+= x11/openmotif
|
|
WANTLIB += m ICE SM X11 Xmu Xpm Xt Xm
|
|
MAKE_ENV+=MOTIFLIB='-L${LOCALBASE}/lib -lXm'
|
|
.elif ${FLAVOR:Mathena} && \
|
|
!${FLAVOR:Mno_x11} && !${FLAVOR:Mmotif} && !${FLAVOR:Mgtk2}
|
|
CONFIGURE_ARGS+= --enable-gui="athena" \
|
|
--enable-fontset \
|
|
--enable-xim \
|
|
--with-x
|
|
WANTLIB += m ICE SM X11 Xaw Xmu Xpm Xt
|
|
.elif ${FLAVOR:Mgtk2} && \
|
|
!${FLAVOR:Mmotif} && !${FLAVOR:Mno_x11} && !${FLAVOR:Mathena}
|
|
MAKE_FLAGS+= 'LDFLAGS=-pthread'
|
|
MAKE_FLAGS+= 'CFLAGS=-pthread'
|
|
LIB_DEPENDS+= x11/gtk+2
|
|
CONFIGURE_ARGS+= --enable-gui="gtk2" \
|
|
--disable-gtk-check \
|
|
--enable-fontset \
|
|
--enable-gtk2-check \
|
|
--enable-xim \
|
|
--with-x
|
|
WANTLIB += ICE SM X11 Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes
|
|
WANTLIB += Xi Xinerama Xpm Xrandr Xrender Xt atk-1.0 cairo expat
|
|
WANTLIB += fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0
|
|
WANTLIB += glib-2.0 gobject-2.0 gtk-x11-2.0 m pango-1.0 pangocairo-1.0
|
|
WANTLIB += pangoft2-1.0 pthread z
|
|
.else
|
|
ERRORS= "Fatal: You must select one GUI interface: no_x11, gtk2, athena or motif"
|
|
.endif
|
|
|
|
RUN_DEPENDS-lang= editors/vim,-main
|
|
PKG_ARCH-lang= *
|
|
LIB_DEPENDS-lang=
|
|
WANTLIB-lang=
|
|
MODULES+= devel/gettext
|
|
|
|
WRKSRC= ${WRKDIST}/src
|
|
SUBST_VARS= P
|
|
|
|
# don't try to regenerate the configure script. Works around the fact that
|
|
# auto/configure.in is newer than auto/configure.
|
|
post-patch:
|
|
touch ${WRKBUILD}/auto/configure
|
|
|
|
post-configure:
|
|
touch ${WRKBUILD}/auto/config.mk
|
|
|
|
post-install:
|
|
${INSTALL_DATA} ${FILESDIR}/pf.vim ${FILESDIR}/openbsd.vim \
|
|
${PREFIX}/share/vim/${P}/syntax/
|
|
|
|
# convenience targets
|
|
hg:
|
|
mkdir -p ${FULLDISTDIR}/hg
|
|
cd ${FULLDISTDIR}/hg; [ -d vim ] || hg clone \
|
|
https://vim.googlecode.com/hg/ vim
|
|
cd ${FULLDISTDIR}/hg/vim; hg pull; hg update
|
|
|
|
tar:
|
|
cd ${FULLDISTDIR}/hg/vim && F=${FULLDISTDIR}/vim-${VERSION:R}.`grep -A2 'Add new patch number' ${FULLDISTDIR}/hg/vim/src/version.c | tail -1 | sed 's/[ ,]//g'`${EXTRACT_SUFX}; hg archive $$F -X ".hg*" && ls -l $$F
|
|
|
|
hgtar: hg tar
|
|
|
|
.include <bsd.port.mk>
|