Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
imake: Patch to work with superenv
Browse files Browse the repository at this point in the history
Closes #16420.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
  • Loading branch information
samueljohn authored and MikeMcQuaid committed Feb 2, 2013
1 parent 69eb55d commit 92ea4c2
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions Library/Formula/imake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -24,3 +30,44 @@ def install
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}

0 comments on commit 92ea4c2

Please sign in to comment.