Re: [Patch] Compiling Ruby bindings on Windows
From: Kouhei Sutou <kou_at_cozmixng.org>
Date: 2006-12-29 04:53:42 CET
Hi,
# I'm sorry for my late response.
In <ae6cb1100612262346n14db4400nac60a414f51f8914@mail.gmail.com>
> Okay, here is a cut a patch that will let the Ruby bindings compile using VC6
Great! I merged some your changes into the repository. (Yes,
> Most failures occur at svn/util.rb:68 where a Proc for a forwarding function is
Ah, OK. I'll think about another more debug friendly
> The test code modifications create a dependency on win32-service which is part
I agree with the idea but I think Win32 service setup should
---
Index: subversion/bindings/swig/ruby/test/run-test.rb
===================================================================
--- subversion/bindings/swig/ruby/test/run-test.rb (revision 22823)
+++ subversion/bindings/swig/ruby/test/run-test.rb (working copy)
@@ -3,15 +3,27 @@
require "test/unit"
require "fileutils"
-ENV["PATH"] = File.join(Dir.pwd, "..", "..", "..", "svnserve") + ":" + ENV["PATH"]
-ext_dir = File.join(Dir.pwd, ".ext")
+test_dir = File.expand_path(File.join(File.dirname(__FILE__)))
+base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
+top_dir = File.expand_path(File.join(base_dir, "..", "..", ".."))
+
+ext_dir = File.join(base_dir, ".ext")
ext_svn_dir = File.join(ext_dir, "svn")
FileUtils.mkdir_p(ext_svn_dir)
-FileUtils.ln_sf(File.join(Dir.pwd, ".libs"), File.join(ext_svn_dir, "ext"))
at_exit {FileUtils.rm_rf(ext_dir)}
+if /cygwin|mingw|mswin32|bccwin32/.match(RUBY_PLATFORM)
+ ext_svn_ext_dir = File.join(ext_svn_dir, "ext")
+ FileUtils.mkdir_p(ext_svn_ext_dir)
+ FileUtils.cp(Dir.glob(File.join(base_dir, "*.dll"), ext_svn_ext_dir))
+else
+ ENV["PATH"] = "#{File.join(top_dir, 'subversion', 'svnserve')}:#{ENV['PATH']}"
+ FileUtils.ln_sf(File.join(base_dir, ".libs"), File.join(ext_svn_dir, "ext"))
+end
+
$LOAD_PATH.unshift(ext_dir)
-$LOAD_PATH.unshift(Dir.pwd)
+$LOAD_PATH.unshift(base_dir)
+$LOAD_PATH.unshift(test_dir)
require 'svn/core'
Svn::Locale.set
---
> * subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
> define a EMPTY_WORKAROUND_FOR_VC6_PREPROCESSOR macro and replace the empty
> space in the argument of every "function-like" macro. Don't define the
> MESSAGES constant when _WIN32 is defined. Use SIZEOF_LONG_LONG instead of
> sizeof(long long).
I've merged.
> * subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
> When building with VC compiler use the #pragma comment directive to link with
> the ruby library.
I'll talk about this in the next mail.
> * subversion/bindings/swig/ruby/test/run-test.rb
> Copy files around to create the directory structure for testing, not using
> links. Create a Service entry for svnserve.
>
> * subversion/bindings/swig/ruby/test/util.rb
> Start and stop the Service, without using fork. Fix typo in URI?
We need to talk about them.
'file' schema URI isn't a typo.
Joe, thanks for your work!
Regards,
--
kou
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 29 04:53:55 2006
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.