aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorSamuel John2012-12-05 15:11:39 +0100
committerMike McQuaid2013-02-02 14:07:17 -0800
commitc64873e535b37df75f118b2510adcaafce126493 (patch)
tree69b4c73766e4c16dfbf301e6ff3e96b00e29ff27 /Library/Formula
parent34cfc378b5d9ef4d762365bc7a851af1f985d7c8 (diff)
downloadhomebrew-c64873e535b37df75f118b2510adcaafce126493.tar.bz2
imake: Patch to work with superenv
Closes #16420. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/imake.rb47
1 files changed, 47 insertions, 0 deletions
diff --git a/Library/Formula/imake.rb b/Library/Formula/imake.rb
index 3ef9ee2f1..4cdf335c6 100644
--- a/Library/Formula/imake.rb
+++ b/Library/Formula/imake.rb
@@ -13,6 +13,12 @@ class Imake < Formula
depends_on 'pkg-config' => :build
depends_on :x11
+ def patches
+ # Remove cpp whitespace check and add "-" to pass the cpp -undef test.
+ # These are needed to support superenv (which uses clang)
+ DATA
+ end
+
def install
ENV.deparallelize
system './configure', "--prefix=#{prefix}", '--disable-dependency-tracking'
@@ -24,3 +30,44 @@ class Imake < Formula
end
end
end
+
+__END__
+diff --git a/configure b/configure
+index d4c46f0..4a31a8a 100755
+--- a/configure
++++ b/configure
+@@ -10581,7 +10581,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+ Does cpp redefine unix ?
+ _ACEOF
+-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
++if test `${RAWCPP} - < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ else
+@@ -10600,27 +10600,6 @@ $as_echo "yes, with -ansi" >&6; }
+ fi
+ rm -f conftest.$ac_ext
+
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $RAWCPP requires -traditional" >&5
+-$as_echo_n "checking if $RAWCPP requires -traditional... " >&6; }
+-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-Does cpp preserve "whitespace"?
+-_ACEOF
+-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-else
+- if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
+- RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+-$as_echo "yes" >&6; }
+- else
+- as_fn_error $? "${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do." "$LINENO" 5
+- fi
+-fi
+-rm -f conftest.$ac_ext
+-
+-
+ CPP_PROGRAM=${RAWCPP}