update p5-Devel-NYTProf to 6.01

This commit is contained in:
bluhm 2015-06-22 14:45:52 +00:00
parent 0714574e24
commit 1c24c8942e
3 changed files with 4 additions and 47 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.26 2015/03/28 18:16:12 bluhm Exp $
# $OpenBSD: Makefile,v 1.27 2015/06/22 14:45:52 bluhm Exp $
SHARED_ONLY = Yes
COMMENT = powerful feature-rich perl source code profiler
DISTNAME = Devel-NYTProf-5.07
DISTNAME = Devel-NYTProf-6.01
CATEGORIES = devel

View File

@ -1,2 +1,2 @@
SHA256 (Devel-NYTProf-5.07.tar.gz) = rkiULWfbN2TcuZRm0j55YRChBRG7nk993Rij7Ifh1VE=
SIZE (Devel-NYTProf-5.07.tar.gz) = 429983
SHA256 (Devel-NYTProf-6.01.tar.gz) = 197PQTGrj+WPy472yPgUAiC73gka4W/cgYUyTuZhV+k=
SIZE (Devel-NYTProf-6.01.tar.gz) = 432670

View File

@ -1,43 +0,0 @@
$OpenBSD: patch-bin_nytprofhtml,v 1.1 2015/03/28 18:16:12 bluhm Exp $
commit 6ceb06c1fea2882f6454250603b23b709e753db4
Author: Dylan Cali <calid1984@gmail.com>
Date: Sun Mar 1 07:24:47 2015 -0600
fallback to checking PATH for nytprof scripts
nytprof scripts may not be installed to the main Perl installation bin
(e.g. when using perlbrew locallibs). If the scripts don't exist in
$Config{bin} check the PATH, and if they still can't be found die.
diff --git a/bin/nytprofhtml b/bin/nytprofhtml
index b32fd37..5e56142 100755
--- bin/nytprofhtml
+++ bin/nytprofhtml
@@ -36,6 +36,7 @@ use Getopt::Long;
use List::Util qw(sum max);
use File::Copy;
use File::Spec;
+use File::Which qw(which);
use File::Path qw(rmtree);
# Handle --profself before loading Devel::NYTProf::Core
@@ -70,8 +71,18 @@ my $json_any = eval { require JSON::Any; JSON::Any->import; JSON::Any->new }
or warn "Can't load JSON::Any module - HTML visualizations skipped.\n";
my $script_ext = ($^O eq "MSWin32") ? "" : ".pl";
+
my $nytprofcalls = File::Spec->catfile($Config{'bin'}, 'nytprofcalls');
+$nytprofcalls = which 'nytprofcalls' if not -e $nytprofcalls;
+
+die "Unable to find nytprofcalls in $Config{bin} or on the PATH"
+ unless $nytprofcalls;
+
my $flamegraph = File::Spec->catfile($Config{'bin'}, 'flamegraph') . $script_ext;
+$flamegraph = which "flamegraph$script_ext" if not -e $flamegraph;
+
+die "Unable to find flamegraph$script_ext in $Config{bin} or on the PATH"
+ unless $flamegraph;
my @treemap_colors = (0,2,4,6,8,10,1,3,5,7,9);