vim: patch for -no-cpp-precomp

This commit is contained in:
Misty De Meo 2013-10-20 00:33:13 -07:00
parent 1fd9c312b3
commit 981db30cd1

View file

@ -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