gcc-3.1 and Vim 6.1

Michael Brömer mib at telebel.de
Wed May 22 23:01:28 PDT 2002

Am Donnerstag, 23. Mai 2002 02:53 schrieben Sie:
> Would someone care to upload a patch for this?  I'd do it but have 
> no idea how to write a patch file!
It is actually pretty simple if you identified the stuff you
would like to have changed with the patch.

> Anyone care to coment on this more, please as I'm a
> far far far cry from a programmer or guru or anything else who know what
> the heck I'm doing!! ;-)

Compiling vim-6.1 with gcc-3.1 works for me when i remove the
lines 1164 to 1170 in the file vim-6.1/src/auto/configure.

Producing a patch for this goes as follows:
1.) Extract the sourcetree somewhere, lets say in a directory
called $SourceDir.
:> cd $SourceDir && tar xvfj <path_to_your_archive>/vim-6.1.tar.bz2
2.) Rename the resulting directory to "orig" since it contains the
original sourcetree.
:> mv vim61 orig
3.) Extract the sourcetree again in the same directory
:> tar xvfj <path_to_your_archive>/vim-6.1.tar.bz2
4.) Rename the resulting directoy to "patched" since it will contain
the edited files you will produce.
:> mv vim61 patched
5.) Now edit whatever you would like to be changed in $SourceDir/patched.
In this case the file patched/src/auto/configure, where i deleted the
lines 1164 to 1170.
:> cd patched
:> <your_editor> src/auto/configure
6.) When you are finished editing remove all unwanted files, for instance 
temporary files your editor might habe created and produce the patch.
:> cd $SourceDir
:> diff -Naur orig patched > vim-6.1.patch
:> bzip2 vim-6.1.patch
7.) Store your brand new patch at the same place where you keep your
source tarball.
:> mv vim-6.1.patch.bz2 <path_to_your_archive>

Now, building vim-6.1 with gcc-3.1 using your brand new patch goes as
:> cd $SourceDir
:> tar xvfj <path_to_your_archive>/vim-6.1.tar.bz2
:> cp <path_to_your_archive>/vim-6.1.patch.bz2 .
:> bunzip2 vim-6.1.patch.bz2
:> cd vim61
:> patch -Np1 -i ../vim-6.1.patch
:> ./configure --prefix=/usr --localstatedir=/var/lib/vim

The actual patch looks like this:

diff -Naur orig/src/auto/configure patch/src/auto/configure
--- orig/src/auto/configure     2002-03-09 19:14:07.000000000 +0100
+++ patched/src/auto/configure    2002-05-17 06:05:10.000000000 +0200
@@ -1161,12 +1161,6 @@
     LDFLAGS="$LDFLAGS -L/usr/local/lib"
-if test -d /usr/local/include; then
-  tt=`echo "$CPPFLAGS" | sed -e 's+-I/usr/local/include ++g' -e 
-  if test "$tt" = "$CPPFLAGS"; then
-    CPPFLAGS="$CPPFLAGS -I/usr/local/include"
-  fi

 echo $ac_n "checking --with-vim-name argument""... $ac_c" 1>&6
 echo "configure:1173: checking --with-vim-name argument" >&5


Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message

More information about the lfs-dev mailing list