aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMisty De Meo2013-10-20 00:33:13 -0700
committerMisty De Meo2013-10-20 00:33:13 -0700
commit06dee3886737df532fbbff51961717fb0c8210f2 (patch)
treeadcbe119e98b2a888c9c584cfd126d20db63f14a /Library/Formula
parentdbeb9c2a272fa2a49529dd2186c53f3c982915c9 (diff)
downloadhomebrew-06dee3886737df532fbbff51961717fb0c8210f2.tar.bz2
vim: patch for -no-cpp-precomp
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/vim.rb42
1 files changed, 42 insertions, 0 deletions
diff --git a/Library/Formula/vim.rb b/Library/Formula/vim.rb
index 1a9a0f92e..d9eed53e0 100644
--- a/Library/Formula/vim.rb
+++ b/Library/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
+
+