summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Griffis <agriffis@gentoo.org>2001-09-11 19:18:42 +0000
committerAron Griffis <agriffis@gentoo.org>2001-09-11 19:18:42 +0000
commit79e40b9739358de9e44fa6f84cf1ea0e3adc4d5e (patch)
tree2f9b02e2068aa6b0d263432983f4d8e1ff38b49b /app-editors/vim
parentxforms based mysql admin tool (diff)
downloadgentoo-2-79e40b9739358de9e44fa6f84cf1ea0e3adc4d5e.tar.gz
gentoo-2-79e40b9739358de9e44fa6f84cf1ea0e3adc4d5e.tar.bz2
gentoo-2-79e40b9739358de9e44fa6f84cf1ea0e3adc4d5e.zip
New vim ebuild that contains both text (/usr/bin/vim) and gui
(/usr/bin/gvim) versions of vim.
Diffstat (limited to 'app-editors/vim')
-rw-r--r--app-editors/vim/files/digest-vim-6.0_pre481
-rw-r--r--app-editors/vim/files/vimrc122
-rw-r--r--app-editors/vim/vim-6.0_pre48.ebuild145
3 files changed, 268 insertions, 0 deletions
diff --git a/app-editors/vim/files/digest-vim-6.0_pre48 b/app-editors/vim/files/digest-vim-6.0_pre48
new file mode 100644
index 000000000000..6fc0ae6fb89d
--- /dev/null
+++ b/app-editors/vim/files/digest-vim-6.0_pre48
@@ -0,0 +1 @@
+MD5 8543e4f6aae48b7f90a848a2a7572a90 vim-6.0av.tar.bz2
diff --git a/app-editors/vim/files/vimrc b/app-editors/vim/files/vimrc
new file mode 100644
index 000000000000..c55d4a6b5528
--- /dev/null
+++ b/app-editors/vim/files/vimrc
@@ -0,0 +1,122 @@
+" Configuration file for gvim
+" Written for Debian GNU/Linux by W.Akkerman <wakkerma@debian.org>
+" Some modifications by J.H.M. Dassen <jdassen@wi.LeidenUniv.nl>
+
+
+" Normally we use vim-extensions. If you want true vi-compatibility
+" remove change the following statements
+set nocompatible " Use Vim defaults (much better!)
+set backspace=2 " allow backspacing over everything in insert mode
+" Now we set some defaults for the editor
+set autoindent " always set autoindenting on
+set textwidth=0 " Don't wrap words by default
+set nobackup " Don't keep a backup file
+set viminfo='20,\"50 " read/write a .viminfo file, don't store more than
+ " 50 lines of registers
+set history=50 " keep 50 lines of command line history
+set ruler " show the cursor position all the time
+
+" Suffixes that get lower priority when doing tab completion for filenames.
+" These are files we are not likely to want to edit or read.
+set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
+
+" We know xterm-debian is a color terminal
+if &term =~ "xterm-debian" || &term =~ "xterm-xfree86"
+ set t_Co=16
+ set t_Sf=[3%dm
+ set t_Sb=[4%dm
+endif
+
+" Vim5 comes with syntaxhighlighting. If you want to enable syntaxhightlighting
+" by default uncomment the next three lines.
+"if has("syntax")
+" syntax on " Default to no syntax highlightning
+"endif
+
+" Debian uses compressed helpfiles. We must inform vim that the main
+" helpfiles is compressed. Other helpfiles are stated in the tags-file.
+set helpfile=$VIMRUNTIME/doc/help.txt
+
+if has("autocmd")
+
+" Set some sensible defaults for editing C-files
+augroup cprog
+ " Remove all cprog autocommands
+ au!
+
+ " When starting to edit a file:
+ " For *.c and *.h files set formatting of comments and set C-indenting on.
+ " For other files switch it off.
+ " Don't change the order, it's important that the line with * comes first.
+ autocmd BufRead * set formatoptions=tcql nocindent comments&
+ autocmd BufRead *.c,*.h set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://
+augroup END
+
+" Also, support editing of gzip-compressed files. DO NOT REMOVE THIS!
+" This is also used when loading the compressed helpfiles.
+augroup gzip
+ " Remove all gzip autocommands
+ au!
+
+ " Enable editing of gzipped files
+ " read: set binary mode before reading the file
+ " uncompress text in buffer after reading
+ " write: compress file after writing
+ " append: uncompress file, append, compress file
+ autocmd BufReadPre,FileReadPre *.gz set bin
+ autocmd BufReadPre,FileReadPre *.gz let ch_save = &ch|set ch=2
+ autocmd BufReadPost,FileReadPost *.gz '[,']!gunzip
+ autocmd BufReadPost,FileReadPost *.gz set nobin
+ autocmd BufReadPost,FileReadPost *.gz let &ch = ch_save|unlet ch_save
+ autocmd BufReadPost,FileReadPost *.gz execute ":doautocmd BufReadPost " . expand("%:r")
+
+ autocmd BufWritePost,FileWritePost *.gz !mv <afile> <afile>:r
+ autocmd BufWritePost,FileWritePost *.gz !gzip <afile>:r
+
+ autocmd FileAppendPre *.gz !gunzip <afile>
+ autocmd FileAppendPre *.gz !mv <afile>:r <afile>
+ autocmd FileAppendPost *.gz !mv <afile> <afile>:r
+ autocmd FileAppendPost *.gz !gzip <afile>:r
+augroup END
+
+augroup bzip2
+ " Remove all bzip2 autocommands
+ au!
+
+ " Enable editing of bzipped files
+ " read: set binary mode before reading the file
+ " uncompress text in buffer after reading
+ " write: compress file after writing
+ " append: uncompress file, append, compress file
+ autocmd BufReadPre,FileReadPre *.bz2 set bin
+ autocmd BufReadPre,FileReadPre *.bz2 let ch_save = &ch|set ch=2
+ autocmd BufReadPost,FileReadPost *.bz2 |'[,']!bunzip2
+ autocmd BufReadPost,FileReadPost *.bz2 let &ch = ch_save|unlet ch_save
+ autocmd BufReadPost,FileReadPost *.bz2 execute ":doautocmd BufReadPost " . expand("%:r")
+
+ autocmd BufWritePost,FileWritePost *.bz2 !mv <afile> <afile>:r
+ autocmd BufWritePost,FileWritePost *.bz2 !bzip2 <afile>:r
+
+ autocmd FileAppendPre *.bz2 !bunzip2 <afile>
+ autocmd FileAppendPre *.bz2 !mv <afile>:r <afile>
+ autocmd FileAppendPost *.bz2 !mv <afile> <afile>:r
+ autocmd FileAppendPost *.bz2 !bzip2 -9 --repetitive-best <afile>:r
+augroup END
+
+endif " has ("autocmd")
+
+" Some Debian-specific things
+augroup filetype
+ au BufRead reportbug.* set ft=mail
+augroup END
+
+" The following are commented out as they cause vim to behave a lot
+" different from regular vi. They are highly recommended though.
+"set showcmd " Show (partial) command in status line.
+"set showmatch " Show matching brackets.
+"set ignorecase " Do case insensitive matching
+"set incsearch " Incremental search
+"set autowrite " Automatically save before commands like :next and :make
+
+
+
diff --git a/app-editors/vim/vim-6.0_pre48.ebuild b/app-editors/vim/vim-6.0_pre48.ebuild
new file mode 100644
index 000000000000..e405e47a1dd3
--- /dev/null
+++ b/app-editors/vim/vim-6.0_pre48.ebuild
@@ -0,0 +1,145 @@
+# Copyright 2001 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Authors Ben Beuchler <insyte@mazer.squad51.net>
+# and Aron Griffis <agriffis@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/app-editors/vim/vim-6.0_pre48.ebuild,v 1.1 2001/09/11 19:18:42 agriffis Exp $
+
+DESCRIPTION="Vi IMproved!"
+HOMEPAGE="http://www.vim.org/"
+
+# Please name the ebuild as follows. If this is followed, there
+# should be no need to modify this ebuild when the Vim version is
+# updated. (Yes it's overkill, but it was fun!)
+#
+# vim-6.0, when 6.0 is finally released
+# vim-6.0_pre9, where 9 = (i), for vim-6.0i
+# vim-6.0_pre47, where 47 = 26(a) + 21(u), for vim-6.0au
+# vim-6.0_pre72, where 72 = 52(b) + 20(t), for vim-6.0bt
+#
+# Quick reference:
+# a=1 e=5 i=9 m=13 q=17 u=21 y=25
+# b=2 f=6 j=10 n=14 r=18 v=22 z=26
+# c=3 g=7 k=11 o=15 s=19 w=23 aa=27
+# d=4 h=8 l=12 p=16 t=20 x=24 ab=28 (etc.)
+#
+# (08 Sep 2001 agriffis)
+
+# Calculate the version based on the name of the ebuild
+vim_version="${PV%_pre*}"
+vim_pre="${PV##*_pre}"
+if [ -z "$vim_pre" ]; then
+ # Final releases include a dash in the directory name
+ vim_letters=
+ S="$WORKDIR/vim-$vim_version"
+ A="vim-$vim_version.tar.bz2"
+ SRC_URI="ftp://ftp.us.vim.org/pub/vim/unix/$A"
+elif [ "$vim_pre" -lt 27 ]; then
+ # Handle (prerelease) versions with one trailing letter
+ vim_letters=`echo $vim_pre | awk '{printf "%c", $0+96}'`
+ S="$WORKDIR/vim${vim_version//.}$vim_letters"
+ A="vim-$vim_version$vim_letters.tar.bz2"
+ SRC_URI="ftp://ftp.us.vim.org/pub/vim/unreleased/unix/$A"
+elif [ "$vim_pre" -lt 703 ]; then
+ # Handle (prerelease) versions with two trailing letters
+ vim_letters=`echo $vim_pre | awk '{printf "%c%c", $0/26+96, $0%26+96}'`
+ S="$WORKDIR/vim${vim_version//.}$vim_letters"
+ A="vim-$vim_version$vim_letters.tar.bz2"
+ SRC_URI="ftp://ftp.us.vim.org/pub/vim/unreleased/unix/$A"
+else
+ die "Eek! I don't know how to interpret the version!"
+fi
+
+# It appears that the tclinterp stuff in Vim is broken right now.
+# When you --enable-tclinterp flag, then the following command never
+# returns:
+#
+# VIMINIT='let OS = system("uname -s")' vim
+#
+# Please don't re-enable the tclinterp flag without verifying first
+# that the above works. Thanks. (08 Sep 2001 agriffis)
+DEPEND="$guidep
+ virtual/glibc
+ >=sys-libs/ncurses-5.2-r2
+ dev-util/cscope
+ gpm? ( >=sys-libs/gpm-1.19.3 )
+ gnome? ( gnome-base/gnome-libs )
+ gtk? ( x11-libs/gtk+ )
+ X? ( x11-base/xfree )
+ perl? ( sys-devel/perl )
+ python? ( dev-lang/python )
+ ruby? ( >=dev-lang/ruby-1.6.4 )"
+# tcltk? ( dev-lang/tcl-tk )"
+
+src_unpack() {
+ unpack $A
+ # Fixup a script to use awk instead of nawk
+ cd $S/runtime/tools
+ mv mve.awk mve.awk.old
+ ( read l; echo "#!/usr/bin/awk -f"; cat ) <mve.awk.old >mve.awk
+}
+
+src_compile() {
+ local myconf
+ use nls || myconf="--disable-nls"
+ use gpm || myconf="$myconf --disable-gpm"
+ use perl && myconf="$myconf --enable-perlinterp"
+ use python && myconf="$myconf --enable-pythoninterp"
+ use ruby && myconf="$myconf --enable-rubyinterp"
+# tclinterp is BROKEN. See note above DEPEND=
+# use tcltk && myconf="$myconf --enable-tclinterp"
+
+ #
+ # First, build a gui version, this will install as /usr/bin/gvim
+ #
+ if use gnome; then
+ guiconf="--enable-gui=gnome --with-x"
+ elif use gtk; then
+ guiconf="--enable-gui=gtk --with-x"
+ elif use X; then
+ guiconf="--enable-gui=athena --with-x"
+ else
+ # No gui version will be built
+ guiconf=""
+ fi
+ if [ -n "$guiconf" ]; then
+ ./configure \
+ --prefix=/usr --mandir=/usr/share/man --host=$CHOST \
+ --enable-max-features --with-cscope $myconf $guiconf \
+ || die "gvim configure failed"
+ # Parallel make does not work
+ make || die "gvim make failed"
+ mv src/vim src/gvim
+ fi
+
+ #
+ # Second, build a nogui version, this will install as /usr/bin/vim
+ #
+ ./configure \
+ --prefix=/usr --mandir=/usr/share/man --host=$CHOST \
+ --enable-max-features --with-cscope $myconf \
+ --enable-gui=no --without-x \
+ || die "vim configure failed"
+ # Parallel make does not work
+ make || die "vim make failed"
+}
+
+src_install() {
+ # Install the nogui version
+ mkdir -p $D/usr/{bin,share/man/man1,share/vim} $D/root
+ make install STRIP=true \
+ BINDIR=$D/usr/bin MANDIR=$D/usr/share/man DATADIR=$D/usr/share
+ # Install the gui version, if it was built
+ if [ -f src/gvim ]; then
+ install -m755 src/gvim $D/usr/bin/gvim
+ ln -s gvim $D/usr/bin/gvimdiff
+ fi
+ # Docs
+ dodoc README*
+ cd $D/usr/share/doc/$PF
+ ln -s ../../vim/*/doc $P
+ # .vimrc for root
+ install -m644 $FILESDIR/vimrc $D/root/.vimrc
+ # Default .vimrc for users (this should be revisited)
+ insinto /etc/skel
+ newins $FILESDIR/vimrc .vimrc
+}