Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 8327 - vim linked with X libraries?
Summary: vim linked with X libraries?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Ryan Phillips (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-24 16:13 UTC by Jon Nelson (RETIRED)
Modified: 2003-02-04 19:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Nelson (RETIRED) 2002-09-24 16:13:36 UTC
VIM appears to be linked with the X libraries, contrary to every other distro I
tried (various RedHat, Debian, and something else I forgot.)

Additonally, if the DISPLAY environment variable is either bad or points to a
server which is no longer accepting, vim won't even run or will start up very
slowly.

Why is this?  Isn't this why we have gvim?
Comment 1 Ryan Phillips (RETIRED) gentoo-dev 2002-09-24 18:48:53 UTC
Maybe Hannes has an answer to this?
Comment 2 Hannes Mehnert (RETIRED) gentoo-dev 2002-09-24 19:16:48 UTC
no idea why, we should do a ./configure --without-x in vim ebuild. 
Comment 3 Jon Nelson (RETIRED) 2002-09-24 20:28:19 UTC
After applying the below patch, things work great!
--without-x is just right.
Note that I added a "|| die" to the second set of patching.
Please also note that the follwoing two patches *fail* to apply:


/var/tmp/portage/vim-6.1-r13/work/6.1.080
/var/tmp/portage/vim-6.1-r13/work/6.1.084

For testing purposes, the following patch to -r12 works great.
However, the "echo $?" should go away and the patch line should end with "|| die"

I can probably fix/clean-up the two patches.


--- vim-6.1-r12.ebuild  Sat Sep 21 19:20:04 2002
+++ vim-6.1-r13.ebuild  Tue Sep 24 20:26:13 2002
@@ -113,16 +113,19 @@
                *)
                        cd $S
                        for a in $patches; do
-                               patch -p0 < $a
+                               echo -n "Applying patch $a..."
+                               patch -p0 < $a > /dev/null
+                               echo $?
                        done
                        ;;
        esac
 }
 
 src_compile() {
-
        local myconf
-       use nls    && myconf="--enable-multibyte" || myconf="--disable-nls"
+       myconf="--without-x"
+       use nls    && myconf="$myconf --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"
Comment 4 Jon Nelson (RETIRED) 2002-09-24 20:46:35 UTC
Below I have the results of running unpack with, and without, patches
80 and 84.  With the exception of the version.c file (patch for that also
included), the result is a clean patch to be applied *after* all other patches:

First, the src/auto/configure and src/version.c patch:

diff -urN /tmp/src/auto/configure src/auto/configure
--- /tmp/src/auto/configure     Tue Sep 24 20:39:56 2002
+++ src/auto/configure  Tue Sep 24 20:40:22 2002
@@ -1160,13 +1160,21 @@
 
 
 
-if test -d /usr/local/lib; then
+have_local_include=''
+have_local_lib=''
+if test "$GCC" = yes; then
+  echo 'void f(){}' > conftest.c
+  have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep '/usr/local/include'`
+  have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep '/usr/local/lib'`
+  rm -f conftest.c conftest.o
+fi
+if test -z "$have_local_lib" -a -d /usr/local/lib; then
   tt=`echo "$LDFLAGS" | sed -e 's+-L/usr/local/lib ++g' -e
's+-L/usr/local/lib$++g'`
   if test "$tt" = "$LDFLAGS"; then
     LDFLAGS="$LDFLAGS -L/usr/local/lib"
   fi
 fi
-if test -d /usr/local/include; then
+if test -z "$have_local_include" -a -d /usr/local/include; then
   tt=`echo "$CPPFLAGS" | sed -e 's+-I/usr/local/include ++g' -e
's+-I/usr/local/include$++g'`
   if test "$tt" = "$CPPFLAGS"; then
     # Don't do this if gcc looks in /usr/local/include by default! gcc 3.1+ is
rather
diff -urN /tmp/src/version.c src/version.c
--- /tmp/src/version.c  Tue Sep 24 20:39:56 2002
+++ src/version.c       Tue Sep 24 20:40:23 2002
@@ -723,12 +723,16 @@
 /**/
     85,
 /**/
+    84,
+/**/
     83,
 /**/
     82,
 /**/
     81,
 /**/
+    80,
+/**/
     79,
 /**/
     78,








Now, the diff from -r12 to -r13

--- vim-6.1-r12.ebuild  Sat Sep 21 19:20:04 2002
+++ vim-6.1-r13.ebuild  Tue Sep 24 20:46:22 2002
@@ -105,6 +105,8 @@
        tar xvjf ${DISTDIR}/${VIMPATCH}
        cd ${S}
 
+       if test -f ${WORKDIR}/6.1.080; then rm -f ${WORKDIR}/6.1.080; fi
+       if test -f ${WORKDIR}/6.1.084; then rm -f ${WORKDIR}/6.1.084; fi
        # Apply any patches available for this version
        local patches=`echo ${WORKDIR}/${PV}.[0-9][0-9][0-9]`
        case "$patches" in
@@ -113,16 +115,20 @@
                *)
                        cd $S
                        for a in $patches; do
-                               patch -p0 < $a
+                               echo -n "Applying patch $a..."
+                               patch -p0 < $a > /dev/null || die
+                               echo "OK"
                        done
                        ;;
        esac
+       patch -p0 < ~jnelson/80.84.combined || die
 }
 
 src_compile() {
-
        local myconf
-       use nls    && myconf="--enable-multibyte" || myconf="--disable-nls"
+       myconf="--without-x"
+       use nls    && myconf="$myconf --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"


Comment 5 Hannes Mehnert (RETIRED) gentoo-dev 2002-09-24 21:41:34 UTC
jnelson: great, feel free to commit vim-6.1-r13. 
Comment 6 Jon Nelson (RETIRED) 2002-09-24 22:35:42 UTC
I just did a cvs commit for -r13, it works for me!