aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2011-12-31 16:42:18 +0800
committerkuriyama <kuriyama@FreeBSD.org>2011-12-31 16:42:18 +0800
commitb76bfebe000e9252c2120f9a14ab372c45299b47 (patch)
treef7afc938595e1a64ee3799354aa660bf5b0e3568
parent320572245a541750f4ff6222cdeae808c587faf9 (diff)
downloadfreebsd-ports-gnome-b76bfebe000e9252c2120f9a14ab372c45299b47.tar.gz
freebsd-ports-gnome-b76bfebe000e9252c2120f9a14ab372c45299b47.tar.zst
freebsd-ports-gnome-b76bfebe000e9252c2120f9a14ab372c45299b47.zip
Perl::Metrics::Simple provides just enough methods to run static
analysis of one or many Perl files and obtain a few metrics: packages, subroutines, lines of code, and an approximation of cyclomatic (mccabe) complexity for the subroutines and the "main" portion of the code. Perl::Metrics::Simple is far simpler than Perl::Metrics. Installs a script called countperl. WWW: http://search.cpan.org/dist/Perl-Metrics-Simple/
-rw-r--r--devel/Makefile1
-rw-r--r--devel/p5-Perl-Metrics-Simple/Makefile33
-rw-r--r--devel/p5-Perl-Metrics-Simple/distinfo2
-rw-r--r--devel/p5-Perl-Metrics-Simple/files/patch-File.pm12
-rw-r--r--devel/p5-Perl-Metrics-Simple/pkg-descr11
-rw-r--r--devel/p5-Perl-Metrics-Simple/pkg-plist12
6 files changed, 71 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 7989622df529..8ba50c85b0dd 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -2223,6 +2223,7 @@
SUBDIR += p5-Penguin
SUBDIR += p5-Penguin-Easy
SUBDIR += p5-Perl-Metrics-Lite
+ SUBDIR += p5-Perl-Metrics-Simple
SUBDIR += p5-Perl-OSType
SUBDIR += p5-Perl-PrereqScanner
SUBDIR += p5-Perl-Unsafe-Signals
diff --git a/devel/p5-Perl-Metrics-Simple/Makefile b/devel/p5-Perl-Metrics-Simple/Makefile
new file mode 100644
index 000000000000..a53586b96118
--- /dev/null
+++ b/devel/p5-Perl-Metrics-Simple/Makefile
@@ -0,0 +1,33 @@
+# New ports collection makefile for: Perl::Metrics::Simple
+# Date created: 31 Dec 2011
+# Whom: Jun Kuriyama <kuriyama@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= Perl-Metrics-Simple
+PORTVERSION= 0.15
+CATEGORIES= devel perl5
+MASTER_SITES= CPAN
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= kuriyama@FreeBSD.org
+COMMENT= Perl extension to count packages, subs, lines, etc. of many files
+
+RUN_DEPENDS= \
+ p5-PPI>=1.113:${PORTSDIR}/textproc/p5-PPI \
+ p5-Readonly>=1.03:${PORTSDIR}/devel/p5-Readonly \
+ p5-Statistics-Basic>0:${PORTSDIR}/math/p5-Statistics-Basic
+BUILD_DEPENDS= ${RUN_DEPENDS}
+
+PERL_CONFIGURE= yes
+
+MAN1= countperl.1
+MAN3= Perl::Metrics::Simple.3 \
+ Perl::Metrics::Simple::Analysis.3 \
+ Perl::Metrics::Simple::Analysis::File.3
+
+post-patch:
+ ${FIND} ${WRKSRC} -name '*.orig' -delete
+
+.include <bsd.port.mk>
diff --git a/devel/p5-Perl-Metrics-Simple/distinfo b/devel/p5-Perl-Metrics-Simple/distinfo
new file mode 100644
index 000000000000..160766ed1c7b
--- /dev/null
+++ b/devel/p5-Perl-Metrics-Simple/distinfo
@@ -0,0 +1,2 @@
+SHA256 (Perl-Metrics-Simple-0.15.tar.gz) = 3d8a56b7f7619358828e1a531e0bb038855b0eb136d05dbaef629450efa11929
+SIZE (Perl-Metrics-Simple-0.15.tar.gz) = 35137
diff --git a/devel/p5-Perl-Metrics-Simple/files/patch-File.pm b/devel/p5-Perl-Metrics-Simple/files/patch-File.pm
new file mode 100644
index 000000000000..7f0d6465dbcf
--- /dev/null
+++ b/devel/p5-Perl-Metrics-Simple/files/patch-File.pm
@@ -0,0 +1,12 @@
+Obtained from http://perl-users.jp/articles/advent-calendar/2011/test/11
+
+--- ./lib/Perl/Metrics/Simple/Analysis/File.pm.orig 2011-12-31 17:19:26.800034766 +0900
++++ ./lib/Perl/Metrics/Simple/Analysis/File.pm 2011-12-31 17:20:16.967169838 +0900
+@@ -327,6 +327,7 @@
+ name => $sub->name,
+ lines => $sub_length,
+ mccabe_complexity => $self->measure_complexity($sub),
++ line_number => $sub->line_number,
+ };
+ }
+ return \@subs;
diff --git a/devel/p5-Perl-Metrics-Simple/pkg-descr b/devel/p5-Perl-Metrics-Simple/pkg-descr
new file mode 100644
index 000000000000..de3a4f1a8b05
--- /dev/null
+++ b/devel/p5-Perl-Metrics-Simple/pkg-descr
@@ -0,0 +1,11 @@
+Perl::Metrics::Simple provides just enough methods to run static
+analysis of one or many Perl files and obtain a few metrics: packages,
+subroutines, lines of code, and an approximation of cyclomatic
+(mccabe) complexity for the subroutines and the "main" portion of the
+code.
+
+Perl::Metrics::Simple is far simpler than Perl::Metrics.
+
+Installs a script called countperl.
+
+WWW: http://search.cpan.org/dist/Perl-Metrics-Simple/
diff --git a/devel/p5-Perl-Metrics-Simple/pkg-plist b/devel/p5-Perl-Metrics-Simple/pkg-plist
new file mode 100644
index 000000000000..08d4c4a19ad9
--- /dev/null
+++ b/devel/p5-Perl-Metrics-Simple/pkg-plist
@@ -0,0 +1,12 @@
+bin/countperl
+%%SITE_PERL%%/%%PERL_ARCH%%/auto/Perl/Metrics/Simple/.packlist
+%%SITE_PERL%%/Perl/Metrics/Simple.pm
+%%SITE_PERL%%/Perl/Metrics/Simple/Analysis.pm
+%%SITE_PERL%%/Perl/Metrics/Simple/Analysis/File.pm
+@dirrm %%SITE_PERL%%/Perl/Metrics/Simple/Analysis
+@dirrm %%SITE_PERL%%/Perl/Metrics/Simple
+@dirrmtry %%SITE_PERL%%/Perl/Metrics
+@dirrmtry %%SITE_PERL%%/Perl
+@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Perl/Metrics/Simple
+@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Perl/Metrics
+@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Perl