summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-editors/gvim/ChangeLog11
-rw-r--r--app-editors/gvim/files/digest-gvim-6.1-r84
-rw-r--r--app-editors/gvim/files/gvimrc4
-rw-r--r--app-editors/gvim/gvim-6.1-r8.ebuild30
-rw-r--r--app-editors/vim-core/ChangeLog9
-rw-r--r--app-editors/vim-core/files/digest-vim-core-6.1-r54
-rw-r--r--app-editors/vim-core/files/vimrc76
-rw-r--r--app-editors/vim-core/vim-core-6.1-r5.ebuild17
-rw-r--r--app-editors/vim/ChangeLog117
-rw-r--r--app-editors/vim/files/digest-vim-6.1-r214
-rw-r--r--app-editors/vim/vim-6.1-r21.ebuild20
-rw-r--r--eclass/vim.eclass226
12 files changed, 367 insertions, 155 deletions
diff --git a/app-editors/gvim/ChangeLog b/app-editors/gvim/ChangeLog
index 195ca2f98b7d..29fe3759e422 100644
--- a/app-editors/gvim/ChangeLog
+++ b/app-editors/gvim/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for app-editors/gvim
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/gvim/ChangeLog,v 1.23 2003/03/19 13:15:39 foser Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/gvim/ChangeLog,v 1.24 2003/03/23 20:36:26 agriffis Exp $
+
+*gvim-6.1-r8 (22 Mar 2003)
+
+ 22 Mar 2003; Aron Griffis <agriffis@gentoo.org> gvim-6.1-r8.ebuild,
+ files/gvimrc:
+ Remove security fix from gvimrc since it only needs to be in vimrc. Remove
+ EXCLUDE_PATCHES since the updated eclass no longer needs that crutch.
+ Update to patchlevel 411. Added IUSE. Mark stable on x86, alpha. See vim
+ ChangeLog for changes to the eclass.
19 Mar 2003; foser <foser@gentoo.org> gvim-6.1.-r7.ebuild :
Fixed xft dep to be virtual (#15109)
diff --git a/app-editors/gvim/files/digest-gvim-6.1-r8 b/app-editors/gvim/files/digest-gvim-6.1-r8
new file mode 100644
index 000000000000..98143868eb94
--- /dev/null
+++ b/app-editors/gvim/files/digest-gvim-6.1-r8
@@ -0,0 +1,4 @@
+MD5 7fd0f915adc7c0dab89772884268b030 vim-6.1.tar.bz2 289004
+MD5 ed6742805866d11d6a28267330980ab1 vim-6.1-lang.tar.gz 86697
+MD5 71932d38e43dad63d5d39de792d7ed4d vim-6.1-patches-001-411.tar.bz2 75693
+MD5 76999e6185b11a083061df23560e3a0c vim-6.1-411-gentoo-patches.tar.bz2 14480
diff --git a/app-editors/gvim/files/gvimrc b/app-editors/gvim/files/gvimrc
index e7df461bc5be..81d574de9a35 100644
--- a/app-editors/gvim/files/gvimrc
+++ b/app-editors/gvim/files/gvimrc
@@ -10,10 +10,6 @@
set columns=80 lines=30 " don't inherit geometry from parent term
set mousemodel=popup " right mouse button pops up a menu in the GUI
-" added to default to high security within Gentoo. Fixes #14088
-" -rphillips
-set modelines=0
-
" Use a sufficiently wide window automatically when started as "gvimdiff"
if (&foldmethod == 'diff')
set columns=165
diff --git a/app-editors/gvim/gvim-6.1-r8.ebuild b/app-editors/gvim/gvim-6.1-r8.ebuild
new file mode 100644
index 000000000000..5041b74ea4c1
--- /dev/null
+++ b/app-editors/gvim/gvim-6.1-r8.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/app-editors/gvim/gvim-6.1-r8.ebuild,v 1.1 2003/03/23 20:36:26 agriffis Exp $
+
+IUSE="gnome gpm gtk gtk2 nls perl python ruby X"
+VIMPATCH="411"
+inherit vim
+
+DESCRIPTION="Graphical Vim"
+KEYWORDS="x86 ~ppc ~sparc alpha"
+DEPEND="dev-util/cscope
+ >=sys-libs/ncurses-5.2-r2
+ >=app-editors/vim-core-6.1-r5
+ x11-base/xfree
+ gpm? ( >=sys-libs/gpm-1.19.3 )
+ gnome? ( gnome-base/gnome-libs )
+ gtk? ( =x11-libs/gtk+-1.2* )
+ gtk2? ( >=x11-libs/gtk+-2.1
+ virtual/xft )
+ perl? ( dev-lang/perl )
+ python? ( dev-lang/python )
+ ruby? ( >=dev-lang/ruby-1.6.4 )"
+
+src_unpack() {
+ vim_src_unpack
+
+ use gtk2 \
+ && EPATCH_SUFFIX="gz" EPATCH_FORCE="yes" \
+ epatch ${WORKDIR}/gentoo/patches-gvim/*
+}
diff --git a/app-editors/vim-core/ChangeLog b/app-editors/vim-core/ChangeLog
index 140f499cf60d..d13541b5670d 100644
--- a/app-editors/vim-core/ChangeLog
+++ b/app-editors/vim-core/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-editors/vim-core
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/vim-core/ChangeLog,v 1.16 2003/03/15 00:44:40 seemant Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/vim-core/ChangeLog,v 1.17 2003/03/23 20:36:26 agriffis Exp $
+
+*vim-core-6.1-r5 (22 Mar 2003)
+
+ 22 Mar 2003; Aron Griffis <agriffis@gentoo.org> vim-core-6.1-r5.ebuild,
+ files/vimrc:
+ Move vimrc from vim to vim-core. Update to patchlevel 411. Mark stable on
+ x86, alpha. Changes to the eclass are described in the vim ChangeLog.
08 Feb 2003; Guy Martin <gmsoft@gentoo.org> vim-core-6.1-r4.ebuild :
Added hppa to keywords.
diff --git a/app-editors/vim-core/files/digest-vim-core-6.1-r5 b/app-editors/vim-core/files/digest-vim-core-6.1-r5
new file mode 100644
index 000000000000..98143868eb94
--- /dev/null
+++ b/app-editors/vim-core/files/digest-vim-core-6.1-r5
@@ -0,0 +1,4 @@
+MD5 7fd0f915adc7c0dab89772884268b030 vim-6.1.tar.bz2 289004
+MD5 ed6742805866d11d6a28267330980ab1 vim-6.1-lang.tar.gz 86697
+MD5 71932d38e43dad63d5d39de792d7ed4d vim-6.1-patches-001-411.tar.bz2 75693
+MD5 76999e6185b11a083061df23560e3a0c vim-6.1-411-gentoo-patches.tar.bz2 14480
diff --git a/app-editors/vim-core/files/vimrc b/app-editors/vim-core/files/vimrc
new file mode 100644
index 000000000000..c868e6d3c62a
--- /dev/null
+++ b/app-editors/vim-core/files/vimrc
@@ -0,0 +1,76 @@
+" Default configuration file for Vim
+" Written by Aron Griffis <agriffis@gentoo.org>
+" Modified by Ryan Phillips <rphillips@gentoo.org>
+" Added Redhat's vimrc info by Seemant Kulleen <seemant@gentoo.org>
+
+" The following are some sensible defaults for Vim for most users.
+" We attempt to change as little as possible from Vim's defaults,
+" deviating only where it makes sense
+set nocompatible " Use Vim defaults (much better!)
+set bs=2 " Allow backspacing over everything in insert mode
+set ai " Always set auto-indenting on
+"set backup " Keep a backup file
+set viminfo='20,\"50 " read/write a .viminfo file -- limit to only 50
+set history=50 " keep 50 lines of command history
+set ruler " Show the cursor position all the time
+
+" Added to default to high security within Gentoo. Fixes bug #14088
+set modelines=0
+
+if v:lang =~ "^ko"
+ set fileencodings=euc-kr
+ set guifontset=-*-*-medium-r-normal--16-*-*-*-*-*-*-*
+elseif v:lang =~ "^ja_JP"
+ set fileencodings=euc-jp
+ set guifontset=-misc-fixed-medium-r-normal--14-*-*-*-*-*-*-*
+elseif v:lang =~ "^zh_TW"
+ set fileencodings=big5
+ set guifontset=-sony-fixed-medium-r-normal--16-150-75-75-c-80-iso8859-1,-taipei-fixed-medium-r-normal--16-150-75-75-c-160-big5-0
+elseif v:lang =~ "^zh_CN"
+ set fileencodings=gb2312
+ set guifontset=*-r-*
+endif
+if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
+ set fileencodings=utf-8,latin1
+endif
+
+" Only do this part when compiled with support for autocommands
+if has("autocmd")
+ " In text files, always limit the width of text to 78 characters
+ autocmd BufRead *.txt set tw=78
+ " When editing a file, always jump to the last cursor position
+ autocmd BufReadPost *
+ \ if line("'\"") > 0 && line ("'\"") <= line("$") |
+ \ exe "normal g'\"" |
+ \ endif
+endif
+
+" Don't use Ex mode, use Q for formatting
+map Q gq
+
+" Switch syntax highlighting on, when the terminal has colors
+" Also switch on highlighting the last used search pattern.
+if &t_Co > 2 || has("gui_running")
+ syntax on
+ set hlsearch
+endif
+
+if &term=="xterm"
+ set t_RV= " don't check terminal version
+ set t_Co=8
+ set t_Sb=^[4%dm
+ set t_Sf=^[3%dm
+endif
+
+if has("autocmd")
+
+" Gentoo-specific settings for ebuilds. These are the federally-mandated
+" required tab settings. See the following for more information:
+" http://www.gentoo.org/doc/en/xml/gentoo-howto.xml
+augroup gentoo
+ au!
+ au BufRead,BufNewFile *.e{build,class} let is_bash=1|set ft=sh
+ au BufRead,BufNewFile *.e{build,class} set ts=4 sw=4 noexpandtab
+augroup END
+
+endif " has("autocmd")
diff --git a/app-editors/vim-core/vim-core-6.1-r5.ebuild b/app-editors/vim-core/vim-core-6.1-r5.ebuild
new file mode 100644
index 000000000000..0f400630a8b7
--- /dev/null
+++ b/app-editors/vim-core/vim-core-6.1-r5.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/app-editors/vim-core/vim-core-6.1-r5.ebuild,v 1.1 2003/03/23 20:36:26 agriffis Exp $
+
+IUSE="gpm nls perl python ruby"
+VIMPATCH="411"
+inherit vim
+
+DESCRIPTION="vim, gvim and kvim shared files"
+KEYWORDS="x86 ~ppc ~sparc alpha ~hppa ~arm ~mips"
+DEPEND="dev-util/cscope
+ sys-libs/libtermcap-compat
+ >=sys-libs/ncurses-5.2-r2
+ gpm? ( >=sys-libs/gpm-1.19.3 )
+ perl? ( dev-lang/perl )
+ python? ( dev-lang/python )
+ ruby? ( >=dev-lang/ruby-1.6.4 )"
diff --git a/app-editors/vim/ChangeLog b/app-editors/vim/ChangeLog
index ec898d74cad4..f0a78fbe27bb 100644
--- a/app-editors/vim/ChangeLog
+++ b/app-editors/vim/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for app-editors/vim
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/vim/ChangeLog,v 1.47 2003/03/14 15:59:13 tuxus Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/vim/ChangeLog,v 1.48 2003/03/23 20:36:26 agriffis Exp $
+
+*vim-6.1-r21 (22 Mar 2003)
+
+ 22 Mar 2003; Aron Griffis <agriffis@gentoo.org> vim-6.1-r21.ebuild:
+ Move vimrc to vim-core since it applies to both vim and gvim.
+ Update to patchlevel 411. Mark stable on x86, alpha. Remove
+ EXCLUDE_PATCHES crutch since it's no longer needed by the eclass. The
+ eclass now snoops the patches to determine what is relevant instead of using
+ the README. Create vim->gvim and vi->vim symlinks when there's no conflict.
*vim-6.1-r20.ebuild (13 Mar 2003)
@@ -155,106 +164,106 @@ vim-6.1-r9.ebuild (29 Jul 2002)
Updated patches. The patches no longer take tons of space in portage.
vim-6.1-r8.ebuild (06 Jul 2002)
-
+
15 Jul 2002; Owen Stampflee <owen@gentoo.org> :
Added KEYWORDS.
- 06 Jul 2002; Michael Nazaroff <naz@gentoo.org> vim-6.1-r8.ebuild :
+ 06 Jul 2002; Michael Nazaroff <naz@gentoo.org> vim-6.1-r8.ebuild :
- Added back gpm support, since gpm should now be fixed. I also added a
- addpredict line to hopefully remove those sandbox violations we where
- occasionally getting. Also added a few more misc patch's. I also added
- LICENSE lines to all of the ebuilds.
+ Added back gpm support, since gpm should now be fixed. I also added a
+ addpredict line to hopefully remove those sandbox violations we where
+ occasionally getting. Also added a few more misc patch's. I also added
+ LICENSE lines to all of the ebuilds.
*vim-6.1-r7 (27 May 2002)
- 27 May 2002; Aron Griffis <agriffis@gentoo.org> vim-6.1-r7.ebuild :
+ 27 May 2002; Aron Griffis <agriffis@gentoo.org> vim-6.1-r7.ebuild :
- Removed gpm support to close bug #1808.
+ Removed gpm support to close bug #1808.
*vim-6.1-r6 (19 May 2002)
- 19 May 2002; Ryan Phillips <rphillips@gentoo.org> vim-6.1-r6.ebuild :
+ 19 May 2002; Ryan Phillips <rphillips@gentoo.org> vim-6.1-r6.ebuild :
- Added more patches to files/
+ Added more patches to files/
*vim-6.1-r5 (30 Apr 2002)
- 30 Apr 2002; Ryan Phillips <rphillips@gentoo.org> vim-6.1-r5.ebuild :
+ 30 Apr 2002; Ryan Phillips <rphillips@gentoo.org> vim-6.1-r5.ebuild :
- NLS will enable multibyte support now. I don't see a problem with
- this...
+ NLS will enable multibyte support now. I don't see a problem with
+ this...
- 30 Apr 2002; Ryan Phillips <rphillips@gentoo.org> vim-6.1-r5.ebuild :
+ 30 Apr 2002; Ryan Phillips <rphillips@gentoo.org> vim-6.1-r5.ebuild :
- Included patches for 6.1 in the files/ directory.
+ Included patches for 6.1 in the files/ directory.
*vim-6.1-r4 (15 Apr 2002)
- 15 Apr 2002; Jared H. Hudson <jhhudso@gentoo.org> vim-6.1-r4.ebuild :
+ 15 Apr 2002; Jared H. Hudson <jhhudso@gentoo.org> vim-6.1-r4.ebuild :
- Replaced --enable-max-features with --with-features=huge
- --enable-max-features was the old, 5.0 way to enable all features.
- 6.0+ uses --with-features=tiny,small,normal,big or huge
- This fixes bug #1597
-
+ Replaced --enable-max-features with --with-features=huge
+ --enable-max-features was the old, 5.0 way to enable all features.
+ 6.0+ uses --with-features=tiny,small,normal,big or huge
+ This fixes bug #1597
+
*vim-6.1-r3 (9 Apr 2002)
- 9 Apr 2002; M.Schlemmer <azarah@gentoo.org> :
+ 9 Apr 2002; M.Schlemmer <azarah@gentoo.org> :
- I havent looked at 6.0, but it seems that in 6.1, $VIMRUNTIME is not
- set in the Makefiles, and thus vim cant find its syntax files, etc. It
- works for me ... Aron Griffis, please verify, and fix if it is not the
- correct method. Resolved by creating /etc/env.d/40vim in src_install().
+ I havent looked at 6.0, but it seems that in 6.1, $VIMRUNTIME is not
+ set in the Makefiles, and thus vim cant find its syntax files, etc. It
+ works for me ... Aron Griffis, please verify, and fix if it is not the
+ correct method. Resolved by creating /etc/env.d/40vim in src_install().
*vim-6.1-r2 (7 Apr 2002)
- 7 Apr 2002; Jared H. Hudson <jhhudso@gentoo.org> vim-6.1-r2.ebuild :
+ 7 Apr 2002; Jared H. Hudson <jhhudso@gentoo.org> vim-6.1-r2.ebuild :
- Removed "addpredict /dev/vc/" from ebuild, portage-1.8.17 now
- includes /dev/vc/ in sandbox as a default writable directory,
- as it did with /dev/pts/ before 1.8.17.
+ Removed "addpredict /dev/vc/" from ebuild, portage-1.8.17 now
+ includes /dev/vc/ in sandbox as a default writable directory,
+ as it did with /dev/pts/ before 1.8.17.
*vim-6.1-r1 (4 Apr 2002)
- 4 Apr 2002; Seemant Kulleen <seemant@gentoo.org> vim-6.1-r1.ebuild :
+ 4 Apr 2002; Seemant Kulleen <seemant@gentoo.org> vim-6.1-r1.ebuild :
- This is a dirty hack, in my opinion, to bypass the sandbox violation
- errors on the /dev/vc/*. I think this is a portage bug more than
- a vim bug because it happens for new to 1.0 users.
+ This is a dirty hack, in my opinion, to bypass the sandbox violation
+ errors on the /dev/vc/*. I think this is a portage bug more than
+ a vim bug because it happens for new to 1.0 users.
*vim-6.1 (30 Mar 2002)
- 30 Mar 2002; Seemant Kulleen <seemant@gentoo.org> vim-6.1.ebuild
+ 30 Mar 2002; Seemant Kulleen <seemant@gentoo.org> vim-6.1.ebuild
- Resolved bug 1426: SRC_URI points primarily to ftp.vim.org instead
- of ftp.us.vim.org which no longer contains the tar ball for 6.1
- Thanks to jnelson@jamponi.net
+ Resolved bug 1426: SRC_URI points primarily to ftp.vim.org instead
+ of ftp.us.vim.org which no longer contains the tar ball for 6.1
+ Thanks to jnelson@jamponi.net
*vim-6.1 (26 Mar 2002)
- 26 Mar 2002; Aron Griffis <agriffis@gentoo.org> vim-6.0-r6.ebuild, vim-6.1.ebuild:
+ 26 Mar 2002; Aron Griffis <agriffis@gentoo.org> vim-6.0-r6.ebuild, vim-6.1.ebuild:
- Resolved bug 1335: vim 6.1 released
- Resolved bug 1293: vim python support disabled
+ Resolved bug 1335: vim 6.1 released
+ Resolved bug 1293: vim python support disabled
*vim-6.0-r5 (19 Feb 2002)
- 19 Feb 2002; Aron Griffis <agriffis@gentoo.org> vim-6.0-r5.ebuild:
+ 19 Feb 2002; Aron Griffis <agriffis@gentoo.org> vim-6.0-r5.ebuild:
- Resolved bug 583: "patch to vim-6.0-r4 to install a vimrc in
- /usr/share/vim instead of /etc/skel/.vimrc". Additionally install
- a default, reasonable gvimrc. Updated vim to 6.0.223 with all
- available patches.
+ Resolved bug 583: "patch to vim-6.0-r4 to install a vimrc in
+ /usr/share/vim instead of /etc/skel/.vimrc". Additionally install
+ a default, reasonable gvimrc. Updated vim to 6.0.223 with all
+ available patches.
*vim-6.0-r4 (1 Feb 2002)
- 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
+ 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
- Added initial ChangeLog which should be updated whenever the package is
- updated in any way. This changelog is targetted to users. This means that
- the comments should well explained and written in clean English. The
- details about writing correct changelogs are explained in the
- skel.ChangeLog file which you can find in the root directory of the
- portage repository.
+ Added initial ChangeLog which should be updated whenever the package is
+ updated in any way. This changelog is targetted to users. This means that
+ the comments should well explained and written in clean English. The
+ details about writing correct changelogs are explained in the
+ skel.ChangeLog file which you can find in the root directory of the
+ portage repository.
diff --git a/app-editors/vim/files/digest-vim-6.1-r21 b/app-editors/vim/files/digest-vim-6.1-r21
new file mode 100644
index 000000000000..98143868eb94
--- /dev/null
+++ b/app-editors/vim/files/digest-vim-6.1-r21
@@ -0,0 +1,4 @@
+MD5 7fd0f915adc7c0dab89772884268b030 vim-6.1.tar.bz2 289004
+MD5 ed6742805866d11d6a28267330980ab1 vim-6.1-lang.tar.gz 86697
+MD5 71932d38e43dad63d5d39de792d7ed4d vim-6.1-patches-001-411.tar.bz2 75693
+MD5 76999e6185b11a083061df23560e3a0c vim-6.1-411-gentoo-patches.tar.bz2 14480
diff --git a/app-editors/vim/vim-6.1-r21.ebuild b/app-editors/vim/vim-6.1-r21.ebuild
new file mode 100644
index 000000000000..74bb0a584ae0
--- /dev/null
+++ b/app-editors/vim/vim-6.1-r21.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/vim/vim-6.1-r21.ebuild,v 1.1 2003/03/23 20:36:26 agriffis Exp $
+
+IUSE="gpm nls perl python ruby tcltk X"
+VIMPATCH="411"
+inherit vim
+
+DESCRIPTION="Vi IMproved!"
+KEYWORDS="x86 ~ppc ~sparc alpha ~hppa ~arm ~mips"
+DEPEND=">=app-editors/vim-core-6.1-r5
+ sys-libs/libtermcap-compat
+ dev-util/cscope
+ >=sys-libs/ncurses-5.2-r2
+ gpm? ( >=sys-libs/gpm-1.19.3 )
+ perl? ( dev-lang/perl )
+ python? ( dev-lang/python )
+ ruby? ( >=dev-lang/ruby-1.6.4 )"
+
+PROVIDE="virtual/editor"
diff --git a/eclass/vim.eclass b/eclass/vim.eclass
index c4b933cf6f1a..77d58a6d4a2f 100644
--- a/eclass/vim.eclass
+++ b/eclass/vim.eclass
@@ -1,18 +1,41 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/vim.eclass,v 1.15 2003/03/16 04:21:05 seemant Exp $
-#
-# Author Ryan Phillips <rphillips@gentoo.org>
-# Modified by: Seemant Kulleen <seemant@gentoo.org>
-# Ripped from the vim ebuilds. src_compile and install
-# should be integrated in at some point
+# $Header: /var/cvsroot/gentoo-x86/eclass/vim.eclass,v 1.16 2003/03/23 20:36:25 agriffis Exp $
+
+# Authors:
+# Ryan Phillips <rphillips@gentoo.org>
+# Seemant Kulleen <seemant@gentoo.org>
+# Aron Griffis <agriffis@gentoo.org>
ECLASS=vim
EXPORT_FUNCTIONS src_unpack
inherit eutils
-# Calculate the version based on the name of the ebuild
+#==========================================================================
+# Please note:
+#
+# The SRC_URI is determined in the following code via bash
+# conditionals. Normally this is not allowed, because SRC_URI (also
+# DEPEND/RDEPEND) are cached on Angel, and this cache is used by users
+# that get portage via rsync. If bash conditionals can change the
+# output of SRC_URI/DEPEND/RDEPEND based on some variable (such as
+# USE), then the cache becomes invalid.
+#
+# So the reason the following code is valid is that the bash
+# conditionals aren't testing something *variable*. I.e. the only
+# thing being tested is the version, which won't change from machine
+# to machine, so the cache remains valid.
+#
+# (21 Mar 2003 agriffis)
+#==========================================================================
+
+# Calculate the version based on the name of the ebuild, for example
+# (these examples are old but still applicable for the naming scheme)
+# 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
vim_version="${PV%_pre*}"
vim_pre="${PV##*_pre}"
@@ -29,6 +52,7 @@ if [ "${vim_version}" = "${vim_pre}" ]; then
SRC_URI="ftp://ftp.vim.org/pub/vim/unix/${MY_P}.tar.bz2
ftp://ftp.us.vim.org/pub/vim/unix/${MY_P}.tar.bz2"
# ftp://ftp.vim.org/pub/vim/extra/${MY_P}-extra.tar.gz"
+
elif [ "${vim_pre}" -lt 27 ]; then
# Handle (prerelease) versions with one trailing letter
vim_letters=`echo ${vim_pre} | awk '{printf "%c", $0+96}'`
@@ -46,91 +70,104 @@ elif [ "${vim_pre}" -lt 703 ]; then
SRC_URI="ftp://ftp.vim.org/pub/vim/unreleased/unix/${MY_P}.tar.bz2
ftp://ftp.us.vim.org/pub/vim/unreleased/unix/${MY_P}.tar.bz2"
# ftp://ftp.vim.org/pub/vim/extra/${MY_P}-extra.tar.gz"
+
else
die "Eek! I don't know how to interpret the version!"
fi
-[ ! -z "${VIMPATCH}" ] && \
- SRC_URI="${SRC_URI}
- mirror://gentoo/vim-${PV}-patches-001-${VIMPATCH}.tar.bz2"
+# Add Vim NLS sources
+SRC_URI="${SRC_URI}
+ nls? ( ftp://ftp.vim.org/pub/vim/extra/vim-${vim_version}-lang.tar.gz )"
-SRC_URI="${SRC_URI}
- mirror://vim-${PV}-gentoo-patches.tar.bz2"
+# VIMPATCH is set in the actual vim/gvim ebuild. These are the
+# incremental patches released by Bram.
+[ -n "${VIMPATCH}" ] && \
+SRC_URI="${SRC_URI} mirror://gentoo/vim-${PV}-patches-001-${VIMPATCH}.tar.bz2"
-LANG="vim-${vim_version}-lang.tar.gz"
-if [ ! -z "${LANG}" ]; then
- SRC_URI="${SRC_URI} nls? ( ftp://ftp.vim.org/pub/vim/extra/${LANG} )"
+# Various patches from RH, etc.
+# Started versioning this tarball when VIMPATCH hit 411
+if [ "${VIMPATCH:-0}" -ge 411 ]; then
+ SRC_URI="${SRC_URI}
+ mirror://gentoo/vim-${PV}-${VIMPATCH}-gentoo-patches.tar.bz2"
+else
+ SRC_URI="${SRC_URI} mirror://gentoo/vim-${PV}-gentoo-patches.tar.bz2"
fi
+#=== End of SRC_URI setting ===============================================
+
HOMEPAGE="http://www.vim.org/"
SLOT="0"
LICENSE="vim"
-epatch_prep() {
-
- ebegin "Removing superfluous patches..."
- awk '/\(extra\).* Win32:|\(extra\) MS-DOS:|VMS:|\(extra\) BC5:|\(extra\) Mac:/ {print $2}' ${WORKDIR}/README | \
- xargs -i rm -f ${WORKDIR}/vimpatches/{}.gz
+apply_vim_patches() {
+ einfo "Applying various patches (bugfixes/updates)..."
- for i in ${EXCLUDE_PATCH}
- do
- rm -f ${WORKDIR}/vimpatches/${PV}.${i}.gz
+ local content depends files p d f
+
+ # Remove patches specifically excluded in the ebuild;
+ # note this approach is deprecated since now the patch scanner
+ # below does all the work.
+ for p in ${EXCLUDE_PATCH}; do
+ rm -f ${WORKDIR}/vimpatches/${PV}.$p.gz
done
- eend $?
+ # Scan the patches, applying them only to files that either
+ # already exist or that will be created by the patch
+ for p in ${WORKDIR}/vimpatches/${vim_version}.*.gz; do
+ gzip -dc ${p} | awk '
+ $1=="---" && $NF~/^200.$/ {
+ # Second line of a new patch; try to open the file to see
+ # if it exists.
+ if ((getline tryme < $2) == -1) {
+ # Check if it will be created
+ prevline = prevline "\n" $0
+ getline
+ prevline = prevline "\n" $0
+ getline
+ if ($0 != "*** 0 ****") {
+ # Non-existent and not created, stop printing
+ printing = 0
+ next
+ }
+ }
+ # Print the previous lines and continue
+ print prevline
+ printing = 1
+ }
+ printing { print }
+ { prevline = $0 }' > ${p%.gz}
+
+ # Apply the patch now that it's filtered
+ [ -s ${p%.gz} ] && epatch ${p%.gz}
+
+ # Conserve disk space
+ rm -f ${p%.gz}
+ done
}
-
vim_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
# Apply any patches available for this version
cd ${S}
- epatch_prep
+ apply_vim_patches
- EPATCH_SUFFIX="gz" EPATCH_FORCE="yes" \
- epatch ${WORKDIR}/vimpatches/
+ # 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
# Another set of patch's borrowed from src rpm to fix syntax error's etc.
cd ${S}
EPATCH_SUFFIX="gz" \
EPATCH_FORCE="yes" \
epatch ${WORKDIR}/gentoo/patches-all/
-
- # Apply patches to the specific package (gvim, vim, vim-core)
-# if [ "${PN}" = "gvim" ]
-# then
-# cd ${S}
-# EPATCH_SUFFIX=-"gz" \
-# EPATCH_FORCE="yes" \
-# epatch ${WORKDIR}/gentoo/patches-gvim/
-# fi
-#
-# if [ "${PN}" = "vim-core" ]
-# then
-# cd ${S}
-# EPATCH_SUFFIX="gz" \
-# EPATCH_FORCE="yes" \
-# epatch ${WORKDIR}/gentoo/patches-vim-core/
-# fi
-#
-# if [ "${PN}" = "vim" ]
-# then
-# cd ${S}
-# EPATCH_SUFFIX="gz" \
-# EPATCH_FORCE="yes" \
-# epatch ${WORKDIR}/gentoo/patches-vim/
-# fi
}
src_compile() {
local myconf
- if [ "${PN}" = "vim-core" ]
+ if [ ${PN} = vim-core ]
then
myconf="--with-features=tiny \
--enable-gui=no \
@@ -147,28 +184,23 @@ src_compile() {
myconf="--with-features=huge \
--enable-multibyte \
--enable-cscope"
- use nls || myconf="${myconf} --disable-nls"
- 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"
-
- # Added back gpm for temporary will remove if necessary, I think that I
- # have
- # fixed most of gpm so it should be fine.
- use gpm || myconf="${myconf} --disable-gpm"
-
- # the console vim will change the caption of a terminal in X.
- # the configure script should autodetect X being installed, so
- # we'll specifically turn it off if X is not in the USE vars.
- # -rphillips
- if [ "${PN}" = "vim" ]
- then
- use X \
- && myconf="${myconf} --with-x" \
- || myconf="${myconf} --without-x"
+ myconf="${myconf} `use_enable nls`"
+ myconf="${myconf} `use_enable gpm`"
+ myconf="${myconf} `use_enable perl perlinterp`"
+ myconf="${myconf} `use_enable python pythoninterp`"
+ myconf="${myconf} `use_enable ruby rubyinterp`"
+
+ # tclinterp is broken; when you --enable-tclinterp flag, then
+ # the following command never returns:
+ # VIMINIT='let OS=system("uname -s")' vim
+ #myconf="${myconf} `use_enable tcl tclinterp`"
+
+ # The console vim will change the caption of a terminal in X.
+ # Disable this functionality unless USE=X. Don't use
+ # "use_with" here because then we're telling Vim to use X even
+ # though it might not be installed.
+ if [ ${PN} = vim ]; then
+ use X || myconf="${myconf} --without-x"
fi
fi
@@ -235,16 +267,21 @@ src_install() {
DATADIR=/usr/share \
|| die "install failed"
- dodoc README*
- cd $D/usr/share/doc/$PF
- ln -s ../../vim/*/doc $P
+ dodoc README*
+ cd $D/usr/share/doc/$PF
+ ln -s ../../vim/*/doc $P
+
+ keepdir /usr/share/vim/vim${vim_version/.}/keymap
- keepdir /usr/share/vim/vim${vim_version/.}/keymap
+ # fix problems with vim not finding its data files.
+ echo "VIMRUNTIME=/usr/share/vim/vim${vim_version/.}" > 40vim
+ insinto /etc/env.d
+ doins 40vim
- # fix problems with vim not finding its data files.
- echo "VIMRUNTIME=/usr/share/vim/vim${vim_version/.}" > 40vim
- insinto /etc/env.d
- doins 40vim
+ # default vimrc is installed by vim-core since it applies to
+ # both vim and gvim
+ insinto /etc/vim/
+ doins ${FILESDIR}/vimrc
elif [ "${PN}" = "gvim" ]
then
dobin src/gvim
@@ -258,18 +295,13 @@ src_install() {
ln -s vim ${D}/usr/bin/ex
ln -s vim ${D}/usr/bin/view
ln -s vim ${D}/usr/bin/rview
-
- # Default vimrc
- insinto /etc/vim/
- doins ${FILESDIR}/vimrc
fi
}
pkg_postinst() {
einfo
- if [ "${PN}" = "gvim" ]
- then
+ if [ ${PN} = gvim ]; then
einfo "To enable UTF-8 viewing, set guifont and guifontwide: "
einfo ":set guifont=-misc-fixed-medium-r-normal-*-18-120-100-100-c-90-iso10646-1"
einfo ":set guifontwide=-misc-fixed-medium-r-normal-*-18-120-100-100-c-180-iso10646-1"
@@ -279,8 +311,12 @@ pkg_postinst() {
einfo
einfo "Then, set read encoding to UTF-8:"
einfo ":set encoding=utf-8"
- else
+ elif [ ${PN} = vim ]; then
einfo "gvim has now a seperate ebuild, 'emerge gvim' will install gvim"
fi
einfo
+
+ # Make convenience symlinks, hopefully without stepping on toes
+ [ -f /usr/bin/gvim ] && ln -s gvim /usr/bin/vim 2>/dev/null
+ [ -f /usr/bin/vim ] && ln -s vim /usr/bin/vi 2>/dev/null
}