diff options
-rw-r--r-- | app-editors/gvim/files/digest-gvim-6.1-r6 | 3 | ||||
-rw-r--r-- | app-editors/gvim/files/vimpatch.tar.bz2 | bin | 3116 -> 0 bytes | |||
-rw-r--r-- | app-editors/gvim/gvim-6.1-r6.ebuild | 78 | ||||
-rw-r--r-- | app-editors/vim/files/digest-vim-6.1-r19 | 3 | ||||
-rw-r--r-- | app-editors/vim/files/digest-vim-6.1-r20 | 4 | ||||
-rw-r--r-- | app-editors/vim/files/ebuild.patch | 12 | ||||
-rw-r--r-- | app-editors/vim/files/gvimrc | 16 | ||||
-rw-r--r-- | app-editors/vim/files/vimpatch.tar.bz2 | bin | 3116 -> 0 bytes | |||
-rw-r--r-- | app-editors/vim/files/vimrc | 92 | ||||
-rw-r--r-- | app-editors/vim/vim-6.1-r19.ebuild | 20 | ||||
-rw-r--r-- | app-editors/vim/vim-6.1-r20.ebuild | 28 | ||||
-rw-r--r-- | eclass/vim.eclass | 215 |
12 files changed, 288 insertions, 183 deletions
diff --git a/app-editors/gvim/files/digest-gvim-6.1-r6 b/app-editors/gvim/files/digest-gvim-6.1-r6 index 5bcad15a6311..a5fb23e1e02b 100644 --- a/app-editors/gvim/files/digest-gvim-6.1-r6 +++ b/app-editors/gvim/files/digest-gvim-6.1-r6 @@ -1,3 +1,4 @@ MD5 7fd0f915adc7c0dab89772884268b030 vim-6.1.tar.bz2 2890049 -MD5 9ead3eaf912e0b63aae3ee5b55b70f25 vimpatch-1-300.tar.bz2 220361 +MD5 317606a613f68d03f381dba377a20031 vim-6.1-patches-001-300.tar.bz2 407085 +MD5 81071e861e9f07b06f18b29ee03769d3 vim-6.1-gentoo-patches.tar.bz2 3572 MD5 ed6742805866d11d6a28267330980ab1 vim-6.1-lang.tar.gz 866974 diff --git a/app-editors/gvim/files/vimpatch.tar.bz2 b/app-editors/gvim/files/vimpatch.tar.bz2 Binary files differdeleted file mode 100644 index f150f41bbfeb..000000000000 --- a/app-editors/gvim/files/vimpatch.tar.bz2 +++ /dev/null diff --git a/app-editors/gvim/gvim-6.1-r6.ebuild b/app-editors/gvim/gvim-6.1-r6.ebuild index 9967fdba79f5..11aa1220625c 100644 --- a/app-editors/gvim/gvim-6.1-r6.ebuild +++ b/app-editors/gvim/gvim-6.1-r6.ebuild @@ -1,11 +1,13 @@ # 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-r6.ebuild,v 1.5 2003/03/11 21:11:44 seemant Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/gvim/gvim-6.1-r6.ebuild,v 1.6 2003/03/13 22:18:23 seemant Exp $ -VIMPATCH="vimpatch-1-300.tar.bz2" +EGUI_ENABLE=yes + +VIMPATCH="300" inherit vim -DESCRIPTION="graphical vim" +DESCRIPTION="Graphical Vim" KEYWORDS="x86 ppc sparc alpha" DEPEND="dev-util/cscope >=sys-libs/ncurses-5.2-r2 @@ -27,73 +29,3 @@ DEPEND="dev-util/cscope # # Please don't re-enable the tclinterp flag without verifying first # that the above works. Thanks. (08 Sep 2001 agriffis) - -src_compile() { - #default myconf options added by ZhEN on 11/20/02 for unicode support - local myconf="--with-features=big --enable-multibyte" - use nls && myconf="--enable-multibyte" || 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" - - if use gnome; then - guiconf="--enable-gui=gnome --with-x" - elif use gtk; then - guiconf="--enable-gui=gtk --with-x" - else - guiconf="--enable-gui=athena --with-x" - fi - - # This should fix a sandbox violation. - for file in /dev/pty/s* - do - addwrite $file - done - - if [ -n "$guiconf" ]; then - ./configure \ - --prefix=/usr --mandir=/usr/share/man --host=$CHOST \ - --with-features=huge --enable-cscope $myconf $guiconf \ - --with-vim-name=gvim || die "gvim configure failed" - - # move config files to /etc/vim/ - echo "#define SYS_VIMRC_FILE \"/etc/vim/vimrc\"" \ - >>${WORKDIR}/vim61/src/feature.h - echo "#define SYS_GVIMRC_FILE \"/etc/vim/gvimrc\"" \ - >>${WORKDIR}/vim61/src/feature.h - - # Parallel make does not work - make || die "gvim make failed" - fi -} - -src_install() { - dobin src/gvim - ln -s gvim ${D}/usr/bin/gvimdiff - # Default gvimrc - insinto /etc/vim/ - doins ${FILESDIR}/gvimrc -} - -#added by ZhEN 11/20/02 for unicode -pkg_postinst() { - einfo - 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" - einfo - einfo "note: to find out which fonts you can use, please read the UTF-8 help:" - einfo ":h utf-8" - einfo - einfo "Then, set read encoding to UTF-8:" - einfo ":set encoding=utf-8" - einfo - -} diff --git a/app-editors/vim/files/digest-vim-6.1-r19 b/app-editors/vim/files/digest-vim-6.1-r19 index 5bcad15a6311..a5fb23e1e02b 100644 --- a/app-editors/vim/files/digest-vim-6.1-r19 +++ b/app-editors/vim/files/digest-vim-6.1-r19 @@ -1,3 +1,4 @@ MD5 7fd0f915adc7c0dab89772884268b030 vim-6.1.tar.bz2 2890049 -MD5 9ead3eaf912e0b63aae3ee5b55b70f25 vimpatch-1-300.tar.bz2 220361 +MD5 317606a613f68d03f381dba377a20031 vim-6.1-patches-001-300.tar.bz2 407085 +MD5 81071e861e9f07b06f18b29ee03769d3 vim-6.1-gentoo-patches.tar.bz2 3572 MD5 ed6742805866d11d6a28267330980ab1 vim-6.1-lang.tar.gz 866974 diff --git a/app-editors/vim/files/digest-vim-6.1-r20 b/app-editors/vim/files/digest-vim-6.1-r20 index fdc355f9f02d..b239b73e14cb 100644 --- a/app-editors/vim/files/digest-vim-6.1-r20 +++ b/app-editors/vim/files/digest-vim-6.1-r20 @@ -1,4 +1,4 @@ MD5 7fd0f915adc7c0dab89772884268b030 vim-6.1.tar.bz2 2890049 -MD5 3c743967e2d9ed45ce2228525a408d32 vimpatch-1-386.tar.bz2 543181 -MD5 fe2996fdbb3f072109c2fbc7bbbf0c05 vimpatch-gentoo.tar.bz2 3156 +MD5 41036a29f848a33bc2903224f2b4f6e6 vim-6.1-patches-001-390.tar.bz2 714902 +MD5 81071e861e9f07b06f18b29ee03769d3 vim-6.1-gentoo-patches.tar.bz2 3572 MD5 ed6742805866d11d6a28267330980ab1 vim-6.1-lang.tar.gz 866974 diff --git a/app-editors/vim/files/ebuild.patch b/app-editors/vim/files/ebuild.patch deleted file mode 100644 index 1c52d3c9b0ed..000000000000 --- a/app-editors/vim/files/ebuild.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- filetype.vim.old Thu Sep 27 09:36:02 2001 -+++ filetype.vim Wed Oct 17 07:26:31 2001 -@@ -951,6 +951,9 @@ - au BufNewFile,BufRead /etc/profile,.profile*,*.sh,*.env call SetFileTypeSH(getline(1)) - au BufNewFile,BufRead .login*,.cshrc*,csh.cshrc,csh.login,csh.logout,.tcshrc*,*.csh,*.tcsh,.alias setf csh - -+" Gentoo ebuilds are actually bash scripts -+au BufNewFile,BufRead *.ebuild call SetFileTypeSH("bash") -+ - fun! SetFileTypeSH(name) - if a:name =~ '\<ksh\>' - let b:is_kornshell = 1 diff --git a/app-editors/vim/files/gvimrc b/app-editors/vim/files/gvimrc deleted file mode 100644 index 81d574de9a35..000000000000 --- a/app-editors/vim/files/gvimrc +++ /dev/null @@ -1,16 +0,0 @@ -" Default configuration file for gvim -" Written by Aron Griffis <agriffis@gentoo.org> -" -" This file is read AFTER normal Vim initializations, like reading your .vimrc -" file (and the default /usr/share/vim/vimrc). So there's no reason to -" duplicate settings from vimrc. Red Hat has had this wrong for years, to the -" great annoyance of users. - -" Pre-GUI settings -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 - -" Use a sufficiently wide window automatically when started as "gvimdiff" -if (&foldmethod == 'diff') - set columns=165 -endif diff --git a/app-editors/vim/files/vimpatch.tar.bz2 b/app-editors/vim/files/vimpatch.tar.bz2 Binary files differdeleted file mode 100644 index f150f41bbfeb..000000000000 --- a/app-editors/vim/files/vimpatch.tar.bz2 +++ /dev/null diff --git a/app-editors/vim/files/vimrc b/app-editors/vim/files/vimrc index 7596f42d8f8e..2038d96d9c01 100644 --- a/app-editors/vim/files/vimrc +++ b/app-editors/vim/files/vimrc @@ -1,35 +1,93 @@ " 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 -" really makes sense. -set nocompatible " Use Vim defaults (much better!) -set backspace=2 " allow backspacing over everything in insert mode -set autoindent " always set autoindenting on -set ruler " show the cursor position all the time +" 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 #14088 -" -rphillips + +" Added to default to high security within Gentoo. Fixes bug #14088 set modelines=0 -" Vim beeps in gnome-terminals when trying to fetch the terminal version. -" This is really a bug in gnome-terminal (I think), but we can workaround it -" with the following code. -if &term =~ "xterm" - set t_RV= " don't check terminal version +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://lists.gentoo.org/pipermail/gentoo-dev/2001-November/007985.html -" http://www.gentoo.org/doc/gentoo-howto.html -" (search for "Rules for writing an ebuild file") +" http://www.gentoo.org/doc/en/xml/gentoo-howto.xml augroup gentoo au! au BufRead,BufNewFile *.ebuild set tabstop=4 shiftwidth=4 noexpandtab augroup END endif " has("autocmd") + +" some extra commands for HTML editing +nmap ,mh wbgueyei<<ESC>ea></<ESC>pa><ESC>bba +nmap ,h1 _i<h1><ESC>A</h1><ESC> +nmap ,h2 _i<h2><ESC>A</h2><ESC> +nmap ,h3 _i<h3><ESC>A</h3><ESC> +nmap ,h4 _i<h4><ESC>A</h4><ESC> +nmap ,h5 _i<h5><ESC>A</h5><ESC> +nmap ,h6 _i<h6><ESC>A</h6><ESC> +nmap ,hb wbi<b><ESC>ea</b><ESC>bb +nmap ,he wbi<em><ESC>ea</em><ESC>bb +nmap ,hi wbi<i><ESC>ea</i><ESC>bb +nmap ,hu wbi<u><ESC>ea</i><ESC>bb +nmap ,hs wbi<strong><ESC>ea</strong><ESC>bb +nmap ,ht wbi<tt><ESC>ea</tt><ESC>bb +nmap ,hx wbF<df>f<df> + diff --git a/app-editors/vim/vim-6.1-r19.ebuild b/app-editors/vim/vim-6.1-r19.ebuild index 439bdb107ef2..312d12056aed 100644 --- a/app-editors/vim/vim-6.1-r19.ebuild +++ b/app-editors/vim/vim-6.1-r19.ebuild @@ -1,10 +1,15 @@ # 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-r19.ebuild,v 1.7 2003/03/11 21:11:44 seemant Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/vim/vim-6.1-r19.ebuild,v 1.8 2003/03/13 22:18:23 seemant Exp $ IUSE="nls perl python ruby tcltk gpm X" -VIMPATCH="vimpatch-1-300.tar.bz2" +VIMPATCH="300" +EXCLUDE_PATCH="093 100 119 121 126 138 152 164 258 \ +304 314 322 334 335 340 346 352 353 354 355 356 374" + +use nls || EXCLUDE_PATCH="${EXCLUDE_PATCH} 295 301" + inherit vim DESCRIPTION="Vi IMproved!" @@ -52,10 +57,10 @@ src_compile() { # # Build a nogui version, this will install as /usr/bin/vim # - ./configure \ - --prefix=/usr --mandir=/usr/share/man --host=$CHOST \ - --with-features=huge --enable-cscope $myconf \ + econf \ --enable-gui=no \ + --with-features=huge \ + --enable-cscope ${myconf} \ || die "vim configure failed" # move config files to /etc/vim/ @@ -78,10 +83,11 @@ src_install() { # Default vimrc insinto /etc/vim/ - doins ${FILESDIR}/vimrc + doins ${WORKDIR}/gentoo/vimrc } pkg_postinst() { - einfo "" + einfo einfo "gvim has now a seperate ebuild, 'emerge gvim' will install gvim" + einfo } diff --git a/app-editors/vim/vim-6.1-r20.ebuild b/app-editors/vim/vim-6.1-r20.ebuild new file mode 100644 index 000000000000..8f002b818226 --- /dev/null +++ b/app-editors/vim/vim-6.1-r20.ebuild @@ -0,0 +1,28 @@ +# 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-r20.ebuild,v 1.1 2003/03/13 22:18:23 seemant Exp $ + +IUSE="nls perl python ruby tcltk gpm X" + +VIMPATCH="390" + +EXCLUDE_PATCH="093 100 119 121 126 138 152 164 258 \ +304 314 322 334 335 340 346 352 353 354 355 356 374" + +use nls || EXCLUDE_PATCH="${EXCLUDE_PATCH} 295 301" + +inherit vim + +DESCRIPTION="Vi IMproved!" +KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~arm" +DEPEND="app-editors/vim-core + 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 )" +# tcltk? ( dev-lang/tcl )" + +PROVIDE="virtual/editor" diff --git a/eclass/vim.eclass b/eclass/vim.eclass index 8252d99993f4..e3e3906a4b5d 100644 --- a/eclass/vim.eclass +++ b/eclass/vim.eclass @@ -1,50 +1,61 @@ # 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.7 2003/03/12 06:45:49 jhhudso Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/vim.eclass,v 1.8 2003/03/13 22:18:23 seemant Exp $ # # Author Ryan Phillips <rphillips@gentoo.org> # # Ripped from the vim ebuilds. src_compile and install # should be integrated in at some point +inherit eutils + # Calculate the version based on the name of the ebuild vim_version="${PV%_pre*}" vim_pre="${PV##*_pre}" -if [ "$vim_version" = "$vim_pre" ]; then +if [ "${vim_version}" = "${vim_pre}" ]; then # Final releases prior to 6.0 include a dash and decimal point in # the directory name if [ "${vim_version%%.*}" -lt 6 ]; then - S="$WORKDIR/vim-$vim_version" + S="$WORKDIR/vim-${vim_version}" else S="$WORKDIR/vim${vim_version//.}" fi vim_letters= - A="vim-$vim_version.tar.bz2" - SRC_URI="ftp://ftp.vim.org/pub/vim/unix/$A - ftp://ftp.us.vim.org/pub/vim/unix/$A - http://www.ibiblio.org/gentoo/distfiles/${VIMPATCH}" -elif [ "$vim_pre" -lt 27 ]; then + MY_P="vim-${vim_version}" + 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}'` - S="$WORKDIR/vim${vim_version//.}$vim_letters" - A="vim-$vim_version$vim_letters.tar.bz2" - SRC_URI="ftp://ftp.vim.org/pub/vim/unreleased/unix/$A - ftp://ftp.us.vim.org/pub/vim/unreleased/unix/$A - http://www.ibiblio.org/gentoo/distfiles/${VIMPATCH}" - -elif [ "$vim_pre" -lt 703 ]; then + vim_letters=`echo ${vim_pre} | awk '{printf "%c", $0+96}'` + S="$WORKDIR/vim${vim_version//.}${vim_letters}" + MY_P="vim-${vim_version}${vim_letters}" + 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" + +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.vim.org/pub/vim/unreleased/unix/$A - ftp://ftp.us.vim.org/pub/vim/unreleased/unix/$A - http://www.ibiblio.org/gentoo/distfiles/${VIMPATCH}" + vim_letters=`echo ${vim_pre} | awk '{printf "%c%c", $0/26+96, $0%26+96}'` + S="$WORKDIR/vim${vim_version//.}${vim_letters}" + MY_P="vim-${vim_version}${vim_letters}" + 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} + http://cvs.gentoo.org/~seemant/vim-${PV}-patches-001-${VIMPATCH}.tar.bz2 + mirror://gentoo/vim-${PV}-patches-001-${VIMPATCH}.tar.bz2" + +SRC_URI="${SRC_URI} + mirror://vim-${PV}-gentoo-patches.tar.bz2 + http://cvs.gentoo.org/~seemant/vim-${PV}-gentoo-patches.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} )" @@ -54,46 +65,142 @@ 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 + + for i in ${EXCLUDE_PATCH} + do + rm -f ${WORKDIR}/vimpatches/${PV}.${i}.gz + done + + eend $? +} + + src_unpack() { unpack ${A} - use nls && unpack ${LANG} # 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 + + EPATCH_SUFFIX="gz" EPATCH_FORCE="yes" \ + epatch ${WORKDIR}/vimpatches/ + # Another set of patch's borrowed from src rpm to fix syntax error's etc. - cd ${WORKDIR} - tar xvjf ${FILESDIR}/vimpatch.tar.bz2 - cd $S - patch -p1 < ${WORKDIR}/vim-4.2-speed_t.patch || die - patch -p1 < ${WORKDIR}/vim-5.1-vimnotvi.patch || die - patch -p1 < ${WORKDIR}/vim-5.6a-paths.patch || die - patch -p1 < ${WORKDIR}/vim-6.0-fixkeys.patch || die - patch -p1 < ${WORKDIR}/vim-6.0-specsyntax.patch || die - patch -p1 < ${WORKDIR}/vim-6.0r-crv.patch || die - - cd ${WORKDIR} - tar xvjf ${DISTDIR}/${VIMPATCH} cd ${S} - - # Apply any patches available for this version - local patches=`echo ${WORKDIR}/${PV}.[0-9][0-9][0-9]` - case "$patches" in - *\]) - ;; # globbing didn't work; no patches available - *) - cd $S - for a in $patches; do - echo -n "Applying patch $a..." - patch -p0 < $a > /dev/null || die - echo "OK" - done - ;; - esac - - # Also apply the ebuild syntax patch, until this is in Vim proper - cd $S/runtime - patch -f -p0 < ${FILESDIR}/ebuild.patch + EPATCH_SUFFIX="" \ + EPATCH_FORCE="yes" \ + epatch ${WORKDIR}/gentoo/patches +} + +src_compile() { + local myconf + local guiconf + myconf="--with-features=big --enable-multibyte" + 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 + use X \ + && myconf="${myconf} --with-x" \ + || myconf="${myconf} --without-x" + + # This should fix a sandbox violation. + for file in /dev/pty/s* + do + addwrite $file + done + + + if [ "${EGUI_ENABLE}" = "yes" ] + then + myconf="${myconf} --with-vim-name=gvim --with-x" + if use gnome; then + myconf="${myconf} --enable-gui=gnome" + elif use gtk; then + myconf="${myconf} --enable-gui=gtk" + else + myconf="${myconf} --enable-gui=athena" + fi + else + myconf="${myconf} --enable-gui=no" + fi + + + econf \ + --with-features=huge \ + --enable-cscope ${myconf} \ + || die "vim configure failed" + + # move config files to /etc/vim/ + echo "#define SYS_VIMRC_FILE \"/etc/vim/vimrc\"" \ + >>${WORKDIR}/vim61/src/feature.h + echo "#define SYS_GVIMRC_FILE \"/etc/vim/gvimrc\"" \ + >>${WORKDIR}/vim61/src/feature.h + + # Parallel make does not work + make || die "vim make failed" } +src_install() { + + if [ "${EGUI_ENABLE}" = "yes" ] + then + dobin src/gvim + dosym gvim /usr/bin/gvimdiff + insinto /etc/vim + doins ${FILESDIR}/gvimrc + else + dobin src/vim + ln -s vim ${D}/usr/bin/vimdiff + ln -s vim ${D}/usr/bin/rvim + 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 [ "${EGUI_ENABLE}" = "yes" ] + 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" + einfo + einfo "note: to find out which fonts you can use, please read the UTF-8 help:" + einfo ":h utf-8" + einfo + einfo "Then, set read encoding to UTF-8:" + einfo ":set encoding=utf-8" + else + einfo "gvim has now a seperate ebuild, 'emerge gvim' will install gvim" + fi + einfo +} |