From 95cb4472120626afa1561ef3701c691872120b8a Mon Sep 17 00:00:00 2001
From: Daniel Dunbar <ddunbar@lordcrumb.apple.com>
Date: Mon, 24 Jun 2013 16:40:27 -0700
Subject: [PATCH] zlib: Build fix for using clang as default compiler.
---
Portfile | 3 +++
files/patch-configure-clang.diff | 33 +++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
create mode 100644 files/patch-configure-clang.diff
diff --git a/Portfile b/Portfile
index 8e11c87..11c42fe 100644
a
|
b
|
use_xz yes |
25 | 25 | checksums rmd160 2675993cab2db4a1eb69beb885c118e87bf86c64 \ |
26 | 26 | sha256 831df043236df8e9a7667b9e3bb37e1fcb1220a0f163b6de2626774b9590d057 |
27 | 27 | |
| 28 | patchfiles patch-configure-clang.diff |
| 29 | patch.pre_args -p1 |
| 30 | |
28 | 31 | minimum_xcodeversions {8 2.4.1 9 3.1} |
29 | 32 | |
30 | 33 | configure.universal_args |
diff --git a/files/patch-configure-clang.diff b/files/patch-configure-clang.diff
new file mode 100644
index 0000000..08fcb7f
-
|
+
|
|
| 1 | From 8a4e86305a0ed5cf3b0f0cd7338c77a4b564f486 Mon Sep 17 00:00:00 2001 |
| 2 | From: Daniel Dunbar <daniel@zuster.org> |
| 3 | Date: Mon, 24 Jun 2013 16:02:55 -0700 |
| 4 | Subject: [PATCH] Fix detection of "gcc"-likeness for use with LLVM/Clang. |
| 5 | |
| 6 | - When CC does not include "gcc" or "clang" explicitly in the name, |
| 7 | then configure will check the "$CC -v" output to see if the |
| 8 | compiler is gcc-like. In such cases it should also recognize the |
| 9 | presence of "clang" as indicating a gcc-like compiler. |
| 10 | |
| 11 | - This fixes problems when using Clang as the default compiler "/usr/bin/cc" on |
| 12 | Darwin, because otherwise the configure logic does not properly compute the |
| 13 | shared library extension, etc. |
| 14 | |
| 15 | --- |
| 16 | configure | 1 + |
| 17 | 1 file changed, 1 insertion(+) |
| 18 | |
| 19 | diff --git a/configure b/configure |
| 20 | index b77a8a8..54f33f7 100755 |
| 21 | --- a/configure |
| 22 | +++ b/configure |
| 23 | @@ -159,6 +159,7 @@ case "$cc" in |
| 24 | esac |
| 25 | case `$cc -v 2>&1` in |
| 26 | *gcc*) gcc=1 ;; |
| 27 | + *clang*) gcc=1 ;; |
| 28 | esac |
| 29 | |
| 30 | show $cc -c $test.c |
| 31 | -- |
| 32 | 1.8.2.1 (Apple Git-45) |
| 33 | |