diff options
author | wiz <wiz@pkgsrc.org> | 2006-08-05 19:53:26 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2006-08-05 19:53:26 +0000 |
commit | 27979e3894ab2c4f437f4393fb1be5b9e40afe49 (patch) | |
tree | 6c83f5e14fe5379afa6f40687d93a59e54ec147b /devel/idutils | |
parent | 2ce5c6e80ec499852bd11523494acd96500382e4 (diff) | |
download | pkgsrc-27979e3894ab2c4f437f4393fb1be5b9e40afe49.tar.gz |
Re-import devel/id-utils under its new name, idutils.
Diffstat (limited to 'devel/idutils')
-rw-r--r-- | devel/idutils/DESCR | 16 | ||||
-rw-r--r-- | devel/idutils/Makefile | 33 | ||||
-rw-r--r-- | devel/idutils/PLIST | 17 | ||||
-rw-r--r-- | devel/idutils/distinfo | 16 | ||||
-rw-r--r-- | devel/idutils/patches/patch-aa | 21 | ||||
-rw-r--r-- | devel/idutils/patches/patch-ab | 13 | ||||
-rw-r--r-- | devel/idutils/patches/patch-ac | 19 | ||||
-rw-r--r-- | devel/idutils/patches/patch-ad | 22 | ||||
-rw-r--r-- | devel/idutils/patches/patch-ah | 46 | ||||
-rw-r--r-- | devel/idutils/patches/patch-ai | 40 | ||||
-rw-r--r-- | devel/idutils/patches/patch-aj | 68 | ||||
-rw-r--r-- | devel/idutils/patches/patch-ak | 53 |
12 files changed, 364 insertions, 0 deletions
diff --git a/devel/idutils/DESCR b/devel/idutils/DESCR new file mode 100644 index 00000000000..caddabcf427 --- /dev/null +++ b/devel/idutils/DESCR @@ -0,0 +1,16 @@ +`mkid' is a simple, fast, high-capacity, language-independent +identifier database tool. Actually, the term `identifier' is too +limiting--`mkid' stores tokens, be they program identifiers of any +form, literal numbers, or words of human-readable text. Database +queries can be issued from the command-line, or from within emacs, +serving as an augmented tags facility. + +`mkid' was originally written by Greg McGary <gkm@gnu.ai.mit.edu> +and posted to comp.sources.unix in September 1987. It was then +maintained and enhanced by a loose knit group of programmers on the +Internet led by Tom Horsley <Tom.Horsley@mail.hcsc.com>. Tom released +`mkid2' on comp.sources.unix in March, 1991. Since then, Greg McGary +has resumed maintenance and is releasing an improved version 3 under GPL. + +Version 3 is an interim release. Version 4 will follow in the coming +months and include a cscope clone plus other improvements. diff --git a/devel/idutils/Makefile b/devel/idutils/Makefile new file mode 100644 index 00000000000..9306e83e9ab --- /dev/null +++ b/devel/idutils/Makefile @@ -0,0 +1,33 @@ +# $NetBSD: Makefile,v 1.1.1.1 2006/08/05 19:53:26 wiz Exp $ + +DISTNAME= idutils-4.1 +#PKGREVISION= 0 +CATEGORIES= devel +MASTER_SITES= ${MASTER_SITE_GNU:=idutils/} + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://www.gnu.org/software/idutils/idutils.html +COMMENT= Classic Berkeley gid/lid tools for looking up variables in code + +CONFLICTS= sh-utils>=2.0nb2 coreutils-[0-9]* + +USE_PKGLOCALEDIR= yes +USE_TOOLS+= msgfmt + +GNU_CONFIGURE= yes +CONFIGURE_ENV+= ac_cv_path_EMACS=no +INFO_FILES= # PLIST +MAKE_ENV+= BSD_SETENV=${SETENV:Q} + +# Don't byte-compile the .el file. +MAKE_FLAGS+= elc_SCRIPTS= + +LISPDIR= ${PREFIX}/share/emacs/site-lisp +REQD_DIRS= ${LISPDIR} + +.include "../../devel/gettext-lib/buildlink3.mk" + +post-install: + ${INSTALL_DATA} ${WRKSRC}/lisp/idutils.el ${LISPDIR} + +.include "../../mk/bsd.pkg.mk" diff --git a/devel/idutils/PLIST b/devel/idutils/PLIST new file mode 100644 index 00000000000..7739f719a14 --- /dev/null +++ b/devel/idutils/PLIST @@ -0,0 +1,17 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2006/08/05 19:53:26 wiz Exp $ +bin/aid +bin/defid +bin/eid +bin/fid +bin/fnid +bin/gid +bin/lid +bin/mkid +bin/xtokid +info/idutils.info +share/emacs/site-lisp/idutils.el +share/id-lang.map +share/locale/de/LC_MESSAGES/idutils.mo +share/locale/fr/LC_MESSAGES/idutils.mo +share/locale/nl/LC_MESSAGES/idutils.mo +share/locale/pl/LC_MESSAGES/idutils.mo diff --git a/devel/idutils/distinfo b/devel/idutils/distinfo new file mode 100644 index 00000000000..357c9746230 --- /dev/null +++ b/devel/idutils/distinfo @@ -0,0 +1,16 @@ +$NetBSD: distinfo,v 1.1.1.1 2006/08/05 19:53:26 wiz Exp $ + +SHA1 (idutils-4.1.tar.gz) = 3ce5524b2962fc785d44a3ee73d32ebf975d70d1 +RMD160 (idutils-4.1.tar.gz) = 7ddadd6a97e2a096916f9ac20ccffff14cc2a330 +Size (idutils-4.1.tar.gz) = 696756 bytes +SHA1 (patch-aa) = f957a2af9470e41c1b423b9c753456e68a46405c +SHA1 (patch-ab) = 96a1ec3d8c49da9538342450df41c7cd17c0d21c +SHA1 (patch-ac) = 714cc320a02235c7d49b0ea37be60cff36f6a07b +SHA1 (patch-ad) = 05f6be0337f599736627d5bf372529e36ca22246 +SHA1 (patch-ae) = cdf05fd02278065908bdc16b599b881f6b1112ea +SHA1 (patch-af) = 223ae437d90f98499b8095254fcca1d2651c11a1 +SHA1 (patch-ag) = d1e3dfcaa905041b12f458b3fc186ebf2fa633a1 +SHA1 (patch-ah) = d60a3738ed5b9b9db01c557b2c6e4922b913a2e7 +SHA1 (patch-ai) = ebf6092918830c95308a4a1b9145314c5fecbd58 +SHA1 (patch-aj) = 6435ee17529ab3782b340f51c7e43390aaae662d +SHA1 (patch-ak) = c5f56cabfe54bd653874c58d55b1c198526707fb diff --git a/devel/idutils/patches/patch-aa b/devel/idutils/patches/patch-aa new file mode 100644 index 00000000000..1becd585a3f --- /dev/null +++ b/devel/idutils/patches/patch-aa @@ -0,0 +1,21 @@ +$NetBSD: patch-aa,v 1.1.1.1 2006/08/05 19:53:26 wiz Exp $ + +--- libidu/fnprint.c.orig 2005-12-27 00:21:33.000000000 -0500 ++++ libidu/fnprint.c 2006-08-03 12:58:44.026747335 -0400 +@@ -19,7 +19,6 @@ + #include <config.h> + #include <stdio.h> + #include <stdlib.h> +-#include <alloca.h> + #include <unistd.h> + #include <string.h> + #include <pathmax.h> +@@ -82,7 +81,7 @@ + struct file_link const *arg; + struct file_link const *dlink; + int brace_is_open = 0; +- char *file_name = alloca (sizeof(char) * PATH_MAX); ++ char file_name[sizeof(char) * PATH_MAX]; + + while (*flinkv) + { diff --git a/devel/idutils/patches/patch-ab b/devel/idutils/patches/patch-ab new file mode 100644 index 00000000000..3d155f9dc0b --- /dev/null +++ b/devel/idutils/patches/patch-ab @@ -0,0 +1,13 @@ +$NetBSD: patch-ab,v 1.1.1.1 2006/08/05 19:53:26 wiz Exp $ + +--- libidu/idfile.h.orig 2005-11-01 04:18:33.000000000 -0500 ++++ libidu/idfile.h 2006-08-03 13:00:35.159831999 -0400 +@@ -147,7 +147,7 @@ + + #define token_string(buf) (buf) + extern unsigned int token_flags (char const *buf); +-extern unsigned short token_count (char const *buf); ++extern unsigned int token_count (char const *buf); + extern unsigned char const *token_hits_addr (char const *buf); + + #define MAYBE_RETURN_PREFIX_MATCH(arg, str, val) do { \ diff --git a/devel/idutils/patches/patch-ac b/devel/idutils/patches/patch-ac new file mode 100644 index 00000000000..82c4fe8db02 --- /dev/null +++ b/devel/idutils/patches/patch-ac @@ -0,0 +1,19 @@ +$NetBSD: patch-ac,v 1.1.1.1 2006/08/05 19:53:26 wiz Exp $ + +--- libidu/idread.c.orig 2005-12-27 00:23:18.000000000 -0500 ++++ libidu/idread.c 2006-08-03 12:27:38.779542243 -0400 +@@ -211,12 +211,12 @@ + #define TOK_COUNT_ADDR(buf) ((unsigned char const *)(TOK_FLAGS_ADDR (buf) + 1)) + #define TOK_HITS_ADDR(buf) ((unsigned char const *)(TOK_COUNT_ADDR (buf) + 2)) + +-unsigned short ++unsigned int + token_count (char const *buf) + { + unsigned char const *flags = (unsigned char const *)&buf[strlen (buf) + 1]; + unsigned char const *addr = flags + 1; +- unsigned short count = *addr; ++ unsigned int count = *addr; + if (*flags & TOK_SHORT_COUNT) + count += (*++addr << 8); + return count; diff --git a/devel/idutils/patches/patch-ad b/devel/idutils/patches/patch-ad new file mode 100644 index 00000000000..b8abe54cac0 --- /dev/null +++ b/devel/idutils/patches/patch-ad @@ -0,0 +1,22 @@ +$NetBSD: patch-ad,v 1.1.1.1 2006/08/05 19:53:26 wiz Exp $ + +--- libidu/scanners.c.orig 2006-02-15 01:29:03.000000000 -0500 ++++ libidu/scanners.c 2006-08-03 15:57:57.169635912 -0400 +@@ -77,11 +77,16 @@ + { + { "C", parse_args_c, get_token_c, help_me_c }, + { "C++", parse_args_c, get_token_c, help_me_cpp }, ++ { "cpp", parse_args_c, get_token_c, help_me_cpp }, ++ { "cc", parse_args_c, get_token_c, help_me_cpp }, + { "Java", parse_args_c, get_token_c, help_me_java }, + { "asm", parse_args_asm, get_token_asm, help_me_asm }, ++ { "S", parse_args_asm, get_token_asm, help_me_asm }, ++ { "s", parse_args_asm, get_token_asm, help_me_asm }, + { "text", parse_args_text, get_token_text, help_me_text }, + { "perl", parse_args_perl, get_token_perl, help_me_perl }, +- { "lisp", parse_args_lisp, get_token_lisp, help_me_lisp } ++ { "lisp", parse_args_lisp, get_token_lisp, help_me_lisp }, ++ { "make", parse_args_text, get_token_text, help_me_text }, + }; + struct language const *languages_N = &languages_0[cardinalityof (languages_0)]; + diff --git a/devel/idutils/patches/patch-ah b/devel/idutils/patches/patch-ah new file mode 100644 index 00000000000..65deb7061ab --- /dev/null +++ b/devel/idutils/patches/patch-ah @@ -0,0 +1,46 @@ +$NetBSD: patch-ah,v 1.1.1.1 2006/08/05 19:53:26 wiz Exp $ + +--- src/Makefile.in.orig 2006-03-11 19:34:50.000000000 -0500 ++++ src/Makefile.in 2006-08-03 12:58:23.622869604 -0400 +@@ -92,28 +92,28 @@ + PROGRAMS = $(bin_PROGRAMS) + fid_SOURCES = fid.c + fid_OBJECTS = fid.$(OBJEXT) +-fid_LDADD = $(LDADD) ++fid_LDADD = $(DEPLIBS) + am__DEPENDENCIES_1 = + fid_DEPENDENCIES = ../libidu/libidu.a ../lib/libgnu.a \ + $(am__DEPENDENCIES_1) ../lib/libgnu.a + fnid_SOURCES = fnid.c + fnid_OBJECTS = fnid.$(OBJEXT) +-fnid_LDADD = $(LDADD) ++fnid_LDADD = $(DEPLIBS) + fnid_DEPENDENCIES = ../libidu/libidu.a ../lib/libgnu.a \ + $(am__DEPENDENCIES_1) ../lib/libgnu.a + lid_SOURCES = lid.c + lid_OBJECTS = lid.$(OBJEXT) +-lid_LDADD = $(LDADD) ++lid_LDADD = $(DEPLIBS) + lid_DEPENDENCIES = ../libidu/libidu.a ../lib/libgnu.a \ + $(am__DEPENDENCIES_1) ../lib/libgnu.a + mkid_SOURCES = mkid.c + mkid_OBJECTS = mkid.$(OBJEXT) +-mkid_LDADD = $(LDADD) ++mkid_LDADD = $(DEPLIBS) + mkid_DEPENDENCIES = ../libidu/libidu.a ../lib/libgnu.a \ + $(am__DEPENDENCIES_1) ../lib/libgnu.a + xtokid_SOURCES = xtokid.c + xtokid_OBJECTS = xtokid.$(OBJEXT) +-xtokid_LDADD = $(LDADD) ++xtokid_LDADD = $(DEPLIBS) + xtokid_DEPENDENCIES = ../libidu/libidu.a ../lib/libgnu.a \ + $(am__DEPENDENCIES_1) ../lib/libgnu.a + dist_binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +@@ -263,6 +263,7 @@ + -DLANGUAGE_MAP_FILE=\"$(datadir)/id-lang.map\" + + LDADD = ../libidu/libidu.a ../lib/libgnu.a $(LIBINTL) ../lib/libgnu.a ++DEPLIBS = ../libidu/libidu.a ../lib/libgnu.a + all: all-am + + .SUFFIXES: diff --git a/devel/idutils/patches/patch-ai b/devel/idutils/patches/patch-ai new file mode 100644 index 00000000000..6b8082e7b1f --- /dev/null +++ b/devel/idutils/patches/patch-ai @@ -0,0 +1,40 @@ +$NetBSD: patch-ai,v 1.1.1.1 2006/08/05 19:53:26 wiz Exp $ + +--- src/fid.c.orig 2006-03-05 05:24:21.000000000 -0500 ++++ src/fid.c 2006-08-03 12:49:29.089070087 -0400 +@@ -23,7 +23,6 @@ + #include <unistd.h> + #include <stdlib.h> + #include <errno.h> +-#include <alloca.h> + #include <error.h> + #include <pathmax.h> + #include <xalloc.h> +@@ -211,7 +210,7 @@ + struct file_link **members; + struct file_link **end = &members_0[idh.idh_files]; + struct file_link *fn_flink = 0; +- char *file_name_buf = alloca (PATH_MAX); ++ char file_name_buf[PATH_MAX]; + int has_slash = (strchr (file_name, '/') != 0); + int file_name_length = strlen (file_name); + int idx = -1; +--- src/fnid.c.orig 2006-03-05 05:24:29.000000000 -0500 ++++ src/fnid.c 2006-08-03 12:45:08.051454285 -0400 +@@ -24,7 +24,6 @@ + #include <errno.h> + #include <stdlib.h> + #include <errno.h> +-#include <alloca.h> + #include <xalloc.h> + #include <pathmax.h> + #include <error.h> +@@ -167,7 +166,7 @@ + char **patv_0 = xmalloc (sizeof(char *) * (argc * 2)); + char **patv_N; + char **patv = patv_0; +- char *file_name = alloca (PATH_MAX); ++ char file_name[PATH_MAX]; + + for ( ; argc; argc--, argv++) + { diff --git a/devel/idutils/patches/patch-aj b/devel/idutils/patches/patch-aj new file mode 100644 index 00000000000..4e1f7d8045e --- /dev/null +++ b/devel/idutils/patches/patch-aj @@ -0,0 +1,68 @@ +$NetBSD: patch-aj,v 1.1.1.1 2006/08/05 19:53:26 wiz Exp $ + +--- src/lid.c.orig 2006-03-05 05:23:56.000000000 -0500 ++++ src/lid.c 2006-08-04 14:50:44.415180548 -0400 +@@ -31,7 +31,6 @@ + #include <dirname.h> + #include <unistd.h> + #include <termios.h> +-#include <alloca.h> + #include <regex.h> + #include <xalloc.h> + #include <pathmax.h> +@@ -538,10 +537,11 @@ + void + report_grep (char const *name, struct file_link **flinkv) + { +- char line[1<<020]; ++ char *line = xmalloc(BUFSIZ); ++ size_t line_len = BUFSIZ; + char const *pattern = 0; + regex_t compiled; +- char *file_name = alloca (PATH_MAX); ++ char file_name[PATH_MAX]; + + if (key_style == ks_pattern) + { +@@ -575,6 +575,15 @@ + + while (fgets (line + 1, sizeof (line) - 1, source_FILE)) + { ++ size_t len; ++ while ((len = strlen(line)) == line_len - 1 && ++ line[line_len - 2] != '\n') ++ { ++ line = xrealloc(line, line_len + BUFSIZ); ++ line_len += BUFSIZ; ++ if (fgets(line + len, BUFSIZ, source_FILE) == NULL) ++ break; ++ } + line_number++; + if (pattern) + { +@@ -589,6 +598,7 @@ + } + fclose (source_FILE); + } ++ free(line); + } + + void +@@ -765,7 +775,7 @@ + { + char pattern[BUFSIZ]; + unsigned int count; +- char *file_name = alloca (PATH_MAX); ++ char file_name[PATH_MAX]; + char *eol; + + if (fgets (pattern, sizeof (pattern), stdin) == 0) +@@ -1333,7 +1343,7 @@ + continue; + } + /* march down both strings as long as we match */ +- while (*++name == *++line) ++ while (*name != '\0' && *++name == *++line) + ; + /* is this the end of `name', is there a word delimiter ?? */ + if (*name == '\0' && !IS_ALNUM (*line)) diff --git a/devel/idutils/patches/patch-ak b/devel/idutils/patches/patch-ak new file mode 100644 index 00000000000..cadafddf708 --- /dev/null +++ b/devel/idutils/patches/patch-ak @@ -0,0 +1,53 @@ +$NetBSD: patch-ak,v 1.1.1.1 2006/08/05 19:53:26 wiz Exp $ + +--- src/mkid.c.orig 2006-02-16 01:40:30.000000000 -0500 ++++ src/mkid.c 2006-08-03 15:57:10.096617302 -0400 +@@ -28,7 +28,6 @@ + #include <pathmax.h> + #include <string.h> + #include <dirname.h> +-#include <alloca.h> + #include <limits.h> + #include <inttostr.h> + #include <xalloc.h> +@@ -40,8 +39,6 @@ + #include "scanners.h" + #include "iduglobal.h" + +-char* dirname(char* path); +- + struct summary + { + struct token **sum_tokens; +@@ -372,11 +369,18 @@ + { + if (errno == ENOENT) + { +- char const *dirname = dir_name ((char*)filename); +- if (access (dirname, 06) < 0) ++ char *dir_name = strrchr (filename, '/'); ++ if (dir_name) ++ { ++ while (*--dir_name == '/') ++ continue; ++ dir_name++; ++ } ++ dir_name = dir_name ? strndup (filename, dir_name - filename) : strdup("."); ++ if (access (dir_name, 06) < 0) + error (1, errno, _("can't create `%s' in `%s'"), +- base_name (filename), dirname); +- free(dirname); ++ base_name (filename), dir_name); ++ free(dir_name); + } + else + error (1, errno, _("can't modify `%s'"), filename); +@@ -450,7 +454,7 @@ + source_FILE = fopen (flink->fl_name, "r"); + if (source_FILE) + { +- char *file_name = alloca (PATH_MAX); ++ char file_name[PATH_MAX]; + if (statistics_flag) + { + if (fstat (fileno (source_FILE), &st) < 0) |