Skip to content

Commit

Permalink
subversion: fix errant '-arch ppc' in perl bindings build
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information
jeffstyr authored and fgeller committed Aug 22, 2012
1 parent 76f8fcb commit 0248370
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions Library/Formula/subversion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,20 @@ def options
end

def patches
ps = []

# 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"
}
ps << "https://raw.github.com/gist/3044094/1648c28f6133bcbb68b76b42669b0dc237c02dba/patch-path.c.diff"
end

# Patch to prevent '-arch ppc' from being pulled in from Perl's $Config{ccflags}
if build_perl?
ps << DATA
end

unless ps.empty?
{ :p0 => ps }
end
end

Expand Down Expand Up @@ -234,3 +243,21 @@ def caveats
return s.empty? ? nil : s
end
end
__END__
--- subversion/bindings/swig/perl/native/Makefile.PL.in~ 2011-07-16 04:47:59.000000000 -0700
+++ subversion/bindings/swig/perl/native/Makefile.PL.in 2012-06-27 17:45:57.000000000 -0700
@@ -57,10 +57,13 @@

chomp $apr_shlib_path_var;

+my $config_ccflags = $Config{ccflags};
+$config_ccflags =~ s/-arch\s+\S+//g; # remove any -arch arguments, since the ones we want will already be in $cflags
+
my %config = (
ABSTRACT => 'Perl bindings for Subversion',
DEFINE => $cppflags,
- CCFLAGS => join(' ', $cflags, $Config{ccflags}),
+ CCFLAGS => join(' ', $cflags, $config_ccflags),
INC => join(' ',$apr_cflags, $apu_cflags,
" -I$swig_srcdir/perl/libsvn_swig_perl",
" -I$svnlib_srcdir/include",

0 comments on commit 0248370

Please sign in to comment.