aboutsummaryrefslogtreecommitdiff
path: root/devel/subversion16
diff options
context:
space:
mode:
authorLev A. Serebryakov <lev@FreeBSD.org>2004-08-19 20:40:29 +0000
committerLev A. Serebryakov <lev@FreeBSD.org>2004-08-19 20:40:29 +0000
commit2fc1597f2b3e4cf7096b8afa53c6cb5b5597f187 (patch)
tree76875dac54b65f080ffa645ac64e1c6f3b72b27e /devel/subversion16
parent404de5fcd5d34a38f967c388152824fa837dbb68 (diff)
downloadports-2fc1597f2b3e4cf7096b8afa53c6cb5b5597f187.tar.gz
ports-2fc1597f2b3e4cf7096b8afa53c6cb5b5597f187.zip
Notes
Diffstat (limited to 'devel/subversion16')
-rw-r--r--devel/subversion16/Makefile54
-rw-r--r--devel/subversion16/files/patch-book-Makefile17
-rw-r--r--devel/subversion16/files/patch-svnperl-memoryleak195
-rw-r--r--devel/subversion16/files/patch-svnperl-noruntime82
-rw-r--r--devel/subversion16/pkg-plist16
5 files changed, 341 insertions, 23 deletions
diff --git a/devel/subversion16/Makefile b/devel/subversion16/Makefile
index 708f820f3b28..a96fe4f14629 100644
--- a/devel/subversion16/Makefile
+++ b/devel/subversion16/Makefile
@@ -6,14 +6,14 @@
PORTNAME= subversion
PORTVERSION= 1.0.6
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://subversion.tigris.org/tarballs/
MAINTAINER= lev@freebsd.org
COMMENT= Version control system
-LIB_DEPENDS= neon.24:${PORTSDIR}/www/neon \
- expat.5:${PORTSDIR}/textproc/expat2
+LIB_DEPENDS= expat.5:${PORTSDIR}/textproc/expat2
INSTALLS_SHLIB= yes
@@ -29,6 +29,11 @@ MAN5= svnserve.conf.5
MAN8= svnserve.8
MANCOMPRESSED= no
+TXT_DOCS= BUGS CHANGES COMMITTERS COPYING HACKING INSTALL README
+.if !defined(NOPORTDOCS)
+PORTDOCS= ${TXT_DOCS}
+.endif
+
.include <bsd.port.pre.mk>
SVNREPOS?= /home/svn/repos
@@ -39,6 +44,15 @@ CONFIGURE_ARGS+=--enable-maintainer-mode \
CFLAGS+= -g
.endif
+.if !defined(WITHOUT_NEON)
+LIB_DEPENDS+= neon.24:${PORTSDIR}/www/neon \
+CONFIGURE_ARGS+= --with-neon=${LOCALBASE}
+PLIST_SUB+= WITHOUT_NEON=""
+.else
+CONFIGURE_ARGS+= --without-neon
+PLIST_SUB+= WITHOUT_NEON="@comment "
+.endif
+
.if defined(WITH_PERL)
.if ${PERL_LEVEL} < 500800
IGNORE= "Subversion\'s Perl bindings need perl 5.8.0 or greater. Upgrade your perl and try again"
@@ -97,8 +111,6 @@ CONFIGURE_ARGS+=--with-apr=${LOCALBASE}/lib/apache2/apr-config \
APR_APU_DIR= ${LOCALBASE}/lib/apache2
APR_PORT= www/apache2
OPT_NAME= WITH_BERKELEYDB=(db4|db41|db42)
-#LDFLAGS+= -rpath ${LOCALBASE}/lib/apache2 -rpath ${LOCALBASE}/libexec/apache2
-#CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
.else
LIB_DEPENDS+= apr-0.9:${PORTSDIR}/devel/apr-svn
CONFIGURE_ARGS+=--with-apr=${LOCALBASE} \
@@ -115,8 +127,21 @@ EXTRA_PATCHES= ${PATCHDIR}/build-outputs.mk.patch
PLIST_SUB+= SVNSERVE_WRAPPER="@comment "
.endif
+.if defined(WITH_BOOK_HTML)
+PORTDOCS+= book
+BUILD_DEPENDS+= ${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl \
+ ${LOCALBASE}/bin/xsltproc:${PORTSDIR}/textproc/libxslt
+.endif
+
pre-extract:
@${ECHO_MSG} ""
+.if defined(WITHOUT_NEON)
+ @${ECHO_MSG} "WebDAV/Delta-V repository access module disabled."
+.else
+ @${ECHO_MSG} "WebDAV/Delta-V repository access module enabled."
+ @${ECHO_MSG} "To disable it define WITHOUT_NEON"
+.endif
+ @${ECHO_MSG} ""
.if defined(WITH_MAINTAINER_DEBUG)
@${ECHO_MSG} "Build debug version."
.else
@@ -178,6 +203,13 @@ pre-extract:
@${ECHO_MSG} ""
.endif
@${ECHO_MSG} ""
+.if defined(WITH_BOOK_HTML)
+ @${ECHO_MSG} "Subversion Book (HTML) enabled."
+.else
+ @${ECHO_MSG} "You can install the Subversion Book (HTML) by defining"
+ @${ECHO_MSG} "WITH_BOOK_HTML."
+.endif
+ @${ECHO_MSG} ""
post-extract:
@${RM} -r ${WRKSRC}/neon
@@ -223,6 +255,12 @@ post-build:
cd ${WRKSRC} ; \
${MAKE} swig-py
.endif
+.if defined(WITH_BOOK_HTML)
+ cd ${WRKSRC}/doc/book/tools/ ; \
+ ${LN} -s ${PREFIX}/share/xsl/docbook xsl
+ cd ${WRKSRC}/doc/book ; \
+ ${MAKE} all-html
+.endif
.if defined(WITH_MOD_DAV_SVN)
pre-install:
@@ -232,9 +270,13 @@ pre-install:
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
- for f in BUGS CHANGES COMMITTERS COPYING HACKING INSTALL README; do \
- ${INSTALL_DATA} ${WRKSRC}/$$f ${DOCSDIR}; \
+ for f in ${TXT_DOCS}; do \
+ ${INSTALL_DATA} ${WRKSRC}/$$f ${DOCSDIR}; \
done
+.if defined(WITH_BOOK_HTML)
+ cd ${WRKSRC}/doc/book ; \
+ ${MAKE} install-book-html install-book-html-chunk INSTALL_DIR=${DOCSDIR}
+.endif
.endif
.if defined(WITH_PERL)
cd ${WRKSRC} ; \
diff --git a/devel/subversion16/files/patch-book-Makefile b/devel/subversion16/files/patch-book-Makefile
index 589fb2c2ecc9..662b08245c1b 100644
--- a/devel/subversion16/files/patch-book-Makefile
+++ b/devel/subversion16/files/patch-book-Makefile
@@ -1,6 +1,13 @@
---- doc/book/Makefile.orig Mon May 19 17:06:16 2003
-+++ doc/book/Makefile Mon May 19 17:22:14 2003
-@@ -98,7 +98,7 @@
+--- doc/book/Makefile.orig Fri Feb 20 01:57:40 2004
++++ doc/book/Makefile Wed Jul 7 19:58:29 2004
+@@ -1,5 +1,5 @@
+ XSLTPROC = xsltproc
+-INSTALL_DIR = $(DESTDIR)/usr/share/doc/subversion
++#INSTALL_DIR = $(DESTDIR)/usr/share/doc/subversion
+ INSTALL = install
+
+ ## You shouldn't normally need to edit anything below here.
+@@ -114,7 +114,7 @@
$(BOOK_INSTALL_DIR):
$(INSTALL) -d $(BOOK_INSTALL_DIR)
@@ -9,9 +16,9 @@
$(INSTALL) -d $(BOOK_INSTALL_DIR)/images
$(INSTALL) $(BOOK_HTML_TARGET) $(BOOK_INSTALL_DIR)
$(INSTALL) $(BOOK_DIR)/styles.css $(BOOK_INSTALL_DIR)
-@@ -111,10 +111,10 @@
+@@ -126,10 +126,10 @@
$(INSTALL) $(BOOK_DIR)/styles.css $(BOOK_INSTALL_DIR)
- $(INSTALL) $(BOOK_DIR)/images/*.png $(BOOK_INSTALL_DIR)/images
+ $(INSTALL) $(BOOK_IMAGES) $(BOOK_INSTALL_DIR)/images
-install-book-pdf: $(BOOK_PDF_TARGET) $(BOOK_INSTALL_DIR)
+install-book-pdf:
diff --git a/devel/subversion16/files/patch-svnperl-memoryleak b/devel/subversion16/files/patch-svnperl-memoryleak
new file mode 100644
index 000000000000..46a202ca6ec9
--- /dev/null
+++ b/devel/subversion16/files/patch-svnperl-memoryleak
@@ -0,0 +1,195 @@
+--- subversion/bindings/swig/svn_types.i (revision 10171)
++++ subversion/bindings/swig/svn_types.i (revision 10172)
+@@ -316,7 +316,7 @@
+ %typemap(perl5, in) (svn_commit_callback_t callback, void *callback_baton) {
+ $1 = svn_swig_pl_thunk_commit_callback;
+ $2 = (void *)$input;
+- SvREFCNT_inc($input);
++ svn_swig_pl_hold_ref_in_pool (_global_pool, $input);
+ };
+
+ /* -----------------------------------------------------------------------
+--- subversion/bindings/swig/swigutil_pl.c (revision 10171)
++++ subversion/bindings/swig/swigutil_pl.c (revision 10172)
+@@ -1385,3 +1385,16 @@ apr_file_t *svn_swig_pl_make_file (SV *f
+ }
+ return apr_file;
+ }
++
++static apr_status_t cleanup_refcnt (void *data)
++{
++ SV *sv = data;
++ SvREFCNT_dec (sv);
++ return APR_SUCCESS;
++}
++
++void svn_swig_pl_hold_ref_in_pool (apr_pool_t *pool, SV *sv)
++{
++ SvREFCNT_inc(sv);
++ apr_pool_cleanup_register (pool, sv, cleanup_refcnt, apr_pool_cleanup_null);
++}
+--- subversion/bindings/swig/swigutil_pl.h (revision 10171)
++++ subversion/bindings/swig/swigutil_pl.h (revision 10172)
+@@ -231,6 +231,7 @@ SV *svn_swig_pl_from_stream (svn_stream_
+ /* apr_file_t * */
+ apr_file_t *svn_swig_pl_make_file (SV *file, apr_pool_t *pool);
+
++void svn_swig_pl_hold_ref_in_pool (apr_pool_t *pool, SV *sv);
+
+ #ifdef __cplusplus
+ }
+--- subversion/bindings/swig/perl/t/5delta.t (revision 10171)
++++ subversion/bindings/swig/perl/t/5delta.t (revision 10172)
+@@ -4,27 +4,19 @@ use Test::More tests => 2;
+ require SVN::Core;
+ require SVN::Delta;
+
+-SKIP: {
+- eval { require IO::String };
++my ($srctext, $tgttext, $result) = ('abcd===eflfjgjkx', 'abcd=--ef==lfjffgjx', '');
+
+- skip "IO::String not installed", 2 if $@;
+- my $srctext = 'abcd===eflfjgjkx';
+- my $tgttext = 'abcd=--ef==lfjffgjx';
++open my $source, '<', \$srctext;
++open my $target, '<', \$tgttext;
++open my $aresult, '>', \$result;
+
+- my $source = IO::String->new ($srctext);
+- my $target = IO::String->new ($tgttext);
++my $txstream = SVN::TxDelta::new ($source, $target);
+
+- my $result = '';
+- my $aresult = IO::String->new (\$result);
++isa_ok ($txstream, '_p_svn_txdelta_stream_t');
++open my $asource, '<', \$srctext;
++my $handle = [SVN::TxDelta::apply ($asource, $aresult, undef, undef)];
+
+- my $txstream = SVN::TxDelta::new ($source, $target);
++SVN::TxDelta::send_txstream ($txstream, @$handle);
+
+- isa_ok ($txstream, '_p_svn_txdelta_stream_t');
+- my $handle = [SVN::TxDelta::apply (IO::String->new ($srctext),
+- $aresult, undef, undef)];
++is ($result, $tgttext, 'delta self test');
+
+- SVN::TxDelta::send_txstream ($txstream, @$handle);
+-
+- is ($result, $tgttext, 'delta self test');
+-
+-}
+--- subversion/bindings/swig/perl/t/1repos.t (revision 10171)
++++ subversion/bindings/swig/perl/t/1repos.t (revision 10172)
+@@ -1,6 +1,6 @@
+ #!/usr/bin/perl -w
+
+-use Test::More tests => 5;
++use Test::More tests => 6;
+ use File::Temp qw(tempdir);
+ use File::Path qw(rmtree);
+ use strict;
+@@ -64,15 +64,20 @@ is_deeply (\@history, [['/tags/foo/filea
+ 'repos_history');
+
+ {
++my $pool = SVN::Pool->new_default;
++my $something = bless {}, 'something';
+ $editor = SVN::Delta::Editor->
+ new (SVN::Repos::get_commit_editor($repos, "file://$repospath",
+- '/', 'root', 'FOO', \&committed));
++ '/', 'root', 'FOO', sub {committed(@_);
++ $something;
++ }));
+
+ my $rootbaton = $editor->open_root(2);
+ $editor->delete_entry('tags', 2, $rootbaton);
+
+ $editor->close_edit();
+ }
++ok ($main::something_destroyed, 'callback properly destroyed');
+
+ cmp_ok($fs->youngest_rev, '==', 3);
+
+@@ -80,3 +85,11 @@ END {
+ diag "cleanup";
+ rmtree($repospath);
+ }
++
++package something;
++
++sub DESTROY {
++ $main::something_destroyed++;
++}
++
++1;
+--- subversion/bindings/swig/perl/Delta.pm (revision 10171)
++++ subversion/bindings/swig/perl/Delta.pm (revision 10172)
+@@ -143,8 +143,8 @@ sub AUTOLOAD {
+ return unless $_[0]->{_editor};
+ my $class = ref($_[0]);
+ my $func = $AUTOLOAD;
+- $func =~ s/^${class}::(SUPER::)?//;
+- return if $func =~ m/^[A-Z]/;
++ $func =~ s/.*:://;
++ return unless $func =~ m/[^A-Z]/;
+
+ my %ebaton = ( set_target_revision => 1,
+ open_root => 1,
+--- subversion/bindings/swig/perl/Base.pm (revision 10171)
++++ subversion/bindings/swig/perl/Base.pm (revision 10172)
+@@ -7,7 +7,7 @@ SVN::Base - Base class for importing sym
+ =head1 SYNOPSIS
+
+ # Load the svn_ra_* functions into the SVN::Ra namespace.
+- pacakge SVN::Ra;
++ package SVN::Ra;
+ use SVN::Base qw(Ra svn_ra_);
+
+ # Load svn_config_t structure accessors in the magic namcespace
+--- subversion/bindings/swig/perl/Ra.pm (revision 10171)
++++ subversion/bindings/swig/perl/Ra.pm (revision 10172)
+@@ -63,26 +63,25 @@ require SVN::Client;
+
+ my $ralib = init_ra_libs;
+
++# Ra methods that returns reporter
++my %reporter = map { $_ => 1 } qw(do_diff do_switch do_status do_update);
+ our $AUTOLOAD;
+
+ sub AUTOLOAD {
+ my $class = ref($_[0]);
+- $AUTOLOAD =~ s/^${class}::(SUPER::)?//;
+- return if $AUTOLOAD =~ m/^[A-Z]/;
++ my $method = $AUTOLOAD;
++ $method =~ s/.*:://;
++ return unless $method =~ m/[^A-Z]/;
+
+ my $self = shift;
+ no strict 'refs';
+
+ die "no such method $AUTOLOAD"
+- unless $self->can("plugin_invoke_$AUTOLOAD");
++ unless $self->can("plugin_invoke_$method");
+
+- my @ret = &{"plugin_invoke_$AUTOLOAD"}(@{$self}{qw/ra session/}, @_,
+- $self->{pool});
+-
+- return $ret[0] unless $#ret;
+-
+- return ($AUTOLOAD eq 'get_commit_editor') ? @ret :
+- bless [@ret], 'SVN::Ra::Reporter';
++ my @ret = &{"plugin_invoke_$method"}(@{$self}{qw/ra session/}, @_);
++ return bless [@ret], 'SVN::Ra::Reporter' if $reporter{$method};
++ return $#ret == 0 ? $ret[0] : @ret;
+ }
+
+ sub new {
+@@ -106,7 +105,7 @@ sub new {
+ [SVN::Client::get_username_provider()]);
+ }
+
+- my $pool = $self->{pool} ||= SVN::Core::pool_create(undef);
++ my $pool = $self->{pool} ||= SVN::Pool->new;
+
+ $self->{ra} = get_ra_library ($ralib, $self->{url});
+ my $callback = 'SVN::Ra::Callbacks';
diff --git a/devel/subversion16/files/patch-svnperl-noruntime b/devel/subversion16/files/patch-svnperl-noruntime
new file mode 100644
index 000000000000..26ada812435b
--- /dev/null
+++ b/devel/subversion16/files/patch-svnperl-noruntime
@@ -0,0 +1,82 @@
+--- subversion/bindings/swig/perl/Base.pm (revision 10173)
++++ subversion/bindings/swig/perl/Base.pm (revision 10174)
+@@ -60,6 +60,7 @@ sub import {
+ package SVN::_$pkg;
+ require DynaLoader;
+ bootstrap SVN::_$pkg;
++sub dl_load_flags { 0x01 }
+ 1;
+ ' or die $@;
+ };
+--- subversion/bindings/swig/perl/Makefile.PL (revision 10173)
++++ subversion/bindings/swig/perl/Makefile.PL (revision 10174)
+@@ -1,4 +1,5 @@
+-#!/usr/bin/perl
++#!/usr/bin/perl -w
++use strict;
+ use ExtUtils::MakeMaker;
+ use Cwd 'abs_path';
+ use Config;
+@@ -8,6 +9,12 @@ if ($^O ne 'VMS') {
+ $perl_path .= $Config{_exe} unless $perl_path =~ m/$Config{_exe}$/i;
+ }
+
++my $top_builddir = '../../../..';
++my $top_srcdir = '@top_srcdir@';
++my $svnlib_srcdir = "${top_srcdir}/subversion";
++my $swig_srcdir = "${svnlib_srcdir}/bindings/swig";
++
++
+ my $swig_version;
+ open TOPMAKE, "<../../../../Makefile";
+ while (<TOPMAKE>) {
+@@ -50,8 +57,7 @@ my %config = (
+ OBJECT => q/$(O_FILES)/,
+ LIBS => [join(' ', $apr_ldflags,
+ (map {$_ = abs_path($_); "-L$_"} @ldpaths),
+- @ldmodules, '-lsvn_swig_perl-1',
+- `swig -perl -ldflags`)],
++ @ldmodules)],
+ );
+
+ sub perlish {
+@@ -64,6 +70,7 @@ WriteMakefile(%config, NAME => 'SVN::_Co
+ PM => {map { ("$_.pm" => "\$(INST_LIBDIR)/$_.pm") }
+ map { perlish $_ }
+ ('base', 'core', @modules)},
++ LDFROM => '$(O_FILES) '."../.libs/libsvn_swig_perl-1.a",
+ clean => { FILES => "*.hi *.c *.bs".
+ join(' Makefile.','',@modules) }
+ );
+@@ -84,15 +91,19 @@ sub MY::postamble {
+ my $module_c_files = join (' ',map { "svn_$_.c"} @modules);
+ my $module_make_commands = join ('',map {"\tmake -f Makefile.$_\n"} @modules);
+
+- my $flags;
++ my ($flags, $flags_runtime);
+ if ($swig_version >= 103020) {
+ $flags = '-noruntime -noproxy';
++ $flags_runtime = '-runtime -noproxy';
+ } else {
++ # XXX: prehaps deprecated
+ $flags = '-c';
+ }
+
+- my $swig_command = "swig $flags -nopm -perl " .
+- "-I.. -I../../../include $apr_cflags";
++ my ($swig_command, $swig_command_runtime) =
++ map {"swig $_ -nopm -perl " .
++ "-I.. -I../../../include $apr_cflags" }
++ ($flags, $flags_runtime);
+
+ my $swig_modules_command = join ('',
+ map {"\nsvn_$_.c : ../svn_$_.i ".
+@@ -127,7 +138,7 @@ modules :: $module_c_files
+ $module_make_commands\t\$(NOECHO) \$(TOUCH) \$\@
+
+ core.c :: ../core.i
+-\t$swig_command -module SVN::_Core -o core.c ../core.i
++\t$swig_command_runtime -module SVN::_Core -o core.c ../core.i
+
+ $swig_modules_command
+
diff --git a/devel/subversion16/pkg-plist b/devel/subversion16/pkg-plist
index d018c3be8bab..555c29542511 100644
--- a/devel/subversion16/pkg-plist
+++ b/devel/subversion16/pkg-plist
@@ -60,10 +60,10 @@ lib/libsvn_ra-1.a
lib/libsvn_ra-1.la
lib/libsvn_ra-1.so
lib/libsvn_ra-1.so.0
-lib/libsvn_ra_dav-1.a
-lib/libsvn_ra_dav-1.la
-lib/libsvn_ra_dav-1.so
-lib/libsvn_ra_dav-1.so.0
+%%WITHOUT_NEON%%lib/libsvn_ra_dav-1.a
+%%WITHOUT_NEON%%lib/libsvn_ra_dav-1.la
+%%WITHOUT_NEON%%lib/libsvn_ra_dav-1.so
+%%WITHOUT_NEON%%lib/libsvn_ra_dav-1.so.0
lib/libsvn_ra_local-1.a
lib/libsvn_ra_local-1.la
lib/libsvn_ra_local-1.so
@@ -185,11 +185,3 @@ lib/libsvn_wc-1.so.0
%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/svn/wc.pyc
%%WITH_PYTHON%%@dirrm %%PYTHON_SITELIBDIR%%/libsvn
%%WITH_PYTHON%%@dirrm %%PYTHON_SITELIBDIR%%/svn
-%%PORTDOCS%%share/doc/subversion/BUGS
-%%PORTDOCS%%share/doc/subversion/CHANGES
-%%PORTDOCS%%share/doc/subversion/COMMITTERS
-%%PORTDOCS%%share/doc/subversion/COPYING
-%%PORTDOCS%%share/doc/subversion/HACKING
-%%PORTDOCS%%share/doc/subversion/INSTALL
-%%PORTDOCS%%share/doc/subversion/README
-%%PORTDOCS%%@dirrm share/doc/subversion