Index: Makefile.in
--- Makefile.in.orig	2005-05-09 07:56:09 +0200
+++ Makefile.in	2005-05-26 21:18:45 +0200
@@ -575,7 +575,7 @@
 install-swig-rb: install-swig-rb-lib
 
 $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
-	cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL
+	cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL INSTALLDIRS=vendor
 
 swig-pl_DEPS = libsvn_client libsvn_delta libsvn_diff libsvn_fs libsvn_ra libsvn_repos libsvn_subr libsvn_wc libsvn_swig_perl $(SWIG_PL_DIR)/native/Makefile
 swig-pl: $(swig-pl_DEPS)
Index: apr-util/crypto/getuuid.c
--- apr-util/crypto/getuuid.c.orig	2006-03-25 03:00:17 +0100
+++ apr-util/crypto/getuuid.c	2006-04-04 19:13:08 +0200
@@ -102,7 +102,7 @@
 static void get_pseudo_node_identifier(unsigned char *node)
 {
     get_random_info(node);
-    node[0] |= 0x80;                    /* this designates a random node ID */
+    node[0] |= 0x01;                    /* this designates a random node ID */
 }
 
 static void get_system_time(apr_uint64_t *uuid_time)
@@ -131,7 +131,7 @@
 
     /* crap. this isn't crypto quality, but it will be Good Enough */
 
-    get_system_time(&time_now);
+    time_now = apr_time_now();
     srand((unsigned int)(((time_now >> 32) ^ time_now) & 0xffffffff));
 
     return rand() & 0x0FFFF;
@@ -151,7 +151,7 @@
     static apr_interval_time_t time_last = 0;
     static apr_interval_time_t fudge = 0;
 
-    time_now = apr_time_now();
+    get_system_time(&time_now);
         
     /* if clock reading changed since last UUID generated... */
     if (time_last != time_now) {
@@ -188,17 +188,26 @@
 
     get_current_time(&timestamp);
 
-    d[0] = (unsigned char)timestamp;
-    d[1] = (unsigned char)(timestamp >> 8);
-    d[2] = (unsigned char)(timestamp >> 16);
-    d[3] = (unsigned char)(timestamp >> 24);
-    d[4] = (unsigned char)(timestamp >> 32);
-    d[5] = (unsigned char)(timestamp >> 40);
-    d[6] = (unsigned char)(timestamp >> 48);
-    d[7] = (unsigned char)(((timestamp >> 56) & 0x0F) | 0x10);
+    /* UUID field: time_low */
+    d[0] = (unsigned char)(timestamp >> (8*3));
+    d[1] = (unsigned char)(timestamp >> (8*2));
+    d[2] = (unsigned char)(timestamp >> (8*1));
+    d[3] = (unsigned char)(timestamp);
+
+    /* UUID field: time_mid */
+    d[4] = (unsigned char)(timestamp >> (8*5));
+    d[5] = (unsigned char)(timestamp >> (8*4));
+
+    /* UUID field: time_hi_and_version */
+    d[6] = (unsigned char)(((timestamp >> (8*7)) & 0x0F) | 0x10);
+    d[7] = (unsigned char)(timestamp >> (8*6));
 
+    /* UUID field: clk_seq_hi_res */
     d[8] = (unsigned char)(((uuid_state_seqnum >> 8) & 0x3F) | 0x80);
+
+    /* UUID field: clk_seq_low */
     d[9] = (unsigned char)uuid_state_seqnum;
 
+    /* UUID field: node */
     memcpy(&d[10], uuid_state_node, NODE_LENGTH);
 }
--- configure.orig      Fri Jul  1 22:18:48 2005
+++ configure   Fri Aug  5 17:18:33 2005
@@ -19775,6 +19775,11 @@
       ac_sub_cache_file="$ac_dots$cache_file" ;;
     esac
 
+    args="$args --prefix=$prefix/libexec/subversion/neon"
+    if [ ".$with_ssl" = .yes ]; then
+        args="$args --with-ssl"
+    fi
+
     # The eval makes quoting arguments work.
     if eval $SHELL $ac_abs_srcdir/configure $ac_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir $args
     then :
Index: subversion/bindings/swig/perl/native/Makefile.PL.in
--- subversion/bindings/swig/perl/native/Makefile.PL.in.orig	2005-03-22 10:31:58 +0100
+++ subversion/bindings/swig/perl/native/Makefile.PL.in	2005-05-26 21:18:45 +0200
@@ -26,16 +26,12 @@
                                                                       ra_dav
                                                                       fs_base
                                                                       fs_fs/));
-my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw/diff subr/);
+my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw/diff subr delta ra_dav subr ra_local ra_svn fs_base fs_fs/);
 
 my $apr_shlib_path_var = '@SVN_APR_SHLIB_PATH_VAR@';
 my $apr_cflags = '@SVN_APR_INCLUDES@';
 my $apu_cflags = '@SVN_APRUTIL_INCLUDES@';
-
-# According to the log of r7937, the flags guarded by the conditional break
-# the build on FreeBSD if not conditionalized.
-my $apr_ldflags = '@SVN_APR_EXPORT_LIBS@' 
-   if $^O eq 'darwin' or $^O eq 'cygwin';
+my $apr_ldflags = '@SVN_APRUTIL_EXPORT_LIBS@ @SVN_APR_EXPORT_LIBS@ -liconv -lz '.`neon-config --libs`.' -lssl -lcrypto -lxml2';
 
 chomp $apr_shlib_path_var;
 
@@ -46,9 +42,9 @@
                  " -I$svnlib_srcdir/include",
                  " -I$swig_srcdir -g"),
     OBJECT => q/$(O_FILES)/,
-    LIBS => [join(' ', $apr_ldflags,
+    LIBS => [join(' ', "-L@l_prefix@/lib",
                   (map {$_ = abs_path($_); "-L$_"} @ldpaths),
-                  @ldmodules, '-lsvn_swig_perl-1',
+                  '-lsvn_swig_perl-1', @ldmodules, @ldmodules, @ldmodules, @ldmodules, $apr_ldflags,
                   `$swig -perl -ldflags`)],
     test => { TESTS => "$swig_srcdir/perl/native/t/*.t" }
 );
