Index: trunk/dports/devel/subversion-javahlbindings/Portfile
===================================================================
--- trunk/dports/devel/subversion-javahlbindings/Portfile	(revision 28346)
+++ trunk/dports/devel/subversion-javahlbindings/Portfile	(revision 28347)
@@ -3,5 +3,5 @@
 PortSystem 1.0
 name			subversion-javahlbindings
-version			1.4.4
+version			1.4.5
 categories		devel java
 platforms		darwin
@@ -15,7 +15,7 @@
 
 homepage		http://subversion.tigris.org/
-master_sites		http://subversion.tigris.org/tarballs/
+master_sites		${homepage}/downloads/
 use_bzip2		yes
-checksums 		md5 d4aa5aeb09acb3307841022d279ab895
+checksums 		md5 4c333a5fe827568c67d195cda7a5e154
 distname		subversion-${version}
 dist_subdir		subversion
@@ -30,6 +30,6 @@
 
 configure.args		--with-berkeley-db=${prefix}/include/db44:${prefix}/lib/db44 \
-			--with-neon=${prefix} --with-apr=${prefix} \
-			--with-apr-util=${prefix} --without-apxs \
+			--with-neon=${prefix} --with-apr=${prefix}/bin/apr-1-config \
+			--with-apr-util=${prefix}/bin/apu-1-config --without-apxs \
 			--mandir=\\\${prefix}/share/man \
 			--disable-neon-version-check \
@@ -42,4 +42,6 @@
 test.run		yes
 test.target		check-javahl
+
+destroot.violate_mtree	yes
 
 patchfiles		patch-configure
@@ -76,70 +78,4 @@
 		file mkdir ${destroot}${prefix}/share/java
 		system "ln -sf ${prefix}/lib/svn-javahl/svn-javahl.jar ${destroot}/${prefix}/share/java/svn-javahl.jar"
-
-		file delete "${destroot}/${prefix}/lib/libsvn_client-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_base-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_svn-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_client-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_svn-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_client-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_repos-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_client-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_repos-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_client-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_repos-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_repos-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_repos-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_diff-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_diff-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_dav-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_diff-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_dav-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_wc-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_diff-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_dav-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_wc-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_diff-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_dav-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_wc-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_dav-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_wc-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_local-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_wc-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_local-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_local-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_local-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_base-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_local-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_base-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_svn-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_base-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_svn-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_base-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_svn-1.a"
 		}
 
Index: trunk/dports/devel/subversion-perlbindings/Portfile
===================================================================
--- trunk/dports/devel/subversion-perlbindings/Portfile	(revision 28346)
+++ trunk/dports/devel/subversion-perlbindings/Portfile	(revision 28347)
@@ -3,6 +3,7 @@
 PortSystem 1.0
 name			subversion-perlbindings
-version			1.4.4
+version			1.4.5
 categories		devel perl
+platforms		darwin
 maintainers		dluke@geeklair.net
 description		Perl bindings for the subversion version control system.
@@ -14,7 +15,7 @@
 
 homepage		http://subversion.tigris.org/
-master_sites		http://subversion.tigris.org/downloads/
+master_sites		${homepage}/downloads/
 use_bzip2		yes
-checksums 		md5 d4aa5aeb09acb3307841022d279ab895
+checksums 		md5 4c333a5fe827568c67d195cda7a5e154
 distname		subversion-${version}
 dist_subdir		subversion
@@ -30,6 +31,6 @@
 
 configure.args		--with-berkeley-db=${prefix}/include/db44:${prefix}/lib/db44 \
-			--with-neon=${prefix} --with-apr=${prefix} \
-			--with-apr-util=${prefix} --without-apxs \
+			--with-neon=${prefix} --with-apr=${prefix}/bin/apr-1-config \
+			--with-apr-util=${prefix}/bin/apu-1-config --without-apxs \
 			--mandir=\\\${prefix}/share/man \
 			--disable-neon-version-check \
