tclConfig.sh change (?) breaks Vim build

Michael Edenfield kutulu at kutulu.org
Wed Mar 24 14:16:40 PST 2004


After upgrading Tcl to 8.4.6, I'm no longer able to build vim with Tcl
support.  I have tracked down the problem but I'm not sure which port
should be "fixed".  I suspect it's vim but I'm not sure why this problem
hasn't appeared any time before.

The problem is in the tclConfig.sh script.  Vim runs this to get the
TCL_DEFS variable, then parses out anything that's not one of a small
number of #defines.  But when it tries to tokenize the variable, it runs
into this:

-DTCL_WIDE_INT_TYPE=long\ long

and splits that into:

-DTCL_WIDE_INT_TYPE=long\
long

and the "long" on a line by itself gets left in.  This ultimately gets
added into vim's CFLAGS, and since it's not an option, gcc tries to
build a file called 'long'.  This leads eventually to:

gcc -c $CFLAGS -o outfile srcfile.c

failing because you can't use -c and -o when you have multiple source
files.

The fix, as far as I can tell, requires editing the src/auto/configure
script in the vim port.  Sadly, my configure skills are severely
lacking, so I haven't figured out what to patch to make this change
keep, that doesn't look like a cheap hack.  

This is the diff that shows what ultimately needs to happen (I just
remove everything from TCL_DEFS that isn't a -DFLAG), if someone can
guide me on how to get a port-ready patch for this?

--- configure   Wed Mar 24 16:51:36 2004
+++ configure.new       Wed Mar 24 17:13:23 2004
@@ -1931,7 +1931,7 @@
            echo "$ac_t""$try/tclConfig.sh" 1>&6
            . $try/tclConfig.sh
                    TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
-                           TCL_DEFS=`echo $TCL_DEFS | tr ' ' '\012' | sed -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr -d '\012'`
+                           TCL_DEFS=`echo $TCL_DEFS | tr ' ' '\012' | sed -e '/^[^-]/d' -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr -d '\012'`
            break
          fi
        done


--K


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20040324/caa0d87c/attachment.bin


More information about the freebsd-ports mailing list