summaryrefslogtreecommitdiff
path: root/devel/ncc
diff options
context:
space:
mode:
Diffstat (limited to 'devel/ncc')
-rw-r--r--devel/ncc/DESCR5
-rw-r--r--devel/ncc/Makefile41
-rw-r--r--devel/ncc/PLIST20
-rw-r--r--devel/ncc/distinfo9
-rw-r--r--devel/ncc/patches/patch-aa22
-rw-r--r--devel/ncc/patches/patch-ab15
-rw-r--r--devel/ncc/patches/patch-ac13
-rw-r--r--devel/ncc/patches/patch-ad13
8 files changed, 138 insertions, 0 deletions
diff --git a/devel/ncc/DESCR b/devel/ncc/DESCR
new file mode 100644
index 00000000000..686facd7078
--- /dev/null
+++ b/devel/ncc/DESCR
@@ -0,0 +1,5 @@
+ncc is a compiler that produces program analysis information. ncc
+is a decent replacement of cflow and cscope able to analyze any
+program using the gcc compiler. The program also includes a
+graphical call-graph navigator and source browser which is extremely
+practical for hacking and comprehending large projects.
diff --git a/devel/ncc/Makefile b/devel/ncc/Makefile
new file mode 100644
index 00000000000..0d746f8ca68
--- /dev/null
+++ b/devel/ncc/Makefile
@@ -0,0 +1,41 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/10/20 07:52:26 wiz Exp $
+#
+
+DISTNAME= ncc-2.8
+CATEGORIES= devel
+MASTER_SITES= http://students.ceid.upatras.gr/~sxanth/ncc/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://students.ceid.upatras.gr/~sxanth/ncc/index.html
+COMMENT= Compiler that produces program analysis information
+
+BUILD_TARGET= tout
+CFLAGS+= -DNOGNU='"${PREFIX}/share/ncc/nognu"'
+
+USE_LANGUAGES= c c++
+
+SUBST_CLASSES+= prefix
+SUBST_STAGE.prefix= pre-configure
+SUBST_MESSAGE.prefix= Fixing hardcoded paths
+SUBST_FILES.prefix= config.h
+SUBST_SED.prefix= -e 's,@PREFIX@,${PREFIX},g'
+
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/objdir/ncc ${PREFIX}/bin
+ ${LN} -s ncc ${PREFIX}/bin/nccar
+ ${LN} -s ncc ${PREFIX}/bin/nccc++
+ ${LN} -s ncc ${PREFIX}/bin/nccld
+ ${INSTALL_PROGRAM} ${WRKSRC}/nccnav/nccnav ${PREFIX}/bin
+ ${LN} -s nccnav ${PREFIX}/bin/nccnavi
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/ncc
+ ${INSTALL_DATA} ${WRKSRC}/doc/nognu ${PREFIX}/share/ncc
+ ${INSTALL_MAN} ${WRKSRC}/ncc.1 ${PREFIX}/${PKGMANDIR}/man1
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ncc
+ ${INSTALL_DATA} ${WRKSRC}/doc/KEYS.txt ${PREFIX}/share/doc/ncc
+ ${INSTALL_DATA} ${WRKSRC}/doc/TROUBLES ${PREFIX}/share/doc/ncc
+ ${INSTALL_DATA} ${WRKSRC}/doc/hacking.* ${PREFIX}/share/doc/ncc
+ ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/ncc
+
+.include "../../devel/ncurses/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/ncc/PLIST b/devel/ncc/PLIST
new file mode 100644
index 00000000000..ee01ccb5691
--- /dev/null
+++ b/devel/ncc/PLIST
@@ -0,0 +1,20 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2008/10/20 07:52:26 wiz Exp $
+bin/ncc
+bin/nccar
+bin/nccc++
+bin/nccld
+bin/nccnav
+bin/nccnavi
+man/man1/ncc.1
+share/doc/ncc/KEYS.txt
+share/doc/ncc/README
+share/doc/ncc/TROUBLES
+share/doc/ncc/hacking.BIND
+share/doc/ncc/hacking.GCC
+share/doc/ncc/hacking.GLIBC
+share/doc/ncc/hacking.LINUX-KERNEL
+share/doc/ncc/hacking.QEMU
+share/doc/ncc/hacking.README
+share/ncc/nognu
+@dirrm share/ncc
+@dirrm share/doc/ncc
diff --git a/devel/ncc/distinfo b/devel/ncc/distinfo
new file mode 100644
index 00000000000..552acf115a8
--- /dev/null
+++ b/devel/ncc/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1.1.1 2008/10/20 07:52:26 wiz Exp $
+
+SHA1 (ncc-2.8.tar.gz) = 96f6d8d76dc0e67a436b7f1acf67503998ad5771
+RMD160 (ncc-2.8.tar.gz) = dcd8998ff31d1291208bf9ea4ff5a08b2525745d
+Size (ncc-2.8.tar.gz) = 104536 bytes
+SHA1 (patch-aa) = 65ff800adf6dacab59553d13fa9f31d8b101103f
+SHA1 (patch-ab) = 92ada3f6f824d18a05a6e38d2f1086ebaa87e98e
+SHA1 (patch-ac) = 437150dbe18e5d2c8c175667f3fa6b1d419f452a
+SHA1 (patch-ad) = 0bc35544a5fe07112ee53ff5864d3a0d0f011e6e
diff --git a/devel/ncc/patches/patch-aa b/devel/ncc/patches/patch-aa
new file mode 100644
index 00000000000..62a8fcae22c
--- /dev/null
+++ b/devel/ncc/patches/patch-aa
@@ -0,0 +1,22 @@
+$NetBSD: patch-aa,v 1.1.1.1 2008/10/20 07:52:26 wiz Exp $
+
+--- config.h.orig 2007-08-28 21:51:44.000000000 +0000
++++ config.h
+@@ -3,7 +3,7 @@
+ #define alloca __builtin_alloca
+ #endif
+ #else
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <stdlib.h>
+ #else
+ #include <alloca.h>
+@@ -14,7 +14,7 @@
+ #define GNU_VIOLATIONS
+ #define LABEL_VALUES
+ #define OUTPUT_EXT ".nccout"
+-#define NOGNU "/usr/include/nognu"
++#define NOGNU "@PREFIX@/share/ncc/nognu"
+ #define NCC_INFILE_KEY "ncc-key"
+ #define FAKE_VARIABLE_ARRAYS
+ #define NCC_ISOC99
diff --git a/devel/ncc/patches/patch-ab b/devel/ncc/patches/patch-ab
new file mode 100644
index 00000000000..dbfb80e9d68
--- /dev/null
+++ b/devel/ncc/patches/patch-ab
@@ -0,0 +1,15 @@
+$NetBSD: patch-ab,v 1.1.1.1 2008/10/20 07:52:26 wiz Exp $
+
+--- Makefile.orig 2006-09-26 16:23:53.000000000 +0000
++++ Makefile
+@@ -1,8 +1,8 @@
+
+ # these are set by config
+-CC = g++
++CC = $(CXX)
+ DESTDIR ?= /usr
+-LCFLAGS = -g -O2
++LCFLAGS = -g
+ BINDIR = ${DESTDIR}/bin
+ MANDIR = ${DESTDIR}/share/man
+ INCLUDEDIR = ${DESTDIR}/include
diff --git a/devel/ncc/patches/patch-ac b/devel/ncc/patches/patch-ac
new file mode 100644
index 00000000000..eb07bebf3d1
--- /dev/null
+++ b/devel/ncc/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2008/10/20 07:52:26 wiz Exp $
+
+--- dbstree.h.orig 2006-07-09 14:05:58.000000000 +0000
++++ dbstree.h
+@@ -3,7 +3,7 @@
+ Check dbstree.tex for info.
+ ******************************************************************************/
+
+-#include <alloca.h>
++#include "config.h"
+ #ifndef HAVE_DBSTREE
+ #define HAVE_DBSTREE
+
diff --git a/devel/ncc/patches/patch-ad b/devel/ncc/patches/patch-ad
new file mode 100644
index 00000000000..eb894217543
--- /dev/null
+++ b/devel/ncc/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1.1.1 2008/10/20 07:52:26 wiz Exp $
+
+--- preproc.C.orig 2008-10-11 11:18:56.000000000 -0400
++++ preproc.C
+@@ -35,7 +35,7 @@ static bool isobj (char *f)
+ static char *objfile (char *f)
+ {
+ char *r = strdup (f);
+- char *p = rindex (r, '.');
++ char *p = strrchr (r, '.');
+ if (p) strcpy (p, ".o");
+ return r;
+ }