Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Jul 2005 08:32:26 +0200
From:      Radim Kolar <hsn@netmag.cz>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        hsn@sd.iol.cz, brion@queeg.com
Subject:   ports/83591: [PATCH] textproc/catdoc: update to 0.94
Message-ID:  <E1Du2hO-000JiI-I7@sanatana.dharma>
Resent-Message-ID: <200507170710.j6H7ACYc076040@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         83591
>Category:       ports
>Synopsis:       [PATCH] textproc/catdoc: update to 0.94
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 17 07:10:12 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Radim Kolar
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
Sanatana Dharma
>Environment:
System: FreeBSD sanatana.dharma 5.4-STABLE FreeBSD 5.4-STABLE #13: Sat Jul  2 13:14:50 CEST
>Description:
- Update to 0.94

Removed file(s):
- files/patch-ole
- files/patch-src-Makefile.in

Port maintainer (brion@queeg.com) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- catdoc-0.94.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/textproc/catdoc/Makefile /home/hsn/hacked/catdoc/Makefile
--- /usr/ports/textproc/catdoc/Makefile	Sat Nov 13 05:05:39 2004
+++ /home/hsn/hacked/catdoc/Makefile	Sun Jul 17 08:19:25 2005
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	catdoc
-PORTVERSION=	0.93.4
+PORTVERSION=	0.94
 CATEGORIES=	textproc
 MASTER_SITES=	ftp://ftp.45.free.net/pub/catdoc/
 #		${MASTER_SITE_TEX_CTAN:S/$/support\/catdoc\//}
@@ -17,7 +17,7 @@
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
 USE_REINPLACE=	yes
-MAN1=		catdoc.1 wordview.1 xls2csv.1
+MAN1=		catdoc.1 wordview.1 xls2csv.1 catppt.1
 
 .if !defined(LANG) || ${LANG} != ru_RU.KOI8-R
 # Remove the below line to get Cyrillic code page support instead
