Index: Portfile
===================================================================
--- Portfile	(révision 27596)
+++ Portfile	(copie de travail)
@@ -3,6 +3,7 @@
 PortSystem 1.0
 name			subversion
 version			1.4.4
+revision		1
 categories		devel
 maintainers		dluke@geeklair.net
 description		A cvs like version control system, but without the suck
@@ -12,29 +13,45 @@
 			outstanding problems with cvs(1).
 
 homepage		http://subversion.tigris.org/
-master_sites		http://subversion.tigris.org/downloads/
+master_sites	${homepage}downloads/
 use_bzip2		yes
-checksums		md5 d4aa5aeb09acb3307841022d279ab895
+checksums		md5 d4aa5aeb09acb3307841022d279ab895 \
+				sha1 1ba850187b3cedb3265850acf32341b7dbe4f945 \
+				rmd160 24ec3733d337206a3106be434c4505f5cc2e20ec
 
 depends_lib		port:expat port:neon \
 			port:apr port:apr-util \
-			port:db44 \
-			port:gettext port:libiconv
+			port:db44
 
 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
+
+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} ":"]
+}
 
 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 \
-			--mandir=\\\${prefix}/share/man \
-			--disable-neon-version-check
+					--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 \
+            		--disable-nls
+
+build.target		all
 
-build.target		all mucc
+set docdir			${prefix}/share/doc/${name}-${version}
 
 pre-configure {		reinplace "s|hardcode_direct=yes|hardcode_direct=no|g" \
 				${worksrcpath}/configure
@@ -46,6 +63,11 @@
 				${worksrcpath}/libtool
 			}
 
+post-destroot {
+	xinstall -m 0755 -d ${destroot}${docdir}
+	xinstall -m 0644 -W ${worksrcpath} BUGS CHANGES COPYING ${destroot}${docdir}
+}
+
 variant mod_dav_svn {	depends_build path:${prefix}/apache2/bin/apxs:apache2
 			configure.args-append \
 				--with-apxs=${prefix}/apache2/bin/apxs \
@@ -69,29 +91,34 @@
 					configure.args-delete --without-apxs
 
 					post-install {
-							ui_warn "This variant (+mac_os_x_server_mod_dav_svn builds against the Apple-supplied apache2 in /opt/apache2 and thus may have problems that the normal variant (+mod_dav_svn) which builds against the macports supplied apache2 will not have."
+							ui_warn "This variant (+mac-os-x-server-mod_dav_svn) builds against the Apple-supplied apache2 in /opt/apache2 and thus may have problems that the normal variant (+mod_dav_svn) which builds against the macports supplied apache2 will not have."
 					    		 }      
                        	 		}
 
 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/
-				foreach f {mucc mucc.o mucc.lo .libs} {
-					file delete ${worksrcpath}/contrib/client-side/${f}
-					}
-				file copy ${worksrcpath}/contrib ${destroot}${prefix}/share/${name}/contrib
+				copy ${worksrcpath}/tools ${destroot}${prefix}/share/${name}/tools
+				copy ${worksrcpath}/contrib/client-side/mucc ${destroot}${prefix}/bin/
+				eval delete [glob ${worksrcpath}/contrib/client-side/{mucc{,.{l,}o},.libs}]
+				copy ${worksrcpath}/contrib ${destroot}${prefix}/share/${name}/contrib
 				}
+
+            build.target-append mucc
 			}
 
 variant bash_completion {
 				depends_run-append port:bash-completion
 				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
 					}
 				}
 
+variant nls {
+    depends_lib-append      port:gettext
+    configure.args-delete   --disable-nls
+}
+
 # 10.3 says -> CarbonCore/MacTypes.h: No such file or directory
 platform darwin 7 {		configure.args-append \
 					--disable-keychain
