2000-07-31 21:28:41 +02:00
|
|
|
# ex:ts=8
|
|
|
|
# Ports collection makefile for: vim
|
|
|
|
# Date created: Sat June 29, 1996
|
|
|
|
# Whom: David O'Brien (obrien@cs.ucdavis.edu)
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME?= vim
|
2002-02-05 16:59:59 +01:00
|
|
|
PATCHLEVEL= 185
|
2002-01-24 13:54:15 +01:00
|
|
|
PORTVERSION= 6.0.${PATCHLEVEL}
|
2001-09-28 17:08:34 +02:00
|
|
|
PORTREVISION?= 0
|
2000-09-26 16:48:33 +02:00
|
|
|
CATEGORIES?= editors
|
2001-09-28 17:08:34 +02:00
|
|
|
MASTER_SITES= ftp://nuxi.ucdavis.edu/pub/vim/unix/ \
|
|
|
|
ftp://ftp.nuxi.com/pub/vim/unix/ \
|
|
|
|
ftp://ftp.vim.org/pub/vim/unix/ \
|
|
|
|
ftp://ftp.is.co.za/applications/editors/vim/unix/ \
|
|
|
|
ftp://ftp.prz.tu-berlin.de/pub/unix/editors/vim/unix/ \
|
|
|
|
ftp://ftp.mirror.ac.uk/sites/ftp.vim.org/pub/vim/unix/ \
|
|
|
|
ftp://ftp.progsoc.uts.edu.au/pub/vim/unix/
|
2001-09-29 21:30:56 +02:00
|
|
|
DISTNAME= vim-${PORTVERSION:C/\.[0-9]*$//}
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2001-09-22 20:15:53 +02:00
|
|
|
PATCH_SITES= ${MASTER_SITES:S/unix/patches/}
|
2002-01-24 13:54:15 +01:00
|
|
|
PATCHFILES!= p=0 ; \
|
|
|
|
while [ $$p -le ${PATCHLEVEL} ] ; do \
|
|
|
|
printf "${PORTVERSION:C/\.[0-9]*$//}.%03d " $$p ; \
|
|
|
|
p=$$(($$p + 1)) ; \
|
|
|
|
done
|
2002-01-24 12:47:53 +01:00
|
|
|
# bits to remove
|
2002-02-05 16:59:59 +01:00
|
|
|
BADPATCHES= 000 012 027 035 048 053 064 070 073 087 093 106 107 115 116 117 119 121 122 123 125 135 137 138 161 162 164 165 179
|
2002-01-24 12:47:53 +01:00
|
|
|
.for p in ${BADPATCHES}
|
|
|
|
PATCHFILES:= ${PATCHFILES:N6.0.${p}}
|
2001-12-16 15:58:32 +01:00
|
|
|
.endfor
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2001-03-11 01:05:13 +01:00
|
|
|
MAINTAINER?= obrien@FreeBSD.org
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2001-11-07 02:00:24 +01:00
|
|
|
SLAVEDIRS= editors/vim-lite
|
|
|
|
|
2000-07-31 21:28:41 +02:00
|
|
|
.if defined(PACKAGE_BUILDING) && !defined(LITE)
|
2000-09-26 16:48:33 +02:00
|
|
|
BUILD_DEPENDS= tclsh8.0:${PORTSDIR}/lang/tcl80
|
2000-07-31 21:28:41 +02:00
|
|
|
LIB_DEPENDS= tcl80.1:${PORTSDIR}/lang/tcl80
|
|
|
|
USE_PERL5= yes
|
2000-09-26 16:48:33 +02:00
|
|
|
USE_PYTHON= yes
|
2000-07-31 21:28:41 +02:00
|
|
|
.endif
|
|
|
|
|
2001-05-10 02:40:33 +02:00
|
|
|
USE_BZIP2= yes
|
2000-07-31 21:28:41 +02:00
|
|
|
DIST_SUBDIR= vim
|
2001-09-29 21:30:56 +02:00
|
|
|
WRKSRC= ${WRKDIR}/vim${PORTVERSION:C/\.[0-9]*$//:S/.//g}/src
|
|
|
|
PATCH_DIST_ARGS= -d ${WRKDIR}/${PORTNAME}${PORTVERSION:C/\.[0-9]*$//:S/.//g} --forward --quiet -E ${PATCH_DIST_STRIP}
|
2001-10-30 19:56:02 +01:00
|
|
|
# consider
|
|
|
|
#PATCH_DIST_ARGS= -t
|
2001-11-09 17:13:25 +01:00
|
|
|
MAKE_ARGS+= CONF_ARGS="--prefix=${PREFIX} --with-tlib=termlib ${CSCOPE_ARG}"
|
2000-07-31 21:28:41 +02:00
|
|
|
ALL_TARGET= #
|
|
|
|
PLIST_SUB= VIM_VER=${DISTNAME:S/-//:S/.//}
|
2001-12-03 08:13:35 +01:00
|
|
|
DATADIR= ${PREFIX}/share/vim/${DISTNAME:S/-//:S/.//}
|
2001-08-21 21:51:09 +02:00
|
|
|
MAN1= evim.1 vim.1 vimdiff.1 vimtutor.1 xxd.1
|
2000-10-16 22:50:47 +02:00
|
|
|
MLINKS= vim.1 rvim.1 vim.1 rview.1
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2000-10-05 08:47:41 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2000-07-31 21:28:41 +02:00
|
|
|
.if !defined(LITE)
|
2001-08-21 21:51:09 +02:00
|
|
|
MLINKS+= vim.1 gvim.1 vim.1 gview.1 vim.1 rgvim.1 vim.1 rgview.1 \
|
|
|
|
eview.1 gvimdiff.1
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2001-10-24 19:24:00 +02:00
|
|
|
MAKE_ARGS+= CONF_OPT_FEAT="--with-features=big"
|
2001-02-15 13:18:48 +01:00
|
|
|
I18N= CONF_OPT_MULTIBYTE="--enable-multibyte --enable-fontset --enable-xim"
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2001-05-01 00:39:13 +02:00
|
|
|
.if defined(NO_GUI)
|
|
|
|
WITHOUT_X11= yes
|
|
|
|
.endif
|
|
|
|
|
2001-11-09 17:13:25 +01:00
|
|
|
.if defined(WITH_CSCOPE)
|
|
|
|
RUN_DEPENDS+= cscope:${PORTSDIR}/devel/cscope
|
|
|
|
CSCOPE_ARG= --enable-cscope
|
|
|
|
.endif
|
|
|
|
|
2001-05-01 00:39:13 +02:00
|
|
|
.if !defined(WITHOUT_X11)
|
2001-04-26 17:36:46 +02:00
|
|
|
# for now default the GUI to the GTK+ one
|
|
|
|
# will be reviewed when the GTK+ 1.{3,4} behemoth is released
|
|
|
|
.if !defined(WITH_ATHENA) && !defined(WITH_GTK) && !defined(WITH_MOTIF)
|
|
|
|
WITH_GTK= yes
|
|
|
|
.endif
|
|
|
|
|
2000-12-05 18:24:26 +01:00
|
|
|
.if defined(WITH_ATHENA)
|
2001-02-15 13:18:48 +01:00
|
|
|
MAKE_ARGS+= CONF_OPT_GUI="--enable-gui=athena" ${I18N}
|
2000-12-19 20:58:07 +01:00
|
|
|
.elif defined(WITH_GTK)
|
2001-02-16 08:02:29 +01:00
|
|
|
USE_GTK= yes
|
2001-02-15 13:18:48 +01:00
|
|
|
MAKE_ARGS+= CONF_OPT_GUI="--enable-gui=gtk --with-gtk-prefix=${X11BASE}" ${I18N}
|
2000-12-19 20:58:07 +01:00
|
|
|
MAKE_ARGS+= X_LIBS="$(X_LIBS) -lXt"
|
2001-04-26 17:36:46 +02:00
|
|
|
.elif defined(WITH_MOTIF)
|
2000-11-08 00:28:20 +01:00
|
|
|
USE_MOTIF= yes
|
2001-02-15 13:18:48 +01:00
|
|
|
MAKE_ARGS+= CONF_OPT_GUI="--enable-gui=motif --with-motif-lib=\"${MOTIFLIB}\"" MOTIFHOME=${X11BASE} ${I18N}
|
2000-07-31 21:28:41 +02:00
|
|
|
.endif
|
2001-05-01 00:39:13 +02:00
|
|
|
.else # WITHOUT_X11
|
2001-12-06 01:05:34 +01:00
|
|
|
MAKE_ARGS+= CONF_OPT_GUI="--enable-gui=no --without-x" ${I18N}
|
2001-05-01 00:39:13 +02:00
|
|
|
.endif # WITHOUT_X11
|
2000-07-31 21:28:41 +02:00
|
|
|
|
|
|
|
.if defined(PACKAGE_BUILDING)
|
2000-09-26 16:48:33 +02:00
|
|
|
MAKE_ARGS+= CONF_OPT_PERL="--enable-perlinterp --enable-pythoninterp --enable-tclinterp --enable-cscope"
|
2000-07-31 21:28:41 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.else # LITE
|
2001-11-07 02:00:24 +01:00
|
|
|
PKGNAMESUFFIX= -lite
|
2001-11-01 20:39:28 +01:00
|
|
|
MAKE_ARGS+= CONF_OPT_GUI="--enable-gui=no --without-x --enable-multibyte"
|
2000-09-26 16:48:33 +02:00
|
|
|
MAKE_ARGS+= CONF_OPT_PERL="--disable-perlinterp --disable-pythoninterp --disable-tclinterp"
|
2000-07-31 21:28:41 +02:00
|
|
|
.endif # LITE
|
|
|
|
|
|
|
|
pre-build:
|
|
|
|
@(cd ${WRKSRC}; ${MAKE} distclean)
|
|
|
|
|
|
|
|
post-install:
|
2001-04-15 09:33:31 +02:00
|
|
|
[ -e ${PREFIX}/bin/gvim ] || (cd ${PREFIX}/bin ; ${LN} -sf vim gvim)
|
2001-08-21 21:51:09 +02:00
|
|
|
# below needed for `vim-lite' port
|
2002-01-29 11:34:23 +01:00
|
|
|
${TEST} -e ${PREFIX}/bin/rgvim || (cd ${PREFIX}/bin ; ${LN} -s vim rgvim)
|
|
|
|
${TEST} -e ${PREFIX}/bin/gview || (cd ${PREFIX}/bin ; ${LN} -s vim gview)
|
|
|
|
${TEST} -e ${PREFIX}/bin/rgview || (cd ${PREFIX}/bin ; ${LN} -s vim rgview)
|
|
|
|
${TEST} -e ${PREFIX}/bin/evim || (cd ${PREFIX}/bin ; ${LN} -s vim evim)
|
|
|
|
${TEST} -e ${PREFIX}/bin/eview || (cd ${PREFIX}/bin ; ${LN} -s vim eview)
|
|
|
|
${TEST} -e ${PREFIX}/bin/gvimdiff \
|
2001-11-01 20:44:26 +01:00
|
|
|
|| (cd ${PREFIX}/bin ; ${LN} -s vim gvimdiff)
|
2001-12-03 08:13:35 +01:00
|
|
|
${INSTALL_DATA} ${FILESDIR}/vietnamese_viscii.vim ${DATADIR}/keymap
|
2001-05-24 03:19:05 +02:00
|
|
|
cd ${PREFIX} ;\
|
2002-01-29 11:34:23 +01:00
|
|
|
${FIND} share/vim/${DISTNAME:S/-//:S/.//}/ -type f -o -type l \
|
2001-05-24 03:19:05 +02:00
|
|
|
| sort \
|
|
|
|
>${WRKDIR}/PLIST.share-vim
|
|
|
|
cd ${PREFIX} ;\
|
2002-01-29 11:34:23 +01:00
|
|
|
${FIND} share/vim/${DISTNAME:S/-//:S/.//}/ -type d \
|
2001-05-24 03:19:05 +02:00
|
|
|
| sort -r | ${SED} -e 's/^/@dirrm /g' \
|
|
|
|
>>${WRKDIR}/PLIST.share-vim
|
2002-01-29 11:34:23 +01:00
|
|
|
${ECHO_CMD} "r ${TMPPLIST}" > ${WRKDIR}/ex.script
|
|
|
|
${ECHO_CMD} "/Insert PLIST.share-vim" >> ${WRKDIR}/ex.script
|
|
|
|
${ECHO_CMD} "d" >> ${WRKDIR}/ex.script
|
|
|
|
${ECHO_CMD} "r ${WRKDIR}/PLIST.share-vim" >> ${WRKDIR}/ex.script
|
|
|
|
${ECHO_CMD} "x!" >> ${WRKDIR}/ex.script
|
2001-05-24 03:19:05 +02:00
|
|
|
${CP} -p ${TMPPLIST} ${TMPPLIST}.pre-share-vim
|
|
|
|
cd ${WRKDIR} ; ex < ex.script
|
2000-07-31 21:28:41 +02:00
|
|
|
|
2000-10-05 08:47:41 +02:00
|
|
|
.include <bsd.port.post.mk>
|