diff options
-rw-r--r-- | editors/vim/Makefile | 144 | ||||
-rw-r--r-- | editors/vim/options | 15 | ||||
-rw-r--r-- | editors/vim/pkg-plist | 40 |
3 files changed, 84 insertions, 115 deletions
diff --git a/editors/vim/Makefile b/editors/vim/Makefile index 6d53515ebc99..1afb5d8bdfdd 100644 --- a/editors/vim/Makefile +++ b/editors/vim/Makefile @@ -1,10 +1,5 @@ -# ex:ts=8 -# Ports collection makefile for: vim -# Date created: Sat June 29, 1996 -# Whom: David O'Brien (obrien@cs.ucdavis.edu) -# +# Created by: David O'Brien <obrien@cs.ucdavis.edu> # $FreeBSD$ -# PORTNAME?= vim # ! _NEVER_ reduce or lower PATCHLEVEL, even if the PATCHLEVEL @@ -33,10 +28,23 @@ COMMENT?= Vi "workalike", with many additional features SLAVEDIRS= editors/vim-lite -.if defined(WITH_OPTIONS) || defined(WITH_VIM_OPTIONS) -.include "${.CURDIR}/../vim/options" -.include <bsd.port.options.mk> +.if !defined(LITE) +OPTIONS_DEFINE= PERL PYTHON TCL LUA CSCOPE EXUBERANT_CTAGS \ + XTERM_SAVE RUBY NLS X11 +OPTIONS_RADIO= UI +OPTIONS_RADIO_UI= ATHENA GTK2 GNOME MOTIF + +UI_DESC= Graphical toolkit to use +ATHENA_DESC= Athena GUI toolkit +XTERM_SAVE_DESC= Restore xterm screen after exit +CSCOPE_DESC= cscope support +EXUBERANT_CTAGS_DESC= Use exctags instead of ctags +.if defined(PACKAGE_BUILDING) +OPTIONS_DEFAULT+= CSCOPE EXUBERANT_CTAGS PERL PYTHON RUBY \ + TCL LUA X11 GTK2 +.endif .endif +.include <bsd.port.options.mk> CONFLICTS= vim6* vim*-gnome libsysinfo .if defined(LITE) @@ -63,50 +71,44 @@ MLINKS= vim.1 rvim.1 vim.1 rview.1 MLINKS+= vim.1 gvim.1 vim.1 gview.1 vimdiff.1 gvimdiff.1 \ vim.1 rgvim.1 vim.1 rgview.1 evim.1 eview.1 .endif -.if !defined(WITHOUT_NLS) + +.if ${PORT_OPTIONS:MNLS} MANLANG= "" ru.KOI8-R ru.UTF-8 pl.ISO8859-2 pl.UTF-8 pl fr.ISO8859-1 \ fr.UTF-8 fr it.ISO8859-1 it.UTF-8 it +USE_GETTEXT= yes +PLIST_SUB= NLS="" +.else +MAKE_ARGS+= CONF_OPT_NLS="--disable-nls" +PLIST_SUB= NLS="@comment " .endif -.if defined(PACKAGE_BUILDING) && !defined(LITE) -WITH_CSCOPE= yes -WITH_EXUBERANT_CTAGS=yes -WITH_PERL= yes -WITH_PYTHON= yes -WITH_RUBY= yes -WITH_TCL= yes -WITH_LUA= yes -.endif - -.if defined(WITH_PYTHON) +.if ${PORT_OPTIONS:MPYTHON} USE_PYTHON= yes MAKE_ARGS+= CONF_OPT_PYTHON="--enable-pythoninterp" .endif -.if defined(WITH_RUBY) +.if ${PORT_OPTIONS:MRUBY} USE_RUBY= yes MAKE_ARGS+= CONF_OPT_RUBY="--enable-rubyinterp" .endif -.if defined(WITH_TCL) +.if ${PORT_OPTIONS:MTCL} USE_TCL= 85+ +MAKE_ARGS+= CONF_OPT_TCL="--enable-tclinterp --with-tclsh="${TCLSH:S/${LOCALBASE}\/bin\///g}"" .endif -.if defined(WITH_LUA) +.if ${PORT_OPTIONS:MLUA} USE_LUA= yes MAKE_ARGS+= CONF_OPT_LUA="--enable-luainterp=dynamic" \ MAKE_ARGS+= CONF_OPT_LUA_PREFIX="--with-lua-prefix=${LOCALBASE}" .endif -.if defined(WITH_PERL) -WANT_PERL= yes +.if ${PORT_OPTIONS:MPERL} +USE_PERL5= yes +MAKE_ARGS+= CONF_OPT_PERL="--enable-perlinterp" .endif -.if !defined(LITE) && !defined(NO_GUI) && !defined(WITHOUT_GUI) && !defined(WITHOUT_X11) && !defined(WITH_X11_ONLY) && !defined(WITH_ATHENA) && !defined(WITH_MOTIF) WANT_GNOME= yes -.endif - -.include <bsd.port.pre.mk> .if defined(LITE) PKGNAMESUFFIX= -lite @@ -115,73 +117,58 @@ MAKE_ARGS+= CONF_OPT_PERL="--disable-perlinterp --disable-pythoninterp --disable .else # !LITE MAKE_ARGS+= CONF_OPT_FEAT="--with-features=big" I18N= CONF_OPT_MULTIBYTE="--enable-multibyte --enable-fontset --enable-xim" +.endif -. if defined(NO_GUI) || defined(WITHOUT_GUI) -WITHOUT_X11= yes -. endif - -. if defined(WITH_CSCOPE) +.if ${PORT_OPTIONS:MCSCOPE} RUN_DEPENDS+= cscope:${PORTSDIR}/devel/cscope MAKE_ARGS+= CONF_OPT_CSCOPE="--enable-cscope" -. endif +.endif -. if defined(WITH_EXUBERANT_CTAGS) +.if ${PORT_OPTIONS:MEXUBERANT_CTAGS} RUN_DEPENDS+= exctags:${PORTSDIR}/devel/ctags -. endif +CTAGS_CMD= exctags -R . +.else +CTAGS_CMD= ${FIND} . -type f \\|${XARGS} ctags +.endif -. if defined(WITH_PERL) -USE_PERL5= yes -MAKE_ARGS+= CONF_OPT_PERL="--enable-perlinterp" -. endif +CONF_OPT_GUI="--enable-gui=no --without-x" -. if defined(WITH_TCL) -MAKE_ARGS+= CONF_OPT_TCL="--enable-tclinterp --with-tclsh="${TCLSH:S/${LOCALBASE}\/bin\///g}"" -. endif +.if ${PORT_OPTIONS:MX11} +CONF_OPT_GUI="--enable-gui=no --with-x" -. if !defined(WITHOUT_X11) -# for now default the GUI to the GTK+ one -. if !defined(WITH_X11_ONLY) && !defined(WITH_ATHENA) && !defined(WITH_MOTIF) && !defined(WITH_GNOME2) && !defined(WITH_GTK2) -WITH_GTK2= yes -. endif +. if ${PORT_OPTIONS:MATHENA} +CONF_OPT_GUI="--enable-gui=athena" +. endif -. if defined(WITH_ATHENA) -MAKE_ARGS+= CONF_OPT_GUI="--enable-gui=athena" ${I18N} -. elif defined(WITH_GTK2) +. if ${PORT_OPTIONS:MGTK2} USE_GNOME= gtk20 -MAKE_ARGS+= CONF_OPT_GUI="--enable-gui=gtk2 --with-gtk-prefix=${LOCALBASE}" ${I18N} +CONF_OPT_GUI="--enable-gui=gtk2 --with-gtk-prefix=${LOCALBASE}" MAKE_ARGS+= X_LIBS="$(X_LIBS) -lXt" USE_XORG+= xt -. elif defined(WITH_GNOME2) +. endif + +. if ${PORT_OPTIONS:MGNOME} USE_GNOME= libgnomeui PKGNAMESUFFIX= -gnome2 -MAKE_ARGS+= CONF_OPT_GUI="--enable-gui=gnome2" ${I18N} +CONF_OPT_GUI="--enable-gui=gnome2" MAKE_ARGS+= X_LIBS="$(X_LIBS) -lXt" USE_XORG+= xt glproto -. elif defined(WITH_MOTIF) +. endif + +. if ${PORT_OPTIONS:MMOTIF} USE_MOTIF= yes -MAKE_ARGS+= CONF_OPT_GUI="--enable-gui=motif --with-motif-lib=\"${MOTIFLIB}\"" MOTIFHOME=${LOCALBASE} ${I18N} -. elif defined(WITH_X11_ONLY) -MAKE_ARGS+= CONF_OPT_GUI="--enable-gui=no --with-x" ${I18N} -. endif -. else # WITHOUT_X11 -MAKE_ARGS+= CONF_OPT_GUI="--enable-gui=no --without-x" ${I18N} -. endif # WITHOUT_X11 -.endif # LITE +CONF_OPT_GUI="--enable-gui=motif --with-motif-lib=\"${MOTIFLIB}\"" +MAKE_ARGS+= MOTIFHOME=${LOCALBASE} +. endif + +.endif +MAKE_ARGS+= CONF_OPT_GUI=${CONF_OPT_GUI} ${I18N} + .if exists(${LOCALBASE}/lib/libiconv.so) USE_ICONV= yes .endif -.if !defined(WITHOUT_NLS) -USE_GETTEXT= yes -.else -MAKE_ARGS+= CONF_OPT_NLS="--disable-nls" -.endif -.if defined(WITH_EXUBERANT_CTAGS) -CTAGS_CMD= exctags -R . -.else -CTAGS_CMD= ${FIND} . -type f \\|${XARGS} ctags -.endif post-patch: @(${FIND} ${WRKSRC}/../runtime/ -name menu\*.vim -print0 | ${XARGS} -0 \ @@ -197,7 +184,7 @@ pre-configure: s|\$$gtk_config_exec_prefix/bin/gtk-config|\$${GTK_CONFIG}|g; \ s|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/auto/configure -.if defined(WITH_XTERM_SAVE) +.if ${PORT_OPTIONS:MXTERM_SAVE} @${REINPLACE_CMD} -e ' \ s|/\* #define FEAT_XTERM_SAVE \*/|#define FEAT_XTERM_SAVE|g' \ ${WRKSRC}/feature.h @@ -242,9 +229,6 @@ post-install: @${CAT} ${PKGMESSAGE} @${ECHO_CMD} -show-options: - @${MAKE} -DWITH_OPTIONS showconfig - .if defined(ONT_CHECKSUM) checksum: .endif @@ -271,4 +255,4 @@ ckp: ckmtree: ${MTREE_CMD} -f ${MTREE_FILE} -p ${PREFIX} -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/editors/vim/options b/editors/vim/options deleted file mode 100644 index 6614e132dc9d..000000000000 --- a/editors/vim/options +++ /dev/null @@ -1,15 +0,0 @@ -OPTIONS= PERL "Enable Perl interpreter" off \ - PYTHON "Enable Python interpreter" off \ - RUBY "Enable Ruby interpreter" off \ - TCL "Enable TCL interpreter" off \ - LUA "Enable lua interpreter" off \ - LANG "VIm Translations" off \ - CSCOPE "Enable cscope" off \ - EXUBERANT_CTAGS "Use exctags instead of ctags" off \ - X11 "X11 support (required for options below)" off \ - X11_ONLY "CLI-only Vim, but with basic X11 support" off \ - XTERM_SAVE "Restore xterm screen after exit" off \ - ATHENA "Athena GUI" off \ - GTK2 "GTK2 GUI" off \ - GNOME2 "Gnome2 GUI" off \ - MOTIF "Motif GUI" off \ diff --git a/editors/vim/pkg-plist b/editors/vim/pkg-plist index c6bb648dbfce..82c870059bce 100644 --- a/editors/vim/pkg-plist +++ b/editors/vim/pkg-plist @@ -20,24 +20,24 @@ bin/gvimdiff @comment Insert PLIST.share-vim here @comment -=[ begin PLIST.share-vim ]=- @comment -=[ end PLIST.share-vim ]=- -@dirrmtry man/fr/man1 -@dirrmtry man/fr -@dirrmtry man/fr.ISO8859-1/man1 -@dirrmtry man/fr.ISO8859-1 -@dirrmtry man/fr.UTF-8/man1 -@dirrmtry man/fr.UTF-8 -@dirrmtry man/it/man1 -@dirrmtry man/it -@dirrmtry man/it.ISO8859-1/man1 -@dirrmtry man/it.ISO8859-1 -@dirrmtry man/it.UTF-8/man1 -@dirrmtry man/it.UTF-8 -@dirrmtry man/pl/man1 -@dirrmtry man/pl -@dirrmtry man/pl.ISO8859-2/man1 -@dirrmtry man/pl.ISO8859-2 -@dirrmtry man/pl.UTF-8/man1 -@dirrmtry man/pl.UTF-8 -@dirrmtry man/ru.UTF-8/man1 -@dirrmtry man/ru.UTF-8 +%%NLS%%@dirrmtry man/fr/man1 +%%NLS%%@dirrmtry man/fr +%%NLS%%@dirrmtry man/fr.ISO8859-1/man1 +%%NLS%%@dirrmtry man/fr.ISO8859-1 +%%NLS%%@dirrmtry man/fr.UTF-8/man1 +%%NLS%%@dirrmtry man/fr.UTF-8 +%%NLS%%@dirrmtry man/it/man1 +%%NLS%%@dirrmtry man/it +%%NLS%%@dirrmtry man/it.ISO8859-1/man1 +%%NLS%%@dirrmtry man/it.ISO8859-1 +%%NLS%%@dirrmtry man/it.UTF-8/man1 +%%NLS%%@dirrmtry man/it.UTF-8 +%%NLS%%@dirrmtry man/pl/man1 +%%NLS%%@dirrmtry man/pl +%%NLS%%@dirrmtry man/pl.ISO8859-2/man1 +%%NLS%%@dirrmtry man/pl.ISO8859-2 +%%NLS%%@dirrmtry man/pl.UTF-8/man1 +%%NLS%%@dirrmtry man/pl.UTF-8 +%%NLS%%@dirrmtry man/ru.UTF-8/man1 +%%NLS%%@dirrmtry man/ru.UTF-8 @dirrm share/vim |