summaryrefslogtreecommitdiff
path: root/devel/pmccabe
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2005-02-24 11:19:00 +0000
committeragc <agc@pkgsrc.org>2005-02-24 11:19:00 +0000
commitc0cb2b065679447c89a8a57d899027cb85f622d7 (patch)
treed6993b9e32806e927ffd53087cb61a5a1bc04fb8 /devel/pmccabe
parentf007c3ab9bb6ef7d78e704530eaf69d0a0659a65 (diff)
downloadpkgsrc-c0cb2b065679447c89a8a57d899027cb85f622d7.tar.gz
Initial import of pmccabe-2.2-3 into the Packages Collection, suggested
by Mike Cheponis. pmccabe processes the named files, or standard input if none are named, calculating statistics including McCabe cyclomatic complexity for each function found. The files are expected to be either C (ANSI or K&R) or C++. pmccabe ignores all cpp preprocessor directives - calculating the complexity of the appearance of the code rather than the complexity after the preprocessor mangles the code. This is especially important since simple things like getchar(3) expand into macros which increase complexity.
Diffstat (limited to 'devel/pmccabe')
-rw-r--r--devel/pmccabe/DESCR10
-rw-r--r--devel/pmccabe/Makefile16
-rw-r--r--devel/pmccabe/PLIST9
-rw-r--r--devel/pmccabe/distinfo6
-rw-r--r--devel/pmccabe/patches/patch-aa39
5 files changed, 80 insertions, 0 deletions
diff --git a/devel/pmccabe/DESCR b/devel/pmccabe/DESCR
new file mode 100644
index 00000000000..00187e3a8aa
--- /dev/null
+++ b/devel/pmccabe/DESCR
@@ -0,0 +1,10 @@
+pmccabe processes the named files, or standard input if none are
+named, calculating statistics including McCabe cyclomatic complexity
+for each function found. The files are expected to be either C (ANSI
+or K&R) or C++.
+
+pmccabe ignores all cpp preprocessor directives - calculating the
+complexity of the appearance of the code rather than the complexity
+after the preprocessor mangles the code. This is especially important
+since simple things like getchar(3) expand into macros which increase
+complexity.
diff --git a/devel/pmccabe/Makefile b/devel/pmccabe/Makefile
new file mode 100644
index 00000000000..2e262c1c7ef
--- /dev/null
+++ b/devel/pmccabe/Makefile
@@ -0,0 +1,16 @@
+# $NetBSD: Makefile,v 1.1.1.1 2005/02/24 11:19:00 agc Exp $
+
+DISTNAME= pmccabe_2.2-3
+PKGNAME= pmccabe-2.2.3
+CATEGORIES= devel
+MASTER_SITES= http://ftp.debian.org/debian/pool/main/p/pmccabe/
+
+MAINTAINER= tech-pkg@NetBSD.org
+HOMEPAGE=
+COMMENT= Measures the McCabe cyclomatic complexity of C and C++
+
+WRKSRC= ${WRKDIR}/pmccabe
+
+CFLAGS+= -D__unix=1
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/pmccabe/PLIST b/devel/pmccabe/PLIST
new file mode 100644
index 00000000000..cfdb629bf8f
--- /dev/null
+++ b/devel/pmccabe/PLIST
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2005/02/24 11:19:00 agc Exp $
+bin/codechanges
+bin/decomment
+bin/pmccabe
+bin/vifn
+man/man1/codechanges.1
+man/man1/decomment.1
+man/man1/pmccabe.1
+man/man1/vifn.1
diff --git a/devel/pmccabe/distinfo b/devel/pmccabe/distinfo
new file mode 100644
index 00000000000..859860bd9e2
--- /dev/null
+++ b/devel/pmccabe/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2005/02/24 11:19:00 agc Exp $
+
+SHA1 (pmccabe_2.2-3.tar.gz) = 5a05a04e50820cfab714017e0cd28c24a601f955
+RMD160 (pmccabe_2.2-3.tar.gz) = 5c89fd12720159b9133ee6923ab6a91879b0ba13
+Size (pmccabe_2.2-3.tar.gz) = 54990 bytes
+SHA1 (patch-aa) = ff36602cd37662180ab05283082c92ecd5e48ef3
diff --git a/devel/pmccabe/patches/patch-aa b/devel/pmccabe/patches/patch-aa
new file mode 100644
index 00000000000..5b8a4f73f1c
--- /dev/null
+++ b/devel/pmccabe/patches/patch-aa
@@ -0,0 +1,39 @@
+$NetBSD: patch-aa,v 1.1.1.1 2005/02/24 11:19:00 agc Exp $
+
+--- Makefile 2005/02/24 10:53:19 1.1
++++ Makefile 2005/02/24 10:55:17
+@@ -10,7 +10,7 @@
+ ###############{
+
+ # On HP-UX you will have to change this
+-INSTALL = install -o root -g root
++#INSTALL = install -o root -g root
+
+ DESTDIR =
+
+@@ -30,7 +30,7 @@
+ all: $(PROGS) test
+
+ test: $(PROGS)
+- ./testsuite
++ ksh ./testsuite
+
+ pmccabe: $(PMOBJS)
+ $(CC) $(CFLAGS) -o pmccabe $(PMOBJS)
+@@ -39,12 +39,10 @@
+ rm -f *.[oa] pmccabe decomment *.out */*.out
+
+ install: $(PROGS) $(MANPGS) $(DOCS)
+- $(INSTALL) -d $(DESTDIR)/usr/share/doc/pmccabe \
+- $(DESTDIR)/usr/share/man/man1 \
+- $(DESTDIR)/usr/bin
+- $(INSTALL) -m 644 $(MANPGS) $(DESTDIR)/usr/share/man/man1
+- #$(INSTALL) -m 644 $(DOCS) $(DESTDIR)/usr/share/doc/pmccabe
+- $(INSTALL) -m 755 $(PROGS) $(DESTDIR)/usr/bin
++ $(INSTALL) -d $(DESTDIR)/${PREFIX}/man/man1
++ $(INSTALL) -d $(DESTDIR)/${PREFIX}/bin
++ $(INSTALL) -m 644 $(MANPGS) $(DESTDIR)/${PREFIX}/man/man1
++ $(INSTALL) -m 755 $(PROGS) $(DESTDIR)/${PREFIX}/bin
+
+ ###############}
+