From 981db30cd1060e29154820ec30cdfd5daae7f0d4 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Sun, 20 Oct 2013 00:33:13 -0700 Subject: [PATCH] vim: patch for -no-cpp-precomp --- Formula/vim.rb | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/Formula/vim.rb b/Formula/vim.rb index 1a9a0f92e1..d9eed53e05 100644 --- a/Formula/vim.rb +++ b/Formula/vim.rb @@ -29,6 +29,11 @@ class Vim < Formula depends_on :python => :recommended depends_on 'lua' => :optional + # vim uses the obsolete Apple-only -no-cpp-precomp flag, which + # FSF GCC can't understand; reported upstream: + # https://groups.google.com/forum/#!topic/vim_dev/X5yG3-IiUp8 + def patches; DATA; end + def install ENV['LUA_PREFIX'] = HOMEBREW_PREFIX if build.with?('lua') @@ -81,3 +86,40 @@ class Vim < Formula ln_s bin+'vim', bin+'vi' if build.include? 'override-system-vi' end end + +__END__ +diff --git a/src/auto/configure b/src/auto/configure +index 07f794e..5736d80 100755 +--- a/src/auto/configure ++++ b/src/auto/configure +@@ -4221,7 +4221,7 @@ rm -f core conftest.err conftest.$ac_objext \ + MACOSX=yes + OS_EXTRA_SRC="os_macosx.m os_mac_conv.c"; + OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" +- CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp" ++ CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX" + + # On IRIX 5.3, sys/types and inttypes.h are conflicting. + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ +@@ -4298,7 +4298,7 @@ fi + + if test "$GCC" = yes -a "$local_dir" != no; then + echo 'void f(){}' > conftest.c +- have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 2>&1 | grep "${local_dir}/include"` ++ have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"` + have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"` + rm -f conftest.c conftest.o + fi +diff --git a/src/osdef.sh b/src/osdef.sh +index d7d4f2a..7015d7b 100755 +--- a/src/osdef.sh ++++ b/src/osdef.sh +@@ -49,7 +49,6 @@ EOF + + # Mac uses precompiled headers, but we need real headers here. + case `uname` in +- Darwin) $CC -I. -I$srcdir -E -no-cpp-precomp osdef0.c >osdef0.cc;; + *) $CC -I. -I$srcdir -E osdef0.c >osdef0.cc;; + esac + +