summaryrefslogtreecommitdiff
path: root/textproc
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2001-05-31 10:54:21 +0000
committeragc <agc@pkgsrc.org>2001-05-31 10:54:21 +0000
commit37779f01dd9936e9f597480f897e531c13177605 (patch)
tree7cc68316fe4f2180e3046a83fdf2db3d25d163fe /textproc
parentf7755a8c889de651c4434b44e3662b6ac2b5faa8 (diff)
downloadpkgsrc-37779f01dd9936e9f597480f897e531c13177605.tar.gz
Initial import of biblook-2.9 into the Packages Collection.
Provided in PR 13012 by Stoned Elipot (Stoned.Elipot@script.jussieu.fr) Minor enhancements made by agc. Bibindex and biblook are programs for fast lookup in BibTeX bibliography data bases. Bibindex converts a .bib file to a .bix file, which is a compact binary representation of the .bib file containing hash tables for fast lookup, as well as byte offset positions into the corresponding .bib file. Biblook provides an interactive lookup facility using the .bix and .bib files.
Diffstat (limited to 'textproc')
-rw-r--r--textproc/biblook/Makefile26
-rw-r--r--textproc/biblook/distinfo7
-rw-r--r--textproc/biblook/patches/patch-aa42
-rw-r--r--textproc/biblook/patches/patch-ab13
-rw-r--r--textproc/biblook/patches/patch-ac56
-rw-r--r--textproc/biblook/pkg/DESCR10
-rw-r--r--textproc/biblook/pkg/PLIST5
7 files changed, 159 insertions, 0 deletions
diff --git a/textproc/biblook/Makefile b/textproc/biblook/Makefile
new file mode 100644
index 00000000000..6a4cb53dca2
--- /dev/null
+++ b/textproc/biblook/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1.1.1 2001/05/31 10:54:21 agc Exp $
+#
+
+DISTNAME= biblook
+PKGNAME= ${DISTNAME}-2.9
+CATEGORIES= textproc
+MASTER_SITES= http://compgeom.cs.uiuc.edu/~jeffe/files/
+
+MAINTAINER= seb@pbox.org
+HOMEPAGE= http://compgeom.cs.uiuc.edu/~jeffe/biblook.html
+COMMENT= indexing and searching tools for BibTeX bibliography databases
+
+WRKSRC= ${WRKDIR}
+
+.include "../../mk/bsd.prefs.mk"
+
+MAKE_FLAGS= CC=${CC}
+
+# override definitions in the package's Makefile via command line
+.if ${OPSYS} == "NetBSD"
+MAKE_FLAGS+= OPT="${CFLAGS} -Dunix"
+MAKE_FLAGS+= DEF_H_FILES="-DHAVE_STDLIB_H -DHAVE_NETINET_IN_H"
+MAKE_FLAGS+= DEF_MORE="-DMOREPATH=\\\"/usr/bin/more\\\" -DMORE=\\\"more\\\""
+.endif
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/textproc/biblook/distinfo b/textproc/biblook/distinfo
new file mode 100644
index 00000000000..49ef42d6d6b
--- /dev/null
+++ b/textproc/biblook/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2001/05/31 10:54:21 agc Exp $
+
+SHA1 (biblook.tar.gz) = 2bb056b806db4518c07e245fc86097c12938443b
+Size (biblook.tar.gz) = 44691 bytes
+SHA1 (patch-aa) = 35775eda3f306e2cfa07bc91ac14daa59b84e10b
+SHA1 (patch-ab) = 61aea8b1355d7441e3e1b9269bd9ce5e0b2cfaef
+SHA1 (patch-ac) = 4d6ae0e4301a184b40c777712ee91ea739d7fbfe
diff --git a/textproc/biblook/patches/patch-aa b/textproc/biblook/patches/patch-aa
new file mode 100644
index 00000000000..737c7934475
--- /dev/null
+++ b/textproc/biblook/patches/patch-aa
@@ -0,0 +1,42 @@
+$NetBSD: patch-aa,v 1.1.1.1 2001/05/31 10:54:21 agc Exp $
+
+--- Makefile.orig Tue Jan 31 21:15:22 1995
++++ Makefile
+@@ -68,12 +68,15 @@
+ # [13-Sep-1993]
+ #=======================================================================
+
+-DEST = /usr/local
++DEST = $(PREFIX)
+
+ BINDIR = $(DEST)/bin
+
+ CATDIR = $(DEST)/man/cat1
+
++INSTALL_PROGRAM = $(BSD_INSTALL_PROGRAM)
++INSTALL_MAN = $(BSD_INSTALL_MAN)
++
+ # Compilation with a C++ compiler is preferable. SunOS 4.1 CC cannot be
+ # used, however, because of its erroneous function prototypes in stdlib.h
+ # which use char* instead of void* in many places. There is no such
+@@ -243,16 +246,10 @@
+ -$(RM) TAGS
+
+ install: bibindex biblook
+- -$(CP) bibindex $(BINDIR)
+- -$(STRIP) $(BINDIR)/bibindex
+- -chmod 775 $(BINDIR)/bibindex
+- -$(CP) biblook $(BINDIR)
+- -$(STRIP) $(BINDIR)/biblook
+- -chmod 775 $(BINDIR)/biblook
+- -$(CP) bibindex.man $(MANDIR)/bibindex.$(MANEXT)
+- -chmod 774 $(MANDIR)/bibindex.$(MANEXT)
+- -$(CP) biblook.man $(MANDIR)/biblook.$(MANEXT)
+- -chmod 774 $(MANDIR)/biblook.$(MANEXT)
++ $(INSTALL_PROGRAM) bibindex $(BINDIR)
++ $(INSTALL_PROGRAM) biblook $(BINDIR)
++ $(INSTALL_MAN) bibindex.man $(MANDIR)/bibindex.$(MANEXT)
++ $(INSTALL_MAN) biblook.man $(MANDIR)/biblook.$(MANEXT)
+
+ install-ftp: $(FTPFILES)
+ -for f in $? ; \
diff --git a/textproc/biblook/patches/patch-ab b/textproc/biblook/patches/patch-ab
new file mode 100644
index 00000000000..29ac213a798
--- /dev/null
+++ b/textproc/biblook/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1.1.1 2001/05/31 10:54:21 agc Exp $
+
+--- biblook.h.orig Tue Mar 31 01:31:04 1998
++++ biblook.h
+@@ -206,7 +206,7 @@
+ #define MAJOR_VERSION 2 /* program version */
+ #define MINOR_VERSION 9
+
+-#define MAXWORD 31 /* maximum length of word indexed */
++#define MAXWORD 255 /* maximum length of word indexed */
+ #define MAXSTRING 4095 /* maximum length of line handled */
+ typedef char Word[MAXWORD+1];
+ typedef char String[MAXSTRING+1];
diff --git a/textproc/biblook/patches/patch-ac b/textproc/biblook/patches/patch-ac
new file mode 100644
index 00000000000..930838ffe81
--- /dev/null
+++ b/textproc/biblook/patches/patch-ac
@@ -0,0 +1,56 @@
+$NetBSD: patch-ac,v 1.1.1.1 2001/05/31 10:54:22 agc Exp $
+
+Use mkstemp() in preference to tempnam().
+Note use of snprintf(), as not all platforms have strlcpy().
+
+--- biblook.c 2001/05/31 08:55:19 1.1
++++ biblook.c 2001/05/31 09:02:25
+@@ -1276,6 +1276,8 @@
+ putc('\n', ofp);
+ }
+
++#include <sys/param.h>
++
+ /* ----------------------------------------------------------------- *\
+ | void PrintResults(char *filename)
+ |
+@@ -1288,6 +1290,9 @@
+ FILE *ofp;
+ char *pager;
+ char *the_tmpfile = (char*)NULL;
++#if (defined(BSD) && BSD >= 199306)
++ char f[MAXPATHLEN];
++#endif
+ #if unix
+ int childpid;
+ #else
+@@ -1315,8 +1320,19 @@
+ }
+ else
+ {
++#if (defined(BSD) && BSD >= 199306)
++ int fd;
++
++ (void) snprintf(f, sizeof(f), "/tmp/bibl.XXXXXX");
++ if ((fd = mkstemp(f)) < 0) {
++ perror("\tCan't open temp file");
++ return;
++ }
++ ofp = fdopen(fd, "w");
++#else
+ the_tmpfile = (char*)tempnam(NULL, "bibl.");
+ ofp = fopen(the_tmpfile, "w");
++#endif
+ if (!ofp)
+ {
+ perror("\tCan't open temp file");
+@@ -1386,7 +1402,9 @@
+ #endif
+
+ unlink(the_tmpfile);
++#if !(defined(BSD) && BSD >= 199306)
+ free(the_tmpfile); /* malloc'ed by tempnam() */
++#endif
+ putchar('\n');
+ }
+ }
diff --git a/textproc/biblook/pkg/DESCR b/textproc/biblook/pkg/DESCR
new file mode 100644
index 00000000000..f8970da1a76
--- /dev/null
+++ b/textproc/biblook/pkg/DESCR
@@ -0,0 +1,10 @@
+Bibindex and biblook are programs for fast lookup in BibTeX
+bibliography data bases.
+
+Bibindex converts a .bib file to a .bix file, which is a compact
+binary representation of the .bib file containing hash tables for fast
+lookup, as well as byte offset positions into the corresponding .bib
+file.
+
+Biblook provides an interactive lookup facility using the .bix and
+.bib files.
diff --git a/textproc/biblook/pkg/PLIST b/textproc/biblook/pkg/PLIST
new file mode 100644
index 00000000000..8f73a13e080
--- /dev/null
+++ b/textproc/biblook/pkg/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2001/05/31 10:54:21 agc Exp $
+bin/bibindex
+bin/biblook
+man/man1/bibindex.1
+man/man1/biblook.1