1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

Add p5-DBZ_File, a perl module for accessing DBZ databases.

PR:		18846
Submitted by;	Yen-Ming Lee <leeym@cae.ce.ntu.edu.tw>
This commit is contained in:
Will Andrews 2000-07-02 08:08:14 +00:00
parent 48f4fbc5f8
commit 488749fefd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=30059
9 changed files with 1870 additions and 0 deletions

View File

@ -24,6 +24,7 @@
SUBDIR += p5-DBD-CSV
SUBDIR += p5-DBD-Pg
SUBDIR += p5-DBI
SUBDIR += p5-DBZ_File
SUBDIR += p5-GDBM
SUBDIR += p5-MLDBM
SUBDIR += p5-Msql

View File

@ -0,0 +1,29 @@
# New ports collection makefile for: p5-DBZ_File
# Date created: May 26th 2000
# Whom: Yen-Ming Lee <leeym@cae.ce.ntu.edu.tw>
#
# $FreeBSD$
#
PORTNAME= DBZ_File
PORTVERSION= 1.1
CATEGORIES= databases perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= DBZ_File
PKGNAMEPREFIX= p5-
DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= leeym@cae.ce.ntu.edu.tw
USE_PERL5= yes
WRKSRC= ${WRKDIR}/DBZ_File
MANPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
MAN3= DBZ_File.3
do-configure:
@ cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} -I ${FILESDIR} Makefile.PL \
LIBS= INC=-I${FILESDIR} CC="${CC}" CCFLAGS="${CFLAGS}"
.include <bsd.port.mk>

View File

@ -0,0 +1 @@
MD5 (DBZ_File_1.1.tar.gz) = 95013f069a7d86f34b967d305b0f5e4e

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
/* for dbm and dbz */
typedef struct {
char *dptr;
int dsize;
} datum;
/* standard dbm functions */
extern int dbminit();
extern datum fetch();
extern int store();
extern int delete(); /* not in dbz */
extern datum firstkey(); /* not in dbz */
extern datum nextkey(); /* not in dbz */
extern int dbmclose(); /* in dbz, but not in old dbm */
/* new stuff for dbz */
extern int dbzfresh();
extern int dbzagain();
extern datum dbzfetch();
extern int dbzstore();
extern int dbzsync();
extern long dbzsize();
extern int dbzincore();
extern int dbzcancel();
extern int dbzdebug();
/*
* In principle we could handle unlimited-length keys by operating a chunk
* at a time, but it's not worth it in practice. Setting a nice large
* bound on them simplifies the code and doesn't hurt anything.
*/
#define DBZMAXKEY 255

View File

@ -0,0 +1,29 @@
--- DBZ_File.xs.orig Sat May 27 23:38:48 2000
+++ DBZ_File.xs Sat May 27 23:39:28 2000
@@ -1,7 +1,7 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
-#include <dbz.h>
+#include <dbz.c>
typedef int DBZ_File;
@@ -14,7 +14,7 @@
int flags
int mode
CODE:
- if (dbzdbminit(filename) == 0
+ if (dbminit(filename) == 0
|| (flags && mode && errno == ENOENT
&& dbzfresh(filename, 0, '\t', '?', 0) == 0))
RETVAL = 1;
@@ -27,7 +27,7 @@
dbz_DESTROY(db)
DBZ_File db
CODE:
- dbzdbmclose();
+ dbmclose();
long
dbz_FETCH(db, key)

View File

@ -0,0 +1 @@
Perl module to access a DBZ database

View File

@ -0,0 +1,6 @@
DBZ_File allows a perl program to read and write a DBZ database,
such as the news history file. It does support the creation of a new
database if the .pag and .lib files are missing -- just call the tie
function with a create flag and a mode (see the documentation).
Author: Wayne Davison <wayne@clari.net>

View File

@ -0,0 +1,5 @@
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/DBZ_File/DBZ_File.so
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/DBZ_File/DBZ_File.bs
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/DBZ_File.pm
lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/DBZ_File/.packlist
@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/DBZ_File