Skip to content

Instantly share code, notes, and snippets.

@goodell
Created May 23, 2012 20:39
Show Gist options
  • Save goodell/116eade3868bcca7e716 to your computer and use it in GitHub Desktop.
Save goodell/116eade3868bcca7e716 to your computer and use it in GitHub Desktop.
diff --git a/Library/Formula/subversion.rb b/Library/Formula/subversion.rb
index 65f1ef6..b7ff693 100644
--- a/Library/Formula/subversion.rb
+++ b/Library/Formula/subversion.rb
@@ -36,6 +36,12 @@ class Subversion < Formula
depends_on 'pkg-config' => :build
+ # really only when --perl is passed
+ fails_with :clang do
+ build 318
+ cause "core.c:1: error: bad value (native) for -march= switch"
+ end
+
# If Subversion can use the Lion versions of these, please
# open an issue with a patch. Build against Homebrewed versions
# for consistency. - @adamv
@@ -113,16 +119,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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment