Index: files/patch-configure.diff
===================================================================
--- files/patch-configure.diff	(revision 0)
+++ files/patch-configure.diff	(revision 0)
@@ -0,0 +1,50 @@
+--- configure.orig	2008-10-04 10:04:20.000000000 -0600
++++ configure	2008-10-26 01:33:27.000000000 -0600
+@@ -8754,8 +8754,8 @@
+     	output_verbose_link_cmd='echo'
+         archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+         module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+-        archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+-        module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
++        archive_expsym_cmds="sed -e 's,^\([^#]\),_\1,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++        module_expsym_cmds="sed -e 's,^\([^#]\),_\1,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+     else
+       case $cc_basename in
+         xlc*)
+@@ -11827,11 +11827,11 @@
+       output_verbose_link_cmd='echo'
+       archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+       module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+-      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+-      module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
++      archive_expsym_cmds_CXX="sed -e 's,^\([^#]\),_\1,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++      module_expsym_cmds_CXX="sed -e 's,^\([^#]\),_\1,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+       if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+         archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+-        archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
++        archive_expsym_cmds_CXX="sed -e 's,^\([^#]\),_\1,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+       fi
+       else
+       case $cc_basename in
+@@ -15418,8 +15418,8 @@
+     	output_verbose_link_cmd='echo'
+         archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+         module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+-        archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+-        module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
++        archive_expsym_cmds_F77="sed -e 's,^\([^#]\),_\1,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++        module_expsym_cmds_F77="sed -e 's,^\([^#]\),_\1,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+     else
+       case $cc_basename in
+         xlc*)
+@@ -18052,8 +18052,8 @@
+     	output_verbose_link_cmd='echo'
+         archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+         module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+-        archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+-        module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
++        archive_expsym_cmds_GCJ="sed -e 's,^\([^#]\),_\1,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++        module_expsym_cmds_GCJ="sed -e 's,^\([^#]\),_\1,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+     else
+       case $cc_basename in
+         xlc*)
Index: files/patch-Makefile.PL.diff
===================================================================
--- files/patch-Makefile.PL.diff	(revision 0)
+++ files/patch-Makefile.PL.diff	(revision 0)
@@ -0,0 +1,19 @@
+--- bindings/perl-shared/Makefile.PL~	2008-03-15 10:39:48.000000000 +0000
++++ bindings/perl-shared/Makefile.PL	2008-09-10 13:13:07.000000000 +0000
+@@ -23,7 +23,7 @@
+ # library after it is installed. This install_name gets transfered
+ # to the perl shared object.
+ 
+-my $librrd = "-L../../src/.libs/ $R -lrrd";
++my $librrd = "$R -lrrd";
+ 
+ WriteMakefile(
+     'NAME'         => 'RRDs',
+@@ -33,6 +33,7 @@
+     # Perl will figure out which one is valid
+     #'dynamic_lib'  => {'OTHERLDFLAGS' => "$librrd -lm"},
+     'depend'       => {'RRDs.c' => "../../src/librrd.la"},
++    'LDDLFLAGS'    => "-L../../src/.libs/ $Config{lddlflags}",
+     'LDFROM'       => '$(OBJECT) '.$librrd, 
+     'realclean'    => {FILES => 't/demo?.rrd t/demo?.png' }
+ );
Index: files/patch-rrd_open.c.diff
===================================================================
--- files/patch-rrd_open.c.diff	(revision 0)
+++ files/patch-rrd_open.c.diff	(revision 0)
@@ -0,0 +1,15 @@
+--- src/rrd_open.c.orig	2008-10-04 16:04:04.000000000 +0000
++++ src/rrd_open.c	2008-12-07 11:15:41.000000000 +0000
+@@ -139,6 +139,12 @@
+         goto out_free;
+     }
+ 
++#ifdef HAVE_MMAP
++    if (rdwr & RRD_READWRITE) {
++           utime(file_name,NULL);
++    }
++#endif
++
+     /* Better try to avoid seeks as much as possible. stat may be heavy but
+      * many concurrent seeks are even worse.  */
+     if (newfile_size == 0 && ((fstat(rrd_file->fd, &statb)) < 0)) {
Index: Portfile
===================================================================
--- Portfile	(revision 43249)
+++ Portfile	(working copy)
@@ -4,6 +4,7 @@
 
 name			rrdtool
 version			1.3.4
+revision		1
 categories		net
 maintainers		markd
 description		Round Robin Database
@@ -29,6 +30,9 @@
 			port:libpng \
 			port:libxml2
 
+patchfiles		patch-configure.diff patch-Makefile.PL.diff \
+			patch-rrd_open.c.diff
+
 configure.args		--enable-perl-site-install \
 			--with-tcllib=${prefix}/lib \
 			--disable-python \
