Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 272 lines (228 sloc) 9.459 kB
342bd7b @adamv Subversion 1.6.17
adamv authored
1 class Subversion16 < Formula
89d109e @DomT4 subversion16: must unlink openssl
DomT4 authored
2 desc "Version control system designed to be a better CVS"
22abc96 @DomT4 subversion16: modernise
DomT4 authored
3 homepage "https://subversion.apache.org/"
4 url "https://archive.apache.org/dist/subversion/subversion-1.6.23.tar.bz2"
5 sha256 "214abc6b9359ea3a5fda2dee87dad110d1b33dcf888c1f8e361d69fbfa053943"
342bd7b @adamv Subversion 1.6.17
adamv authored
6
2db45c0 @BrewTestBot subversion16: add 1.6.23 bottle.
BrewTestBot authored
7 bottle do
c715123 @BrewTestBot subversion16: update 1.6.23 bottle.
BrewTestBot authored
8 revision 2
9 sha256 "412d63fe92b65f47387d82019d6fc3182f38785726495cae185f6d2deea0cc20" => :yosemite
10 sha256 "b13dd2a4574d01ef4afe26b66bb975b93249376446100f52f6f29a52376914f3" => :mavericks
11 sha256 "c66db0cc2f6ee86adb9cef45ab31fff5dbb5a4416af6b83d7bd76e5ef2cc770c" => :mountain_lion
2db45c0 @BrewTestBot subversion16: add 1.6.23 bottle.
BrewTestBot authored
12 end
13
e853230 @jacknagel subversion16: fix audit warnings
jacknagel authored
14 option :universal
22abc96 @DomT4 subversion16: modernise
DomT4 authored
15 option "with-java", "Build Java bindings"
16 option "with-perl", "Build Perl bindings"
17 option "with-python", "Build Python bindings"
18 option "with-ruby", "Build Ruby bindings"
19 option "with-unicode-path", "Include support for OS X unicode (see caveats)"
20
21 deprecated_option "java" => "with-java"
22 deprecated_option "perl" => "with-perl"
23 deprecated_option "python" => "with-python"
24 deprecated_option "ruby" => "with-ruby"
25 deprecated_option "unicode-path" => "with-unicode-path"
26
27 depends_on "pkg-config" => :build
28
89d109e @DomT4 subversion16: must unlink openssl
DomT4 authored
29 # Requires system OpenSSL headers to build. >El Capitan no longer ship them.
30 depends_on MaximumMacOSRequirement => :yosemite
31
22abc96 @DomT4 subversion16: modernise
DomT4 authored
32 # On Snow Leopard, build a new neon. For Leopard, the deps below include this.
c09ccba @DomT4 subversion16: permit building against system openssl
DomT4 authored
33 # We don't use our OpenSSL because Neon refuses to support it due to wanting SSLv2
34 # and using a more recent Neon via disabling the version check results in segfauls at runtime.
22abc96 @DomT4 subversion16: modernise
DomT4 authored
35 if MacOS.version >= :snow_leopard
36 depends_on :apr => :build
37 depends_on :python => :optional
38 depends_on "scons" => :build
39 depends_on :java => :optional
40 end
41
42 # Homebrew's Swig is too new, Subversion throws a tantrum.
43 resource "swig" do
44 url "https://downloads.sourceforge.net/swig/swig-1.3.36.tar.gz"
45 sha256 "47439796e3332dd6f5f9e2a45a26c5dc2a6bc93461c2e009d7cb493d1816dc1f"
46 end
342bd7b @adamv Subversion 1.6.17
adamv authored
47
ea0568c @jacknagel subversion16: use resources
jacknagel authored
48 # On 10.5 we need newer versions of apr, neon etc.
22abc96 @DomT4 subversion16: modernise
DomT4 authored
49 # From get-deps.sh: "APR=apr-1.4.4"
50 resource "apr" do
51 url "https://archive.apache.org/dist/apr/apr-1.4.4.tar.bz2"
52 sha256 "15372afeb6bba4091c4662600dad8bc51e5e4ff15ce308fac286df8735eb544d"
53 end
54
55 # APR_UTIL=apr-util-1.3.11
56 resource "apr-util" do
57 url "https://archive.apache.org/dist/apr/apr-util-1.3.11.tar.bz2"
58 sha256 "13b8446c5ff96ed32293db77689992db18addb1a76d0f6dae29f132dc96dab59"
59 end
60
61 # SERF=serf-0.7.0
62 resource "serf" do
63 url "http://serf.googlecode.com/svn/trunk/", :tag => "0.7.0"
ea0568c @jacknagel subversion16: use resources
jacknagel authored
64 end
65
22abc96 @DomT4 subversion16: modernise
DomT4 authored
66 # ZLIB=zlib-1.2.8
67 resource "zlib" do
68 url "http://zlib.net/zlib-1.2.8.tar.gz"
69 sha256 "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d"
70 end
ea0568c @jacknagel subversion16: use resources
jacknagel authored
71
22abc96 @DomT4 subversion16: modernise
DomT4 authored
72 resource "sqlite-amalgamation" do
73 url "http://www.sqlite.org/sqlite-amalgamation-3070500.zip"
74 sha256 "ce0f8855c8fb08e1b65fa864b9ac33650b3afd373a72da2a6ff7f813b178240a"
75 end
76
77 resource "neon" do
78 url "http://webdav.org/neon/neon-0.28.3.tar.gz"
79 sha256 "90dee51b4c70bc50ce2fa106ca945349b81cd86c90aa9d4dbff73abb284fcdc2"
80 end
4eec564 @jacknagel Eliminate global methods
jacknagel authored
81
2a81760 @jacknagel Use patch DSL
jacknagel authored
82 # Patch to find Java headers
83 patch :p0 do
3d43aa2 @jacknagel Fix audit warnings
jacknagel authored
84 url "https://trac.macports.org/export/73004/trunk/dports/devel/subversion-javahlbindings/files/patch-configure.diff"
22abc96 @DomT4 subversion16: modernise
DomT4 authored
85 sha256 "2524f14483a2db859c0ae9da1edec49b5450d3ae0393b36f7a329ed66f596493"
342bd7b @adamv Subversion 1.6.17
adamv authored
86 end
87
2a81760 @jacknagel Use patch DSL
jacknagel authored
88 # Patch for subversion handling of OS X Unicode paths (see caveats)
22abc96 @DomT4 subversion16: modernise
DomT4 authored
89 if build.with? "unicode-path"
90 patch do
91 url "https://gist.githubusercontent.com/simonc/434424/raw/0d22bfa9be3e7f924c97de521c24c66b99a8cf0a/subversion-unicode-path.patch"
92 sha256 "944e8202dc50bee4212e96d4c3d42cdfbefdf62765a24563938f48510de065fe"
93 end
94 end
2a81760 @jacknagel Use patch DSL
jacknagel authored
95
342bd7b @adamv Subversion 1.6.17
adamv authored
96 def setup_leopard
97 # Slot dependencies into place
22abc96 @DomT4 subversion16: modernise
DomT4 authored
98 (buildpath).install resource("apr")
99 (buildpath).install resource("apr-util")
100 (buildpath).install resource("serf")
101 (buildpath).install resource("zlib")
102 (buildpath).install resource("sqlite-amalgamation")
103 (buildpath).install resource("neon")
342bd7b @adamv Subversion 1.6.17
adamv authored
104 end
105
b30ee3e @DomT4 subversion16: fix segfault
DomT4 authored
106 def install
107 ENV.universal_binary if build.universal?
108
109 if MacOS.version == :leopard
110 setup_leopard
111 else
112 # Homebrew's Neon is too new and causes segfaults on all OS X versions now.
113 resource("neon").stage do
114 system "./configure", "--prefix=#{libexec}/neon", "--enable-shared",
c09ccba @DomT4 subversion16: permit building against system openssl
DomT4 authored
115 "--disable-static", "--disable-nls", "--with-ssl=openssl",
116 "--with-libs=/usr/lib"
b30ee3e @DomT4 subversion16: fix segfault
DomT4 authored
117 system "make", "install"
342bd7b @adamv Subversion 1.6.17
adamv authored
118 end
b30ee3e @DomT4 subversion16: fix segfault
DomT4 authored
119
120 ENV.prepend_path "PATH", libexec/"neon/bin"
121 ENV.prepend "CFLAGS", "-I#{libexec}/neon/include"
122 ENV.prepend "LDFLAGS", "-L#{libexec}/neon/lib"
123 ENV.prepend_path "PKG_CONFIG_PATH", libexec/"neon/lib/pkgconfig"
342bd7b @adamv Subversion 1.6.17
adamv authored
124 end
125
22abc96 @DomT4 subversion16: modernise
DomT4 authored
126 if build.with?("perl") || build.with?("python") || build.with?("ruby") && MacOS.version >= :snow_leopard
127 resource("swig").stage do
128 system "./configure", "--prefix=#{buildpath}/swig", "--disable-debug", "--disable-dependency-tracking"
129 system "make"
130 system "make", "install"
342bd7b @adamv Subversion 1.6.17
adamv authored
131 end
22abc96 @DomT4 subversion16: modernise
DomT4 authored
132 ENV.prepend_path "PATH", buildpath/"swig/bin"
133 end
342bd7b @adamv Subversion 1.6.17
adamv authored
134
22abc96 @DomT4 subversion16: modernise
DomT4 authored
135 if build.with? "java"
136 unless build.universal?
137 opoo "A non-Universal Java build was requested."
138 puts "To use Java bindings with various Java IDEs, you might need a universal build:"
139 puts "brew install subversion --universal --java"
342bd7b @adamv Subversion 1.6.17
adamv authored
140 end
141 end
142
143 # Use existing system zlib
144 # Use dep-provided other libraries
145 # Don't mess with Apache modules (since we're not sudo)
146 args = ["--disable-debug",
147 "--prefix=#{prefix}",
148 "--with-ssl",
149 "--with-zlib=/usr",
1a010e7 @jacknagel subversion16: find sqlite headers in the SDK if applicable
jacknagel authored
150 "--with-sqlite=#{MacOS.sdk_path}/usr",
342bd7b @adamv Subversion 1.6.17
adamv authored
151 # use our neon, not OS X's
152 "--disable-neon-version-check",
153 "--disable-mod-activation",
154 "--without-apache-libexecdir",
1d203e2 @mistydemeo subversion16: don't try to use httpd
mistydemeo authored
155 # Don't try to use httpd, because the one included
156 # with more recent versions of OS X is incompatible.
157 "--without-apxs",
342bd7b @adamv Subversion 1.6.17
adamv authored
158 "--without-berkeley-db"]
159
22abc96 @DomT4 subversion16: modernise
DomT4 authored
160 if MacOS::CLT.installed?
161 args << "--with-apr=/usr"
162 args << "--with-apr-util=/usr"
163 else
164 args << "--with-apr=#{Formula["apr"].opt_prefix}"
165 args << "--with-apr-util=#{Formula["apr-util"].opt_prefix}"
166 end
167
168 args << "--enable-javahl" << "--without-jikes" if build.with? "java"
169 args << "RUBY=/usr/bin/ruby" << "--with-ruby-sitedir=#{lib}/ruby" if build.with? "ruby"
170 args << "--with-unicode-path" if build.with? "unicode_path"
342bd7b @adamv Subversion 1.6.17
adamv authored
171
172 # Undo a bit of the MacPorts patch
173 inreplace "configure", "@@DESTROOT@@/", ""
174
175 system "./configure", *args
176 system "make"
22abc96 @DomT4 subversion16: modernise
DomT4 authored
177 system "make", "install"
342bd7b @adamv Subversion 1.6.17
adamv authored
178
22abc96 @DomT4 subversion16: modernise
DomT4 authored
179 if build.with? "python"
180 system "make", "swig-py"
181 system "make", "install-swig-py"
342bd7b @adamv Subversion 1.6.17
adamv authored
182 end
183
22abc96 @DomT4 subversion16: modernise
DomT4 authored
184 # Newer OS X Perl's are too incompatible with svn16.
185 # swigutil_pl.c:23:10: fatal error: 'EXTERN.h' file not found
186 if build.with?("perl") && MacOS.version < :lion
187 ENV.deparallelize # This build isn't parallel safe
342bd7b @adamv Subversion 1.6.17
adamv authored
188 # Remove hard-coded ppc target, add appropriate ones
22abc96 @DomT4 subversion16: modernise
DomT4 authored
189 if build.universal?
190 arches = Hardware::CPU.universal_archs.as_arch_flags
cb13264 @jacknagel Clean up MacOS version method usage
jacknagel authored
191 elsif MacOS.version == :leopard
22abc96 @DomT4 subversion16: modernise
DomT4 authored
192 arches = "-arch #{Hardware::CPU.arch_32_bit}"
342bd7b @adamv Subversion 1.6.17
adamv authored
193 else
22abc96 @DomT4 subversion16: modernise
DomT4 authored
194 arches = "-arch #{Hardware::CPU.arch_64_bit}"
342bd7b @adamv Subversion 1.6.17
adamv authored
195 end
196
197 # Use version-appropriate system Perl
1bf9ef0 @jacknagel subversion16: fix indentation
jacknagel authored
198 if MacOS.version == :leopard
342bd7b @adamv Subversion 1.6.17
adamv authored
199 perl_version = "5.8.8"
200 else
201 perl_version = "5.10.0"
202 end
203
204 inreplace "Makefile" do |s|
205 s.change_make_var! "SWIG_PL_INCLUDES",
206 "$(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"
207 end
22abc96 @DomT4 subversion16: modernise
DomT4 authored
208 system "make", "swig-pl"
209 system "make", "install-swig-pl"
342bd7b @adamv Subversion 1.6.17
adamv authored
210 end
211
22abc96 @DomT4 subversion16: modernise
DomT4 authored
212 if build.with? "java"
213 ENV.deparallelize # This build isn't parallel safe
214 system "make", "javahl"
215 system "make", "install-javahl"
342bd7b @adamv Subversion 1.6.17
adamv authored
216 end
217
22abc96 @DomT4 subversion16: modernise
DomT4 authored
218 if build.with? "ruby"
219 ENV.deparallelize # This build isn't parallel safe
220 system "make", "swig-rb"
221 system "make", "install-swig-rb"
342bd7b @adamv Subversion 1.6.17
adamv authored
222 end
223 end
224
225 def caveats
226 s = ""
227
22abc96 @DomT4 subversion16: modernise
DomT4 authored
228 if build.with? "unicode_path"
342bd7b @adamv Subversion 1.6.17
adamv authored
229 s += <<-EOS.undent
230 This unicode-path version implements a hack to deal with composed/decomposed
231 unicode handling on Mac OS X which is different from linux and windows.
232 It is an implementation of solution 1 from
233 http://svn.collab.net/repos/svn/trunk/notes/unicode-composition-for-filenames
234 which _WILL_ break some setups. Please be sure you understand what you
235 are asking for when you install this version.
236
237 EOS
238 end
239
22abc96 @DomT4 subversion16: modernise
DomT4 authored
240 if build.with? "python"
342bd7b @adamv Subversion 1.6.17
adamv authored
241 s += <<-EOS.undent
242 You may need to add the Python bindings to your PYTHONPATH from:
243 #{HOMEBREW_PREFIX}/lib/svn-python
244
245 EOS
246 end
247
22abc96 @DomT4 subversion16: modernise
DomT4 authored
248 if build.with? "ruby"
342bd7b @adamv Subversion 1.6.17
adamv authored
249 s += <<-EOS.undent
250 You may need to add the Ruby bindings to your RUBYLIB from:
251 #{HOMEBREW_PREFIX}/lib/ruby
252
253 EOS
254 end
255
22abc96 @DomT4 subversion16: modernise
DomT4 authored
256 if build.with? "java"
342bd7b @adamv Subversion 1.6.17
adamv authored
257 s += <<-EOS.undent
258 You may need to link the Java bindings into the Java Extensions folder:
259 sudo mkdir -p /Library/Java/Extensions
260 sudo ln -s #{HOMEBREW_PREFIX}/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib
261
262 EOS
263 end
264
b30ee3e @DomT4 subversion16: fix segfault
DomT4 authored
265 s
342bd7b @adamv Subversion 1.6.17
adamv authored
266 end
22abc96 @DomT4 subversion16: modernise
DomT4 authored
267
268 test do
269 system bin/"svn", "--version"
270 end
342bd7b @adamv Subversion 1.6.17
adamv authored
271 end
Something went wrong with that request. Please try again.