@@ -62,19 +63,4 @@
 
 post-destroot {
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.la"
                 foreach packlist [exec find ${destroot} -name .packlist] {
                         ui_info "Fixing packlist ${packlist}"
Index: trunk/dports/devel/subversion-python25bindings/Portfile
===================================================================
--- trunk/dports/devel/subversion-python25bindings/Portfile	(revision 28346)
+++ trunk/dports/devel/subversion-python25bindings/Portfile	(revision 28347)
@@ -3,6 +3,7 @@
 PortSystem 1.0
 name			subversion-python25bindings
-version			1.4.4
+version			1.4.5
 categories		devel python
+platforms		darwin
 maintainers		dluke@geeklair.net
 description		Python bindings for the subversion version control system.
@@ -14,7 +15,7 @@
 
 homepage		http://subversion.tigris.org/
-master_sites		http://subversion.tigris.org/tarballs/
+master_sites		${homepage}/downloads
 use_bzip2		yes
-checksums 		md5 d4aa5aeb09acb3307841022d279ab895
+checksums 		md5 4c333a5fe827568c67d195cda7a5e154
 distname		subversion-${version}
 dist_subdir		subversion
@@ -44,7 +45,17 @@
 destroot.target		install-swig-py DESTDIR=${destroot} 
 
-test.env                DYLD_LIBRARY_PATH=${worksrcpath}/subversion/bindings/swig/python/.libs:${worksrcpath}/subversion/bindings/swig/python/libsvn_swig_py25/.libs:${worksrcpath}/subversion/libsvn_client/.libs:${worksrcpath}/subversion/libsvn_delta/.libs:${worksrcpath}/subversion/libsvn_diff/.libs:${worksrcpath}/subversion/libsvn_fs/.libs:${worksrcpath}/subversion/libsvn_fs_base/.libs:${worksrcpath}/subversion/libsvn_fs_base/bdb/.libs:${worksrcpath}/subversion/libsvn_fs_base/util/.libs:${worksrcpath}/subversion/libsvn_fs_fs/.libs:${worksrcpath}/subversion/libsvn_ra/.libs:${worksrcpath}/subversion/libsvn_ra_dav/.libs:${worksrcpath}/subversion/libsvn_ra_local/.libs:${worksrcpath}/subversion/libsvn_ra_svn/.libs:${worksrcpath}/subversion/libsvn_repos/.libs:${worksrcpath}/subversion/libsvn_subr/.libs:${worksrcpath}/subversion/libsvn_wc/.libs
 test.run		yes
 test.target		check-swig-py
+
+pre-test {
+			set x {}
+			fs-traverse dir ${worksrcpath}/subversion {
+				if {[file tail ${dir}] == ".libs" && [file isdirectory ${dir}]} {
+				lappend x ${dir}
+				continue
+				}
+			}
+			test.env-append DYLD_LIBRARY_PATH=[join ${x} ":"]
+			}
 
 pre-configure {		reinplace "s|hardcode_direct=yes|hardcode_direct=no|g" \
@@ -77,70 +88,4 @@
 		file rename "${destroot}/${prefix}/lib/svn-python" \
 			"${destroot}/${prefix}/lib/svn-python2.5"
-
-		file delete "${destroot}/${prefix}/lib/libsvn_client-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_dav-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_repos-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_client-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_dav-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_client-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_base-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_dav-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_client-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_base-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_dav-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_client-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_base-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_local-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_base-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_local-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_base-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_local-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_local-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_local-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_svn-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_diff-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_svn-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_diff-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_svn-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_wc-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_diff-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_svn-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_wc-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_diff-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_svn-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_wc-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_diff-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_repos-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_wc-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_repos-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_wc-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_repos-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_ra_dav-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_repos-1.dylib"
 		}
 
Index: trunk/dports/devel/subversion-rubybindings/Portfile
===================================================================
--- trunk/dports/devel/subversion-rubybindings/Portfile	(revision 28346)
+++ trunk/dports/devel/subversion-rubybindings/Portfile	(revision 28347)
@@ -3,6 +3,7 @@
 PortSystem 1.0
 name			subversion-rubybindings
-version			1.4.4
+version			1.4.5
 categories		devel ruby
+platforms		darwin
 maintainers		dluke@geeklair.net
 description		Ruby bindings for the subversion version control system.
@@ -14,11 +15,10 @@
 
 homepage		http://subversion.tigris.org/
-master_sites		http://subversion.tigris.org/downloads/
+master_sites		${homepage}/downloads/
 use_bzip2		yes
-checksums 		md5 d4aa5aeb09acb3307841022d279ab895
+checksums 		md5 4c333a5fe827568c67d195cda7a5e154
 distname		subversion-${version}
 dist_subdir		subversion
 
-test.env                DYLD_LIBRARY_PATH=${worksrcpath}/subversion/bindings/swig/ruby/.libs:${worksrcpath}/subversion/bindings/swig/ruby/libsvn_swig_ruby/.libs:${worksrcpath}/subversion/libsvn_client/.libs:${worksrcpath}/subversion/libsvn_delta/.libs:${worksrcpath}/subversion/libsvn_diff/.libs:${worksrcpath}/subversion/libsvn_fs/.libs:${worksrcpath}/subversion/libsvn_fs_base/.libs:${worksrcpath}/subversion/libsvn_fs_base/bdb/.libs:${worksrcpath}/subversion/libsvn_fs_base/util/.libs:${worksrcpath}/subversion/libsvn_fs_fs/.libs:${worksrcpath}/subversion/libsvn_ra/.libs:${worksrcpath}/subversion/libsvn_ra_dav/.libs:${worksrcpath}/subversion/libsvn_ra_local/.libs:${worksrcpath}/subversion/libsvn_ra_svn/.libs:${worksrcpath}/subversion/libsvn_repos/.libs:${worksrcpath}/subversion/libsvn_subr/.libs:${worksrcpath}/subversion/libsvn_wc/.libs
 test.run		yes
 test.target		check-swig-rb
@@ -32,6 +32,6 @@
 configure.env		RUBY=${prefix}/bin/ruby
 configure.args		--with-berkeley-db=${prefix}/include/db44:${prefix}/lib/db44 \
-			--with-neon=${prefix} --with-apr=${prefix} \
-			--with-apr-util=${prefix} --without-apxs \
+			--with-neon=${prefix} --with-apr=${prefix}/bin/apr-1-config \
+			--with-apr-util=${prefix}/bin/apu-1-config --without-apxs \
 			--mandir=\\\${prefix}/share/man \
 			--disable-neon-version-check
@@ -39,4 +39,16 @@
 build.target		swig-rb
 destroot.target		install-swig-rb
+
+pre-test {
+			set x {}
+			fs-traverse dir ${worksrcpath}/subversion {
+				if {[file tail ${dir}] == ".libs" && [file isdirectory ${dir}]} {
+				lappend x ${dir}
+				continue
+				}
+			}
+
+			test.env-append DYLD_LIBRARY_PATH=[join ${x} ":"]
+			}
 
 pre-configure {		reinplace "s|hardcode_direct=yes|hardcode_direct=no|g" \
@@ -58,22 +70,4 @@
                         }
 
-post-destroot {
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_delta-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_fs_fs-1.la"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.0.0.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.0.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.a"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.dylib"
-		file delete "${destroot}/${prefix}/lib/libsvn_subr-1.la"
-        }
-
 # 10.3 says -> CarbonCore/MacTypes.h: No such file or directory
 platform darwin 7 {		configure.args-append \
Index: trunk/dports/devel/subversion/Portfile
===================================================================
--- trunk/dports/devel/subversion/Portfile	(revision 28346)
+++ trunk/dports/devel/subversion/Portfile	(revision 28347)
@@ -3,6 +3,7 @@
 PortSystem 1.0
 name			subversion
-version			1.4.4
+version			1.4.5
 categories		devel
+platforms		darwin
 maintainers		dluke@geeklair.net
 description		A cvs like version control system, but without the suck
@@ -13,7 +14,7 @@
 
 homepage		http://subversion.tigris.org/
-master_sites		http://subversion.tigris.org/downloads/
+master_sites		${homepage}/downloads/
 use_bzip2		yes
-checksums		md5 d4aa5aeb09acb3307841022d279ab895
+checksums		md5 4c333a5fe827568c67d195cda7a5e154
 
 depends_lib		port:expat port:neon \
@@ -24,16 +25,27 @@
 test.run		yes
 test.target		check
-test.env		DYLD_LIBRARY_PATH=${worksrcpath}/subversion/libsvn_client/.libs:${worksrcpath}/subversion/libsvn_delta/.libs:${worksrcpath}/subversion/libsvn_diff/.libs:${worksrcpath}/subversion/libsvn_fs/.libs:${worksrcpath}/subversion/libsvn_fs_base/.libs:${worksrcpath}/subversion/libsvn_fs_base/bdb/.libs:${worksrcpath}/subversion/libsvn_fs_base/util/.libs:${worksrcpath}/subversion/libsvn_fs_fs/.libs:${worksrcpath}/subversion/libsvn_ra/.libs:${worksrcpath}/subversion/libsvn_ra_dav/.libs:${worksrcpath}/subversion/libsvn_ra_local/.libs:${worksrcpath}/subversion/libsvn_ra_svn/.libs:${worksrcpath}/subversion/libsvn_repos/.libs:${worksrcpath}/subversion/libsvn_subr/.libs:${worksrcpath}/subversion/libsvn_wc/.libs:${worksrcpath}/subversion/svn/.libs:${worksrcpath}/subversion/svnadmin/.libs:${worksrcpath}/subversion/svndumpfilter/.libs:${worksrcpath}/subversion/svnlook/.libs:${worksrcpath}/subversion/svnserve/.libs:${worksrcpath}/subversion/svnsync/.libs:${worksrcpath}/subversion/svnversion/.libs:${worksrcpath}/subversion/tests/.libs:${worksrcpath}/subversion/tests/libsvn_delta/.libs:${worksrcpath}/subversion/tests/libsvn_diff/.libs:${worksrcpath}/subversion/tests/libsvn_fs/.libs:${worksrcpath}/subversion/tests/libsvn_fs_base/.libs:${worksrcpath}/subversion/tests/libsvn_ra_local/.libs:${worksrcpath}/subversion/tests/libsvn_repos/.libs:${worksrcpath}/subversion/tests/libsvn_subr/.libs:${worksrcpath}/subversion/tests/libsvn_wc/.libs \
-				CLEANUP=true
+test.env		CLEANUP=true
 
 patchfiles		patch-Makefile.in
 
 configure.args		--with-berkeley-db=${prefix}/include/db44:${prefix}/lib/db44 \
-			--with-neon=${prefix} --with-apr=${prefix} \
-			--with-apr-util=${prefix} --without-apxs \
+			--with-neon=${prefix} --with-apr=${prefix}/bin/apr-1-config \
+			--with-apr-util=${prefix}/bin/apu-1-config --without-apxs \
 			--mandir=\\\${prefix}/share/man \
 			--disable-neon-version-check
 
 build.target		all mucc
+
+pre-test {
+			set x {}
+			fs-traverse dir ${worksrcpath}/subversion {
+				if {[file tail ${dir}] == ".libs" && [file isdirectory ${dir}]} {
+					lappend x ${dir}
+					continue
+				}
+			}
+
+			test.env-append DYLD_LIBRARY_PATH=[join ${x} ":"]
+			}
 
 pre-configure {		reinplace "s|hardcode_direct=yes|hardcode_direct=no|g" \
@@ -80,10 +92,10 @@
 variant tools { 	post-destroot {
 				xinstall -d -m 755 ${destroot}${prefix}/share/${name}
-				file copy ${worksrcpath}/tools ${destroot}${prefix}/share/${name}/tools
-				file copy ${worksrcpath}/contrib/client-side/mucc ${destroot}${prefix}/bin/
+				copy ${worksrcpath}/tools ${destroot}${prefix}/share/${name}/tools
+				copy ${worksrcpath}/contrib/client-side/mucc ${destroot}${prefix}/bin/
 				foreach f {mucc mucc.o mucc.lo .libs} {
-					file delete ${worksrcpath}/contrib/client-side/${f}
+					 delete ${worksrcpath}/contrib/client-side/${f}
 					}
-				file copy ${worksrcpath}/contrib ${destroot}${prefix}/share/${name}/contrib
+				copy ${worksrcpath}/contrib ${destroot}${prefix}/share/${name}/contrib
 				}
 			}
@@ -93,5 +105,5 @@
 				post-destroot {
 					xinstall -d ${destroot}${prefix}/etc/bash_completion.d
-					file copy ${worksrcpath}/tools/client-side/bash_completion ${destroot}${prefix}/etc/bash_completion.d/subversion
+					copy ${worksrcpath}/tools/client-side/bash_completion ${destroot}${prefix}/etc/bash_completion.d/subversion
 					}
 				}
