Rather than accumulating tons of patches in the RedHat 8.0 packages, I
am posting them here for inclusion in the main tree or finding another
suitable fix.
===================================================================
This patch allows swig to parse svn_opt.h again, which fixes cvs2svn.
===================================================================
--- subversion/include/svn_opt.h
+++ subversion/include/svn_opt.h 2002-10-19 00:27:20.000000000 -0400
@@ -34,7 +34,7 @@
#endif /* __cplusplus */
-?
+
/* All subcommand procedures in Subversion conform to this prototype.
* (### todo: svnlook and svnadmin not yet converted, as of 2002-09-26.)
*
@@ -48,8 +48,7 @@
* unless the instance is explicitly documented to allocate from a
* pool in BATON.
*/
-typedef svn_error_t *(svn_opt_subcommand_t)
- (apr_getopt_t *os, void *baton, apr_pool_t *pool);
+typedef svn_error_t *svn_opt_subcommand_t(apr_getopt_t *os, void
*baton, apr_pool_t *pool);
/* The maximum number of aliases a subcommand can have. */
===================================================================
Hacks to get distutils for swig working
* Removed -noproxy
* Removed references to a missing library, svn_swig_py-1
* Added the file swigutil_py.c to all the libraries
===================================================================
--- subversion/subversion/bindings/swig/python/setup.py
+++ subversion/subversion/bindings/swig/python/setup.py 2002-10-15
16:45:03.000000000 -0400
@@ -76,7 +76,7 @@
def swig_sources(self, sources):
swig = self.find_swig()
- swig_cmd = [swig, "-c", "-python", "-noproxy"]
+ swig_cmd = [swig, "-c", "-python"]
for dir in self.include_dirs:
swig_cmd.append("-I" + dir)
@@ -84,11 +84,14 @@
new_sources = [ ]
for source in sources:
- target = os.path.join(self.build_base,
+ if source.find('.c')>=0:
+ new_sources.append(source)
+ else:
+ target = os.path.join(self.build_base,
os.path.basename(source[:-2]) + ".c")
- self.announce("swigging %s to %s" % (source, target))
- self.spawn(swig_cmd + ["-o", target, source])
- new_sources.append(target)
+ self.announce("swigging %s to %s" % (source, target))
+ self.spawn(swig_cmd + ["-o", target, source])
+ new_sources.append(target)
return new_sources
@@ -106,40 +109,37 @@
ext_package="svn",
ext_modules=[
core.Extension("_client",
- [source_dir + "/svn_client.i"],
- libraries=['svn_client-1', 'svn_swig_py-1',
- 'swigpy'],
+ [source_dir + "/svn_client.i", source_dir + "/swigutil_py.c"],
+ libraries=['svn_client-1', 'swigpy'],
library_dirs=library_dirs
),
core.Extension("_delta",
- [source_dir + "/svn_delta.i"],
- libraries=['svn_delta-1', 'svn_swig_py-1',
- 'swigpy'],
+ [source_dir + "/svn_delta.i", source_dir + "/swigutil_py.c"],
+ libraries=['svn_delta-1', 'swigpy'],
library_dirs=library_dirs,
),
core.Extension("_fs",
- [source_dir + "/svn_fs.i"],
- libraries=['svn_fs-1', 'svn_swig_py-1', 'swigpy'],
+ [source_dir + "/svn_fs.i", source_dir + "/swigutil_py.c"],
+ libraries=['svn_fs-1', 'swigpy'],
library_dirs=library_dirs,
),
core.Extension("_ra",
- [source_dir + "/svn_ra.i"],
+ [source_dir + "/svn_ra.i", source_dir + "/swigutil_py.c"],
libraries=['svn_ra-1', 'swigpy'],
library_dirs=library_dirs,
),
core.Extension("_repos",
- [source_dir + "/svn_repos.i"],
- libraries=['svn_repos-1', 'svn_swig_py-1',
- 'swigpy'],
+ [source_dir + "/svn_repos.i", source_dir + "/swigutil_py.c"],
+ libraries=['svn_repos-1', 'swigpy'],
library_dirs=library_dirs,
),
core.Extension("_wc",
- [source_dir + "/svn_wc.i"],
- libraries=['svn_wc-1', 'svn_swig_py-1', 'swigpy'],
+ [source_dir + "/svn_wc.i", source_dir + "/swigutil_py.c"],
+ libraries=['svn_wc-1', 'swigpy'],
library_dirs=library_dirs,
),
core.Extension("_util",
- [source_dir + "/util.i"],
+ [source_dir + "/util.i", source_dir + "/swigutil_py.c"],
libraries=['svn_subr-1', 'swigpy', 'apr-0'],
library_dirs=library_dirs,
),
===================================================================
I'm not entirely sure why this hack is needed, any ideas?
===================================================================
--- subversion/subversion/bindings/swig/svn_fs.i
+++ subversion/subversion/bindings/swig/svn_fs.i 2002-10-15
16:17:37.000000000 -0400
@@ -112,5 +112,6 @@
#ifdef SWIGPYTHON
#include "swigutil_py.h"
+#define SWIG_POINTER_EXCEPTION 0
#endif
%}
--- subversion/subversion/bindings/swig/svn_wc.i
+++ subversion/subversion/bindings/swig/svn_wc.i 2002-10-15
16:17:37.000000000 -0400
@@ -45,4 +45,5 @@
%include svn_wc.h
%{
#include "svn_wc.h"
+#define SWIG_POINTER_EXCEPTION 0
%}
--- subversion/subversion/bindings/swig/svn_client.i
+++ subversion/subversion/bindings/swig/svn_client.i 2002-10-15
16:17:37.000000000 -0400
@@ -128,6 +128,7 @@
#ifdef SWIGPYTHON
#include "swigutil_py.h"
#endif
+#define SWIG_POINTER_EXCEPTION 0
%}
%include svn_client.h
--- subversion/subversion/bindings/swig/util.i
+++ subversion/subversion/bindings/swig/util.i 2002-10-15
16:17:37.000000000 -0400
@@ -189,4 +189,5 @@
#ifdef SWIGPYTHON
#include "swigutil_py.h"
#endif
+#define SWIG_POINTER_EXCEPTION 0
%}
--- subversion/subversion/bindings/swig/svn_repos.i
+++ subversion/subversion/bindings/swig/svn_repos.i 2002-10-15
16:17:37.000000000 -0400
@@ -62,4 +62,5 @@
#ifdef SWIGPYTHON
#include "swigutil_py.h"
#endif
+#define SWIG_POINTER_EXCEPTION 0
%}
--- subversion/subversion/bindings/swig/svn_delta.i
+++ subversion/subversion/bindings/swig/svn_delta.i 2002-10-15
16:17:37.000000000 -0400
@@ -82,4 +82,5 @@
#ifdef SWIGPYTHON
#include "swigutil_py.h"
#endif
+#define SWIG_POINTER_EXCEPTION 0
%}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 19 06:43:39 2002