Index: Portfile
===================================================================
--- Portfile	(revision 135097)
+++ Portfile	(working copy)
@@ -5,38 +5,45 @@
 PortGroup           perl5 1.0
 
 perl5.branches      5.16 5.18 5.20
-perl5.setup         Devel-NYTProf 5.06
-maintainers         naegler.org:michael
+perl5.setup         Devel-NYTProf 6.01
+maintainers         naegler.org:michael openmaintainer
 
 description         Powerful feature-rich perl source code profiler
 long_description    Devel::NYTProf is a powerful feature-rich perl source code profiler. \
-                    o Performs per-line statement profiling for fine detail \
-                    o Performs per-subroutine statement profiling for overview \
-                    o Performs per-block statement profiling (the first profiler to do so) \
-                    o Accounts correctly for time spent after calls return \
-                    o Performs inclusive and exclusive timing of subroutines \
-                    o Subroutine times are per calling location (a powerful feature) \
-                    o Can profile compile-time activity, just run-time, or just END time \
-                    o Uses novel techniques for efficient profiling \
-                    o Sub-microsecond (100ns) resolution on systems with clock_gettime() \
-                    o Very fast - the fastest statement and subroutine profilers for perl \
-                    o Handles applications that fork, with no performance cost \
-                    o Immune from noise caused by profiling overheads and I/O \
-                    o Program being profiled can stop/start the profiler \
-                    o Generates richly annotated and cross-linked html reports \
-                    o Trivial to use with mod_perl - add one line to httpd.conf \
-                    o Includes an extensive test suite \
-                    o Tested on very large codebases \
-                    \
-                    NYTProf is effectively two profilers in one: a statement profiler, and a subroutine profiler.
+                    \n  o Performs per-line statement profiling for fine detail \
+                    \n  o Performs per-subroutine statement profiling for overview \
+                    \n  o Performs per-block statement profiling (the first profiler to do so) \
+                    \n  o Accounts correctly for time spent after calls return \
+                    \n  o Performs inclusive and exclusive timing of subroutines \
+                    \n  o Subroutine times are per calling location (a powerful feature) \
+                    \n  o Can profile compile-time activity, just run-time, or just END time \
+                    \n  o Uses novel techniques for efficient profiling \
+                    \n  o Sub-microsecond (100ns) resolution on systems with clock_gettime() \
+                    \n  o Very fast - the fastest statement and subroutine profilers for perl \
+                    \n  o Handles applications that fork, with no performance cost \
+                    \n  o Immune from noise caused by profiling overheads and I/O \
+                    \n  o Program being profiled can stop/start the profiler \
+                    \n  o Generates richly annotated and cross-linked html reports \
+                    \n  o Trivial to use with mod_perl - add one line to httpd.conf \
+                    \n  o Includes an extensive test suite \
+                    \n  o Tested on very large codebases \
+                    \n\
+                    \nNYTProf is effectively two profilers in one: a statement profiler, and a subroutine profiler.
 
-checksums           rmd160  4d5891ea8b07952f96c3f9d050a1990dc50edc0c \
-                    sha256  c6733e8676773b1e15e98725e5f817e4354ae2e2c8472fdfc2a7d327380b35e0
+checksums           rmd160  429bf855ecb805482ab6ed4d0fecde99267cc2b5 \
+                    sha256  d7decf4131ab8fe58fcb8ef6c8f8140220bbde091ae16fdc8185324ee66157e9
 
 platforms           darwin
 
 if {${perl5.major} != ""} {
     depends_lib-append \
+                    port:p${perl5.major}-file-which \
                     port:p${perl5.major}-json-any \
                     port:p${perl5.major}-test-differences
+
+    patchfiles      patch-Makefile.PL.diff
+
+    post-patch {
+        reinplace "s|__MP_CPP__|${configure.cpp}|" ${worksrcpath}/Makefile.PL
+    }
 }
Index: files/patch-Makefile.PL.diff
===================================================================
--- files/patch-Makefile.PL.diff	(revision 0)
+++ files/patch-Makefile.PL.diff	(working copy)
@@ -0,0 +1,23 @@
+--- Makefile.PL.orig	2015-04-15 10:08:52.000000000 -0700
++++ Makefile.PL	2015-04-15 10:14:51.000000000 -0700
+@@ -59,11 +59,16 @@
+ 
+ # --- Discover how much of stdio is implemented
+ 
+-my $cpp = $Config{cpp} || do {
+-    warn "Warning: cpp not found in your perl config.  Falling back to 'cat'\n";
+-    'cat';
+-};
++#my $cpp = $Config{cpp} || do {
++#    warn "Warning: cpp not found in your perl config.  Falling back to 'cat'\n";
++#    'cat';
++#};
+ 
++# current MacPorts perls set $Config{cpp} to 'cpp'
++# use ${configure.cpp} instead
++
++my $cpp='__MP_CPP__' ;
++ 
+ print "Looking for header files and functions...\n";
+ my $INCLUDE;
+ 
