aboutsummaryrefslogtreecommitdiff
path: root/databases/dbview
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@FreeBSD.org>2008-06-04 20:34:41 +0000
committerPietro Cerutti <gahr@FreeBSD.org>2008-06-04 20:34:41 +0000
commit96b2e7b3b831bf8fbb0ad3bee5a990f9152736d7 (patch)
tree35390a995dab0e8258bfdbcda774634977aa4fad /databases/dbview
parent53917d4e97193ebc8f68825b480367ea6004e6b5 (diff)
downloadports-96b2e7b3b831bf8fbb0ad3bee5a990f9152736d7.tar.gz
ports-96b2e7b3b831bf8fbb0ad3bee5a990f9152736d7.zip
Notes
Diffstat (limited to 'databases/dbview')
-rw-r--r--databases/dbview/Makefile10
-rw-r--r--databases/dbview/distinfo6
-rw-r--r--databases/dbview/files/patch-aa14
-rw-r--r--databases/dbview/files/patch-ab21
-rw-r--r--databases/dbview/files/patch-db_dump.c112
-rw-r--r--databases/dbview/files/patch-db_dump.h54
-rw-r--r--databases/dbview/files/patch-dbview.c53
-rw-r--r--databases/dbview/pkg-plist6
8 files changed, 12 insertions, 264 deletions
diff --git a/databases/dbview/Makefile b/databases/dbview/Makefile
index cc61d6c82b6a..16ad45222e3f 100644
--- a/databases/dbview/Makefile
+++ b/databases/dbview/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= dbview
-PORTVERSION= 1.0.3
-PORTREVISION= 2
+PORTVERSION= 1.0.4
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= apps/database/proprietary
@@ -20,8 +19,11 @@ MAKE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
MAN1= dbview.1
DOCS= README dBASE
-pre-patch:
- @${REINPLACE_CMD} -e 's,<malloc.h>,<stdlib.h>,' ${WRKSRC}/db_dump.c
+post-patch:
+ @${REINPLACE_CMD} -e 's|<malloc.h>|<stdlib.h>|; \
+ s|<endian.h>|<sys/endian.h>|; \
+ /byteswap/d' \
+ ${WRKSRC}/db_dump.c
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/dbview ${PREFIX}/bin
diff --git a/databases/dbview/distinfo b/databases/dbview/distinfo
index 506160532d2b..a12565f56a88 100644
--- a/databases/dbview/distinfo
+++ b/databases/dbview/distinfo
@@ -1,3 +1,3 @@
-MD5 (dbview-1.0.3.tar.gz) = 75521f1f3eb461e27481a6098b5da777
-SHA256 (dbview-1.0.3.tar.gz) = e409f0d62785fb955d9adec1191b0181c288d8a06f737e49f72be3357497b05b
-SIZE (dbview-1.0.3.tar.gz) = 10897
+MD5 (dbview-1.0.4.tar.gz) = aba3a1137b17cf4915641612fb200562
+SHA256 (dbview-1.0.4.tar.gz) = 8fb9866d140f2ea1390245fedf2a9696ad948b5de7e6ef6d23ceb36e73e163b3
+SIZE (dbview-1.0.4.tar.gz) = 10217
diff --git a/databases/dbview/files/patch-aa b/databases/dbview/files/patch-aa
index 80151cdeae95..bf4430dc2e06 100644
--- a/databases/dbview/files/patch-aa
+++ b/databases/dbview/files/patch-aa
@@ -24,17 +24,3 @@
depend:
makedepend *.c
-@@ -56,13 +54,3 @@
-
- # DO NOT DELETE
-
--db_dump.o: db_dump.h /usr/include/fcntl.h /usr/include/features.h
--db_dump.o: /usr/include/sys/cdefs.h /usr/include/sys/types.h
--db_dump.o: /usr/include/linux/types.h /usr/include/asm/types.h
--db_dump.o: /usr/include/gnu/types.h /usr/include/linux/fcntl.h
--db_dump.o: /usr/include/sys/stat.h /usr/include/linux/stat.h
--db_dump.o: /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h
--db_dump.o: /usr/include/unistd.h /usr/include/posix_opt.h
--db_dump.o: /usr/include/confname.h /usr/include/malloc.h
--dbview.o: version.h db_dump.h /usr/include/stdio.h /usr/include/libio.h
--dbview.o: /usr/include/_G_config.h /usr/include/getopt.h
diff --git a/databases/dbview/files/patch-ab b/databases/dbview/files/patch-ab
deleted file mode 100644
index dfc42c049f0d..000000000000
--- a/databases/dbview/files/patch-ab
+++ /dev/null
@@ -1,21 +0,0 @@
---- db_dump.c.orig Tue Oct 8 02:25:54 1996
-+++ db_dump.c Fri Aug 16 14:24:09 2002
-@@ -116,7 +116,7 @@
- {
- char *c=var;
-
-- for (c+=strlen(var); isspace (*c); c--);
-+ for (c+=strlen(var)-1; isspace (*c); c--);
-
- *(++c) = '\0';
- return var;
-@@ -210,7 +210,9 @@
- stack_field(fld);
- }
- read(dbfile,Buffer,1); /* read the silly little \r 0x0d character */
-+#ifdef I_USE_A_LAME_OS_LIKE_DOS
- read(dbfile,Buffer,1); /* strange, it only works if we read another byte */
-+#endif
-
- return;
- }
diff --git a/databases/dbview/files/patch-db_dump.c b/databases/dbview/files/patch-db_dump.c
deleted file mode 100644
index 254dffaada8e..000000000000
--- a/databases/dbview/files/patch-db_dump.c
+++ /dev/null
@@ -1,112 +0,0 @@
---- db_dump.c.orig Thu May 30 14:15:30 2002
-+++ db_dump.c Wed Apr 17 15:56:46 2002
-@@ -164,6 +164,9 @@
- int flags;
- {
- int fields;
-+ char *info;
-+ char *lang;
-+ char *cdx;
- DBASE_FIELD *fld;
-
- if(dbfile==-1) {
-@@ -171,26 +174,71 @@
- return;
- }
- read(dbfile,&dbhead,sizeof(DBASE_HEAD));
-- if( !(dbhead.version==3 || dbhead.version==0x83) ) {
-+ if ( ! ( dbhead.version==0x03 || dbhead.version==0x83 || dbhead.version==0x04 || dbhead.version==0x05 || dbhead.version==0x8b || dbhead.version==0xf5 ) ) {
- printf ("Version %d not supported\n",dbhead.version);
-- if(dbhead.version==0x8b ) {
-- printf ("dBase IV - partially known...\n");
-+ if (dbhead.version==0x8e ) {
-+ printf ("dBase IV or dBase V with SQL table - partially known...\n");
- }
-+ if (dbhead.version==0x43 || dbhead.version==0xb3){
-+ printf ("FlagShip - partially known...\n");
-+ }
- return;
- }
-+ if (dbhead.version==0x03){
-+ info="Plain dbf, dBaseIII+";
-+ }
-+ if (dbhead.version==0x04){
-+ info="Plain dbf, dBaseIV+";
-+ }
-+ if (dbhead.version==0x05){
-+ info="Plain dbf, dBaseV or FoxPro";
-+ }
-+ if (dbhead.version==0x83){
-+ info="dBaseIII+ w/memo";
-+ }
-+ if (dbhead.version==0x8b){
-+ info="dBaseIV+ w/memo";
-+ }
-+ if (dbhead.version==0xf5){
-+ info="FoxPro w/memo";
-+ }
-+
-+ fields=(dbhead.header-1)/32-1;
-
-+ if (dbhead.excdx){
-+ cdx="Yes";
-+ }
-+ else{
-+ cdx="No";
-+ }
-+ if (dbhead.language==101){
-+ lang="DOS 866";
-+ }
-+ else if (dbhead.language==2){
-+ lang="WIN 1251";
-+ }
-+ else if (dbhead.language==2){
-+ lang="DOS 850 Multi ling";
-+ }
-+ else if (dbhead.language==1){
-+ lang="DOS 437 USA";
-+ }
-+ else{
-+ lang="Unknown";
-+ }
- if (flags & DB_FL_INFO) {
-- printf("File version : %d\n",dbhead.version);
-- printf("Last update : %02d/%02d/%2d\n", dbhead.l_update[1],dbhead.l_update[2],dbhead.l_update[0]);
-- printf("Number of recs: %ld\n",dbhead.count);
-- printf("Header length : %d\n",dbhead.header);
-- printf("Record length : %d\n",dbhead.lrecl);
-+ printf("File version : %d, %s\n",dbhead.version,info);
-+ printf("Last update : %02d/%02d/%2d\n", dbhead.l_update[1],dbhead.l_update[2],dbhead.l_update[0]+1900);
-+ printf("Number of recs : %ld\n",dbhead.count);
-+ printf("Header length : %d\n",dbhead.header);
-+ printf("Record length : %d\n",dbhead.lrecl);
-+ printf("Exist index cdx : %s\n",cdx);
-+ printf("Language ID : %s\n",lang);
-+ printf("Count fields : %d\n\n",fields);
- }
-
- Buffer=malloc(dbhead.lrecl);
--
-- fields=(dbhead.header-1)/32-1;
--
-+
- if (flags & DB_FL_DESCR) {
- printf("Field Name\tType\tLength\tDecimal Pos\n");
- }
-@@ -227,7 +275,7 @@
- char delim;
- {
- int bytes;
--
-+ lseek(dbfile,dbhead.header,SEEK_SET);
- while(cnt) {
- bytes=read(dbfile,Buffer,dbhead.lrecl);
- if(bytes!=dbhead.lrecl)
-@@ -253,7 +301,6 @@
- char delim;
- {
- FLD_LIST *temp;
--
- temp=db_fld_root;
- while (temp) {
- memcpy(buf_work,temp->data,temp->fld->length);
diff --git a/databases/dbview/files/patch-db_dump.h b/databases/dbview/files/patch-db_dump.h
deleted file mode 100644
index 47a86d37d48c..000000000000
--- a/databases/dbview/files/patch-db_dump.h
+++ /dev/null
@@ -1,54 +0,0 @@
---- db_dump.h.orig Tue Oct 8 17:18:40 1996
-+++ db_dump.h Thu Apr 14 20:10:55 2005
-@@ -48,7 +48,10 @@
- #define DB_FL_TRIM 0x20
-
- typedef struct dbase_head {
-- unsigned char version; /* 03 for dbIII and 83 for dbIII w/memo file */
-+ unsigned char version; /* 0x03,0x04,0x05-DBIII+/DBIV */
-+ /* 0x83 - DBIII+ w/memo;*/
-+ /* 0xF5-FoxPro w/memo;*/
-+ /* 0x8B-DBIV w/memo file */
- unsigned char l_update[3]; /* yymmdd for last update*/
- unsigned long count; /* number of records in file*/
- unsigned short header; /* length of the header
-@@ -58,21 +61,32 @@
- * includes the delete
- * byte
- */
-- unsigned char reserv[20];
-+ unsigned char reserv1[16];
-+ unsigned char excdx; /* 1-exist cdx file, 0 - nonexist*/
-+ unsigned char language; /* language driver:0x01 - 437 DOS;0x02 - 850 DOS; 0x03 - 1251; 0x00 - ignored*/
-+ unsigned char reserv2[2];
- } DBASE_HEAD;
-
--#define DB_FLD_CHAR 'C'
--#define DB_FLD_NUM 'N'
--#define DB_FLD_LOGIC 'L'
--#define DB_FLD_MEMO 'M'
--#define DB_FLD_DATE 'D'
-+#define DB_FLD_CHAR 'C'
-+#define DB_FLD_NUM 'N'
-+#define DB_FLD_LOGIC 'L'
-+#define DB_FLD_VARIABLE 'V'
-+#define DB_FLD_MEMO 'M'
-+#define DB_FLD_FLOAT 'F'
-+#define DB_FLD_PICTURE 'P'
-+#define DB_FLD_BINARY 'B'
-+#define DB_FLD_GENERAL 'G'
-+#define DB_FLD_SHINT '2'
-+#define DB_FLD_LINT '4'
-+#define DB_FLD_DOUBLE '8'
-+#define DB_FLD_DATE 'D'
-
- typedef struct dbase_fld {
- char name[11]; /*field name*/
- char type; /*field type*/
- /* A-T uses large data model but drop it for now */
- char *data_ptr; /*pointer into buffer*/
-- char length; /*field length*/
-+ unsigned char length; /*field length*/
- char dec_point; /*field decimal point*/
- char fill[14];
- } DBASE_FIELD;
diff --git a/databases/dbview/files/patch-dbview.c b/databases/dbview/files/patch-dbview.c
deleted file mode 100644
index c24fa0023446..000000000000
--- a/databases/dbview/files/patch-dbview.c
+++ /dev/null
@@ -1,53 +0,0 @@
---- dbview.c.orig Tue Oct 8 11:04:23 1996
-+++ dbview.c Wed Apr 17 16:16:53 2002
-@@ -34,19 +34,19 @@
-
- void help_short()
- {
-- printf ("%s %s - %s, (c) 1996 by Martin Schulze\n", progname, version, longname);
-+ printf ("%s %s - %s, (c) 1996 by Martin Schulze, Patched Alexander Trapeznikov, 2001 \n", progname, version, longname);
- printf ("\n");
-- printf ("%s [-b [-t]] [-d delim] [-e] [-h] [-i] [-o] [-o] [-v] dbfile\n", progname);
-+ printf ("%s [-b [-t]] [-d delim] [-e] [-h|-H] [-i] [-o] [-o] [-v] dbfile\n", progname);
- }
-
- void help_long()
- {
-- printf ("%s %s - %s, (c) 1996 by Martin Schulze\n", progname, version, longname);
-+ printf ("%s %s - %s, (c) 1996 by Martin Schulze, Patched Alexander Trapeznikov, 2001 \n", progname, version, longname);
- printf ("\n");
- printf (" --browse, -b browse the database\n");
- printf (" --delimiter, -d set the delimiter for browse output\n");
- printf (" --description, -e display field description\n");
-- printf (" --help, -h display help\n");
-+ printf (" --help, -H, -h display help\n");
- printf (" --info, -i display db information\n");
- printf (" --omit, -o omit db records\n");
- printf (" --reserve, -r reserve fieldnames from beeing translated\n");
-@@ -54,7 +54,7 @@
- printf (" --version, -v display version\n");
- }
-
--void main (int argc, char **argv)
-+int main (int argc, char **argv)
- {
- int opt_index;
- char c;
-@@ -80,6 +80,8 @@
- switch (c) {
- case 'H': /* --help */
- help_long (); exit (0);
-+ case 'h': /* --help */
-+ help_long (); exit (0);
- case 'b':
- flags |= DB_FL_BROWSE;
- break;
-@@ -93,8 +95,6 @@
- case 'e':
- flags |= DB_FL_DESCR;
- break;
-- case 'h':
-- help_short (); exit (0);
- case 'i':
- flags |= DB_FL_INFO;
- break;
diff --git a/databases/dbview/pkg-plist b/databases/dbview/pkg-plist
index 99f6b761ff0a..0c31fda20b89 100644
--- a/databases/dbview/pkg-plist
+++ b/databases/dbview/pkg-plist
@@ -1,4 +1,4 @@
bin/dbview
-%%PORTDOCS%%share/doc/dbview/README
-%%PORTDOCS%%share/doc/dbview/dBASE
-%%PORTDOCS%%@dirrm share/doc/dbview
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/dBASE
+%%PORTDOCS%%@dirrm %%DOCSDIR%%