Created
May 24, 2011 10:17
-
-
Save eblot/988473 to your computer and use it in GitHub Desktop.
Dirty hack to work around SQLite dynamic linkage issue in Homebrew's subversion formula
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Library/Formula/subversion.rb b/Library/Formula/subversion.rb | |
index 187a026..4decaae 100644 | |
--- a/Library/Formula/subversion.rb | |
+++ b/Library/Formula/subversion.rb | |
@@ -88,6 +88,8 @@ class Subversion < Formula | |
check_neon_arch if build_universal? | |
end | |
+ sqlite = Formula.factory('sqlite') | |
+ | |
# Use existing system zlib | |
# Use dep-provided other libraries | |
# Don't mess with Apache modules (since we're not sudo) | |
@@ -103,11 +105,21 @@ class Subversion < Formula | |
args << "--enable-javahl" << "--without-jikes" if build_java? | |
args << "--with-ruby-sitedir=#{lib}/ruby" if build_ruby? | |
args << "--with-unicode-path" if with_unicode_path? | |
+ if sqlite.installed? | |
+ args << "--with-sqlite=#{Formula.factory('sqlite').prefix}" | |
+ end | |
# Undo a bit of the MacPorts patch | |
inreplace "configure", "@@DESTROOT@@/", "" | |
system "./configure", *args | |
+ if sqlite.installed? | |
+ # dirty hack for https://github.com/mxcl/homebrew/issues/5080 | |
+ # force static linkage with SQLite | |
+ inreplace "Makefile", /SVN_SQLITE_LIBS =.*$/, \ | |
+ "SVN_SQLITE_LIBS = #{Formula.factory('sqlite').prefix}/lib/libsqlite3.a" | |
+ inreplace "Makefile", /\-lsqlite3/, "" | |
+ end | |
system "make" | |
system "make install" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment