aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Goodell2012-05-23 16:11:55 -0500
committerAdam Vandenberg2012-06-13 22:44:27 -0700
commit383e095ed9f829ed55fde25542f7c296259bd5c6 (patch)
treeae0699d62de0e4c4e5edd5d9513a36e20b4c143e
parent2d47966a40dc8fb6f4b1822bb2a7d6e3b84ce495 (diff)
downloadhomebrew-383e095ed9f829ed55fde25542f7c296259bd5c6.tar.bz2
subversion: --perl fixes, no clang and find EXTERN.h correctly
This will find EXTERN.h correctly even if the user has installed a custom perl installation, such as from perlbrew. See #11619 for a bit more info. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rw-r--r--Library/Formula/subversion.rb20
1 files changed, 13 insertions, 7 deletions
diff --git a/Library/Formula/subversion.rb b/Library/Formula/subversion.rb
index 022bd7e76..f63149362 100644
--- a/Library/Formula/subversion.rb
+++ b/Library/Formula/subversion.rb
@@ -64,11 +64,19 @@ class Subversion < Formula
# Patch for Subversion handling of OS X UTF-8-MAC filename.
if with_unicode_path?
{ :p0 =>
- "https://raw.github.com/gist/1900750/4888cafcf58f7355e2656fe192a77e2b6726e338/patch-path.c.diff"
+ "https://raw.github.com/gist/1900750/4888cafcf58f7355e2656fe192a77e2b6726e338/patch-path.c.diff"
}
end
end
+ # When building Perl, Python or Ruby bindings, need to use a compiler that
+ # recognizes GCC-style switches, since that's what the system languages
+ # were compiled against.
+ fails_with :clang do
+ build 318
+ cause "core.c:1: error: bad value (native) for -march= switch"
+ end if build_perl? or build_python? or build_ruby?
+
def install
if build_java?
unless ARGV.build_universal?
@@ -126,16 +134,14 @@ class Subversion < Formula
arches = "-arch x86_64"
end
- # Use version-appropriate system Perl
- if MacOS.leopard?
- perl_version = "5.8.8"
- else
- perl_version = "5.10.0"
+ perl_core = Pathname.new(`perl -MConfig -e 'print $Config{archlib}'`)+'CORE'
+ unless perl_core.exist?
+ onoe "perl CORE directory does not exist in '#{perl_core}'"
end
inreplace "Makefile" do |s|
s.change_make_var! "SWIG_PL_INCLUDES",
- "$(SWIG_INCLUDES) #{arches} -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -I/System/Library/Perl/#{perl_version}/darwin-thread-multi-2level/CORE"
+ "$(SWIG_INCLUDES) #{arches} -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -I#{perl_core}"
end
system "make swig-pl"
system "make install-swig-pl"