ports/71588: [PATCH] devel/subversion: add svn-compatible auto-prop in perl bindings

Rong-En Fan rafan at infor.org
Sat Sep 11 11:00:47 UTC 2004


>Number:         71588
>Category:       ports
>Synopsis:       [PATCH] devel/subversion: add svn-compatible auto-prop in perl bindings
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 11 11:00:46 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Rong-En Fan
>Release:        FreeBSD 4.10-RELEASE-p2 i386
>Organization:
NTU CSIE
>Environment:
System: FreeBSD muse.csie.ntu.edu.tw 4.10-RELEASE-p2 FreeBSD 4.10-RELEASE-p2 #1: Mon Jul 12 20:06:43 CST 2004 root at muse.csie.ntu.edu.tw:/home/admin/usr/obj/home/admin/usr/src/sys/MUSE i386


	
>Description:
	Add svn-compatible autoprop support, this patch is from
	svn trunk, generated by the author of SVK. This will be
	useful for SVK users.
	
>How-To-Repeat:
	
>Fix:

diff -ruN /usr/ports/devel/subversion/Makefile subversion/Makefile
--- /usr/ports/devel/subversion/Makefile	Sun Aug 22 02:33:26 2004
+++ subversion/Makefile	Sat Sep 11 18:53:27 2004
@@ -6,7 +6,7 @@
 
 PORTNAME=	subversion
 PORTVERSION=	1.0.6
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	devel
 MASTER_SITES=	http://subversion.tigris.org/tarballs/
 
diff -ruN /usr/ports/devel/subversion/files/patch-svnperl-autoprop subversion/files/patch-svnperl-autoprop
--- /usr/ports/devel/subversion/files/patch-svnperl-autoprop	Thu Jan  1 08:00:00 1970
+++ subversion/files/patch-svnperl-autoprop	Sat Sep 11 18:57:14 2004
@@ -0,0 +1,73 @@
+--- subversion/bindings/swig/core.i  (revision 10291)
++++ subversion/bindings/swig/core.i  (revision 10292)
+@@ -292,6 +292,11 @@ apr_pool_t *current_pool;
+     ST(argvi++) = svn_swig_pl_convert_hash(*$1, SWIGTYPE_p_svn_config_t);
+ }
+ 
++%typemap(perl5, in) (svn_config_enumerator_t callback, void *baton) {
++    $1 = svn_swig_pl_thunk_config_enumerator,
++    $2 = (void *)$input;
++};
++
+ %typemap(python,in,numinputs=0) apr_hash_t **cfg_hash = apr_hash_t **OUTPUT;
+ %typemap(python,argout,fragment="t_output_helper") apr_hash_t **cfg_hash {
+     $result = t_output_helper(
+--- subversion/bindings/swig/swigutil_pl.c  (revision 10291)
++++ subversion/bindings/swig/swigutil_pl.c  (revision 10292)
+@@ -1209,6 +1209,20 @@ svn_error_t *svn_swig_pl_blame_func (voi
+     return ret_val;
+ }
+ 
++/* Thunked config enumerator */
++svn_boolean_t svn_swig_pl_thunk_config_enumerator (const char *name, const char *value, void *baton)
++{
++    SV *result;
++    if (!SvOK((SV *)baton))
++	return 0;
++
++    svn_swig_pl_callback_thunk (CALL_SV, baton, &result,
++			        "ss", name, value);
++
++    return SvOK(result);
++}
++
++
+ /* default pool support */
+ apr_pool_t *current_pool;
+ 
+--- subversion/bindings/swig/swigutil_pl.h  (revision 10291)
++++ subversion/bindings/swig/swigutil_pl.h  (revision 10292)
+@@ -217,6 +217,8 @@ svn_error_t *svn_swig_pl_blame_func (voi
+                                      const char *line,
+                                      apr_pool_t *pool);
+ 
++/* Thunked config enumerator */
++svn_boolean_t svn_swig_pl_thunk_config_enumerator (const char *name, const char *value, void *baton);
+ 
+ /* helper for making the editor */
+ void svn_delta_make_editor(svn_delta_editor_t **editor,
+--- subversion/bindings/swig/perl/Ra.pm  (revision 10291)
++++ subversion/bindings/swig/perl/Ra.pm  (revision 10292)
+@@ -1,5 +1,6 @@
+ package SVN::Ra;
+ use SVN::Base qw(Ra svn_ra_);
++use File::Temp;
+ 
+ =head1 NAME
+ 
+@@ -176,9 +177,13 @@ sub new {
+ }
+ 
+ sub open_tmp_file {
++    local $^W; # silence the warning for unopened temp file
+     my $self = shift;
+-    my ($fd, $name) = SVN::Core::io_open_unique_file
+-	('/tmp/foobar', 'tmp', 1, $self->{pool});
++    my ($fd, $name) = SVN::Core::io_open_unique_file(
++        ( File::Temp::tempfile(
++            'XXXXXXXX', OPEN => 0, DIR => File::Spec->tmpdir
++        ))[1], 'tmp', 1, $self->{pool}
++    );
+     return $fd;
+ }
+ 
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list