diff -ruN --exclude=CVS /usr/ports/textproc/catdoc/distinfo /home/hsn/hacked/catdoc/distinfo
--- /usr/ports/textproc/catdoc/distinfo	Mon Nov  1 14:59:22 2004
+++ /home/hsn/hacked/catdoc/distinfo	Sat Jul 16 18:51:44 2005
@@ -1,2 +1,2 @@
-MD5 (catdoc-0.93.4.tar.gz) = efe7e24b387444d5967fc2fc25664fb2
-SIZE (catdoc-0.93.4.tar.gz) = 121933
+MD5 (catdoc-0.94.tar.gz) = f884dabe366d66c6cda35dacb0cdceab
+SIZE (catdoc-0.94.tar.gz) = 151690
diff -ruN --exclude=CVS /usr/ports/textproc/catdoc/files/patch-ole /home/hsn/hacked/catdoc/files/patch-ole
--- /usr/ports/textproc/catdoc/files/patch-ole	Mon Nov  1 14:59:22 2004
+++ /home/hsn/hacked/catdoc/files/patch-ole	Thu Jan  1 01:00:00 1970
@@ -1,226 +0,0 @@
-Index: src/ole.c
-===================================================================
-RCS file: /work/oss/catdoc/src/ole.c,v
-retrieving revision 1.14
-diff -u -w -b -B -r1.14 ole.c
---- src/ole.c	24 Dec 2003 12:20:46 -0000	1.14
-+++ src/ole.c	26 Oct 2004 09:53:48 -0000
-@@ -24,7 +24,7 @@
- 
- #define min(a,b) ((a) < (b) ? (a) : (b))
- 
--long int sectorSize;
-+long int sectorSize, shortSectorSize;
- /* BBD Info */
- long int  bbdStart, bbdNumBlocks;
- unsigned char *BBD=NULL;
-@@ -39,6 +39,14 @@
- 
- static char ole_sign[]={0xD0,0xCF,0x11,0xE0,0xA1,0xB1,0x1A,0xE1,0};
- 
-+long int pow2(int n) {
-+	long int acc=1,i;
-+	for(i=0; i<n;i++)
-+		acc*=2;
-+	return acc;
-+}
-+
-+
- /** 
-  * Initializes ole structure
-  * 
-@@ -52,9 +60,10 @@
-  */
- FILE* ole_init(FILE *f, void *buffer, size_t bufSize)  {
- 	unsigned char oleBuf[BBD_BLOCK_SIZE];
-+	unsigned char *tmpBuf;
- 	FILE *newfile;
- 	int ret=0, i;
--	long int sbdMaxLen, sbdCurrent, propMaxLen, propCurrent;
-+	long int sbdMaxLen, sbdCurrent, propMaxLen, propCurrent, mblock;
- 	oleEntry *tEntry;
- 
- 	/* deleting old data (if it was allocated) */
-@@ -83,6 +92,7 @@
- 	}	
- 	fseek(newfile,0,SEEK_END);
- 	fileLength=ftell(newfile);
-+/* 	fprintf(stderr, "fileLength=%ld\n", fileLength);    */
- 	fseek(newfile,0,SEEK_SET);
- 	ret=fread(oleBuf,1,BBD_BLOCK_SIZE,newfile);
- 	if ( ret != BBD_BLOCK_SIZE ) {
-@@ -91,33 +101,61 @@
- 	if (strncmp(oleBuf,ole_sign,8) != 0) {
- 		return NULL;
- 	}
--/* 	if ( (sectorSize = BBD_BLOCK_SIZE * getlong(oleBuf,0x40)) == 0) */
--	sectorSize = BBD_BLOCK_SIZE;
-+ 	sectorSize = pow2(getshort(oleBuf,0x1e));
-+	shortSectorSize=pow2(getshort(oleBuf,0x20));
- 	
- /* Read BBD into memory */
- 	bbdStart=getlong(oleBuf,0x4c);
- 	bbdNumBlocks = getulong(oleBuf,0x2c);
--	if((BBD=malloc(bbdNumBlocks*BBD_BLOCK_SIZE)) == NULL ) {
-+	if((BBD=malloc(bbdNumBlocks*sectorSize)) == NULL ) {
- 		return NULL;
- 	}
-+	
-+	if((tmpBuf=malloc(MSAT_ORIG_SIZE)) == NULL ) {
-+		return NULL;
-+	}
-+	memcpy(tmpBuf,oleBuf+0x4c,MSAT_ORIG_SIZE);
-+	mblock=getulong(oleBuf,0x44);
-+	i=0;
-+/* 	fprintf(stderr, "i=%d mblock=%ld\n", i, mblock); */
-+	while(mblock>=0) {
-+		char *newbuf;
-+		if ((newbuf=realloc(tmpBuf, sectorSize+MSAT_ORIG_SIZE)) != NULL) {
-+			tmpBuf=newbuf;
-+		} else {
-+			perror("BDB realloc error");
-+			free(tmpBuf);
-+			ole_finish();
-+			return NULL;
-+		}
-+		
-+		fseek(newfile, 512+mblock*sectorSize, SEEK_SET);
-+		fread(tmpBuf+MSAT_ORIG_SIZE+sectorSize*i, 1, sectorSize, newfile);
-+		i++;
-+		mblock=getulong(tmpBuf, MSAT_ORIG_SIZE+sectorSize*i-4);
-+/* 		fprintf(stderr, "i=%d mblock=%ld\n", i, mblock); */
-+	};
-+	
- /*   	fprintf(stderr, "bbdNumBlocks=%ld\n", bbdNumBlocks);   */
- 	for(i=0; i< bbdNumBlocks; i++) {
--		long int bbdSector=getlong(oleBuf,0x4c+4*i);
-+		long int bbdSector=getlong(tmpBuf,4*i);
- 		
--		if (bbdSector >= fileLength/sectorSize) {
-+/*  		fprintf(stderr, "bbdSector(%d)=%ld\n",i,bbdSector); */
-+		if (bbdSector >= fileLength/sectorSize || bbdSector < 0) {
- 			fprintf(stderr, "Bad BBD entry!\n");
- 			ole_finish();
- 			return NULL;
- 		}
--/*  		fprintf(stderr, "bbdSector=%ld\n",bbdSector);  */
--		fseek(newfile, (bbdSector+1)*BBD_BLOCK_SIZE, SEEK_SET);
--		if ( fread(BBD+i*BBD_BLOCK_SIZE, 1, BBD_BLOCK_SIZE, newfile) !=
--			 BBD_BLOCK_SIZE ) {
-+		fseek(newfile, 512+bbdSector*sectorSize, SEEK_SET);
-+		if ( fread(BBD+i*sectorSize, 1, sectorSize, newfile) != sectorSize ) {
- 			fprintf(stderr, "Can't read BBD!\n");
-+			free(tmpBuf);
- 			ole_finish();
- 			return NULL;
- 		}
- 	}
-+	free(tmpBuf);
-+	
- /* Read SBD into memory */
- 	sbdLen=0;
- 	sbdMaxLen=10;
-@@ -128,8 +166,8 @@
- 			return NULL;
- 		}
- 		while(1) {
--			fseek(newfile, (sbdCurrent+1)*sectorSize, SEEK_SET);
--			fread(SBD+sbdLen*BBD_BLOCK_SIZE, 1, sectorSize, newfile);
-+			fseek(newfile, 512+sbdCurrent*sectorSize, SEEK_SET);
-+			fread(SBD+sbdLen*sectorSize, 1, sectorSize, newfile);
- 			sbdLen++;
- 			if (sbdLen >= sbdMaxLen) {
- 				char *newSBD;
-@@ -148,7 +186,7 @@
- 				sbdCurrent >= fileLength/sectorSize)
- 				break;
- 		}
--		sbdNumber = (sbdLen*sectorSize)/SBD_BLOCK_SIZE;
-+		sbdNumber = (sbdLen*sectorSize)/shortSectorSize;
- /*   		fprintf(stderr, "sbdLen=%ld sbdNumber=%ld\n",sbdLen, sbdNumber); */
- 	} else {
- 		SBD=NULL;
-@@ -164,7 +202,7 @@
- 		}
- 		while(1) {
- /*  			fprintf(stderr, "propCurrent=%ld\n",propCurrent); */
--			fseek(newfile, (propCurrent+1)*sectorSize, SEEK_SET);
-+			fseek(newfile, 512+propCurrent*sectorSize, SEEK_SET);
- 			fread(properties+propLen*sectorSize,
- 				  1, sectorSize, newfile);
- 			propLen++;
-@@ -279,7 +317,7 @@
- 	if (e->startBlock >= 0 &&
- 		e->length > 0 &&
- 		(e->startBlock <=
--		 fileLength/(e->isBigBlock ? sectorSize : SBD_BLOCK_SIZE))) {
-+		 fileLength/(e->isBigBlock ? sectorSize : shortSectorSize))) {
- 		if((e->blocks=malloc(chainMaxLen*sizeof(long int))) == NULL ) {
- 			return NULL;
- 		}
-@@ -308,18 +346,18 @@
- 			}
- 			if(chainCurrent <= 0 ||
- 			   chainCurrent >= ( e->isBigBlock ?
--								 ((bbdNumBlocks*BBD_BLOCK_SIZE)/4)
--								 : ((sbdNumber*SBD_BLOCK_SIZE)/4) ) ||
-+								 ((bbdNumBlocks*sectorSize)/4)
-+								 : ((sbdNumber*shortSectorSize)/4) ) ||
- 			   (e->numOfBlocks >
--				e->length/(e->isBigBlock ? sectorSize : SBD_BLOCK_SIZE))) {
-+				e->length/(e->isBigBlock ? sectorSize : shortSectorSize))) {
- /*   				fprintf(stderr, "chain End=%ld\n", chainCurrent);   */
- 				break;
- 			}
- 			
- 		}
- 	}
--	if(e->length > (e->isBigBlock ? sectorSize : SBD_BLOCK_SIZE)*e->numOfBlocks)
--		e->length = (e->isBigBlock ? sectorSize : SBD_BLOCK_SIZE)*e->numOfBlocks;
-+	if(e->length > (e->isBigBlock ? sectorSize : shortSectorSize)*e->numOfBlocks)
-+		e->length = (e->isBigBlock ? sectorSize : shortSectorSize)*e->numOfBlocks;
- /*	fprintf(stderr, "READDIR: e->name=%s e->numOfBlocks=%ld length=%ld\n",
- 	e->name, e->numOfBlocks, e->length);*/
- 	
-@@ -354,13 +392,13 @@
- long int calcFileBlockOffset(oleEntry *e, long int blk) {
- 	long int res;
- 	if ( e->isBigBlock ) {
--		res=(e->blocks[blk]+1)*sectorSize;
-+		res=512+e->blocks[blk]*sectorSize;
- 	} else {
--		long int sbdPerSector=sectorSize/SBD_BLOCK_SIZE;
-+		long int sbdPerSector=sectorSize/shortSectorSize;
- 		long int sbdSecNum=e->blocks[blk]/sbdPerSector;
- 		long int sbdSecMod=e->blocks[blk]%sbdPerSector;
--		res=(rootEntry->blocks[sbdSecNum]+1)*sectorSize +
--			sbdSecMod*SBD_BLOCK_SIZE;
-+		res=512+rootEntry->blocks[sbdSecNum]*sectorSize +
-+			sbdSecMod*shortSectorSize;
- 	}
- 	return res;
- }
-@@ -386,7 +424,7 @@
- 	if( e->readed+llen > e->length )
- 		llen= e->length - e->readed;
- 	
--	ssize = (e->isBigBlock ? sectorSize : SBD_BLOCK_SIZE);
-+	ssize = (e->isBigBlock ? sectorSize : shortSectorSize);
- 	blockNumber=e->readed/ssize;
- /* 	fprintf(stderr, "blockNumber=%ld e->numOfBlocks=%ld llen=%ld\n", */
- /* 			blockNumber, e->numOfBlocks, llen); */
-Index: src/ole.h
-===================================================================
-RCS file: /work/oss/catdoc/src/ole.h,v
-retrieving revision 1.3
-diff -u -w -b -B -r1.3 ole.h
---- src/ole.h	14 Nov 2003 14:32:39 -0000	1.3
-+++ src/ole.h	26 Oct 2004 09:53:48 -0000
-@@ -17,6 +17,7 @@
- #define SBD_BLOCK_SIZE      64
- #define PROP_BLOCK_SIZE    128
- #define OLENAMELENGHT       32
-+#define MSAT_ORIG_SIZE     436
- 
- typedef enum {
- 	oleDir=1,
diff -ruN --exclude=CVS /usr/ports/textproc/catdoc/files/patch-src-Makefile.in /home/hsn/hacked/catdoc/files/patch-src-Makefile.in
--- /usr/ports/textproc/catdoc/files/patch-src-Makefile.in	Mon Aug  9 05:40:05 2004
+++ /home/hsn/hacked/catdoc/files/patch-src-Makefile.in	Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
---- src/Makefile.in.orig	Sat Nov 15 18:29:14 2003
-+++ src/Makefile.in	Sun Aug  1 02:15:09 2004
-@@ -87,7 +87,7 @@
- 	$(INSTALL) -m 755 wordview $(installroot)$(bindir)/wordview
- wordview: wordview.tcl
- 	echo "#! $(WISH)" >wordview
--	echo set charset_lib "\"$(LIB_DIR)\"">>wordview
-+	echo set charset_lib "\"$(CHARSETPATH)\"">>wordview
- 	cat wordview.tcl >>wordview
- 	chmod 0755 wordview
- strftime.o: ../compat/strftime.c
diff -ruN --exclude=CVS /usr/ports/textproc/catdoc/pkg-plist /home/hsn/hacked/catdoc/pkg-plist
--- /usr/ports/textproc/catdoc/pkg-plist	Mon Aug  9 05:40:04 2004
+++ /home/hsn/hacked/catdoc/pkg-plist	Sun Jul 17 08:20:37 2005
@@ -1,4 +1,5 @@
 bin/catdoc
+bin/catppt
 bin/wordview
 bin/xls2csv
 share/catdoc/8859-1.txt
@@ -42,6 +43,12 @@
 share/catdoc/cp874.txt
 share/catdoc/koi8-r.txt
 share/catdoc/koi8-u.txt
+share/catdoc/mac-arabic.txt
+share/catdoc/mac-centeuro.txt
+share/catdoc/mac-cyrillic.txt
+share/catdoc/mac-greek.txt
+share/catdoc/mac-hebrew.txt
+share/catdoc/mac-roman.txt
 share/catdoc/tex.replchars
 share/catdoc/tex.specchars
 share/catdoc/us-ascii.txt
--- catdoc-0.94.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1Du2hO-000JiI-I7>