pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/pixieplus Fix building with recent ImageMagic...
details: https://anonhg.NetBSD.org/pkgsrc/rev/d4f861302b3d
branches: trunk
changeset: 476595:d4f861302b3d
user: markd <markd%pkgsrc.org@localhost>
date: Tue Jun 15 13:24:44 2004 +0000
description:
Fix building with recent ImageMagick's.
diffstat:
graphics/pixieplus/Makefile | 3 +-
graphics/pixieplus/patches/patch-aa | 601 ++++++++++++++++++++++++++++++++++++
graphics/pixieplus/patches/patch-ab | 56 +++
graphics/pixieplus/patches/patch-ac | 13 +
4 files changed, 672 insertions(+), 1 deletions(-)
diffs (truncated from 698 to 300 lines):
diff -r a49bbc92afe3 -r d4f861302b3d graphics/pixieplus/Makefile
--- a/graphics/pixieplus/Makefile Tue Jun 15 13:23:10 2004 +0000
+++ b/graphics/pixieplus/Makefile Tue Jun 15 13:24:44 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2004/05/07 01:14:48 xtraeme Exp $
+# $NetBSD: Makefile,v 1.10 2004/06/15 13:24:44 markd Exp $
#
DISTNAME= pixieplus-0.5.4
@@ -20,5 +20,6 @@
.include "../../graphics/kdegraphics3/buildlink3.mk"
.include "../../graphics/ImageMagick/buildlink3.mk"
.include "../../graphics/libungif/buildlink3.mk"
+.include "../../meta-pkgs/kde3/kde3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r a49bbc92afe3 -r d4f861302b3d graphics/pixieplus/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/pixieplus/patches/patch-aa Tue Jun 15 13:24:44 2004 +0000
@@ -0,0 +1,601 @@
+$NetBSD: patch-aa,v 1.1 2004/06/15 13:24:44 markd Exp $
+
+--- app/compressedgif.cpp.orig 2003-02-09 17:56:50.000000000 +1300
++++ app/compressedgif.cpp
+@@ -40,31 +40,31 @@ unsigned int EncodeCompressedGIFImage(co
+ Image *image,
+ const unsigned int data_size)
+ {
+-#define MaxCode(number_bits) ((1 << (number_bits))-1)
++#define MaxCode(number_bits) ((1UL << (number_bits))-1)
+ #define MaxHashTable 5003
+-#define MaxGIFBits 12
+-#define MaxGIFTable (1 << MaxGIFBits)
++#define MaxGIFBits 12UL
++#define MaxGIFTable (1UL << MaxGIFBits)
+ #define GIFOutputCode(code) \
+ { \
+ /* \
+ Emit a code. \
+ */ \
+ if (bits > 0) \
+- datum|=((long) code << bits); \
++ datum|=(code) << bits; \
+ else \
+- datum=(long) code; \
++ datum=code; \
+ bits+=number_bits; \
+ while (bits >= 8) \
+ { \
+ /* \
+ Add a character to current packet. \
+ */ \
+- packet[byte_count++]=(unsigned char) (datum & 0xff); \
+- if (byte_count >= 254) \
++ packet[length++]=(unsigned char) (datum & 0xff); \
++ if (length >= 254) \
+ { \
+- (void) WriteBlobByte(image,byte_count); \
+- (void) WriteBlob(image,byte_count,(char *) packet); \
+- byte_count=0; \
++ (void) WriteBlobByte(image,(unsigned char) length); \
++ (void) WriteBlob(image,length,packet); \
++ length=0; \
+ } \
+ datum>>=8; \
+ bits-=8; \
+@@ -79,18 +79,14 @@ unsigned int EncodeCompressedGIFImage(co
+ } \
+ }
+
+- int
+- displacement,
+- next_pixel,
+- bits,
+- byte_count,
+- k,
+- number_bits,
+- offset,
+- pass;
++
++ IndexPacket
++ index;
+
+ long
+- datum,
++ displacement,
++ offset,
++ k,
+ y;
+
+ register const PixelPacket
+@@ -103,28 +99,40 @@ unsigned int EncodeCompressedGIFImage(co
+ i,
+ x;
+
++ size_t
++ length;
++
+ short
+- clear_code,
+- end_of_information_code,
+- free_code,
+ *hash_code,
+ *hash_prefix,
+- index,
+- max_code,
+ waiting_code;
+
+ unsigned char
+ *packet,
+ *hash_suffix;
+
++ unsigned int
++ status;
++
++ unsigned long
++ bits,
++ clear_code,
++ datum,
++ end_of_information_code,
++ free_code,
++ max_code,
++ next_pixel,
++ number_bits,
++ pass;
++
+ /*
+ Allocate encoder tables.
+ */
+ assert(image != (Image *) NULL);
+- packet=(unsigned char *) AcquireMemory(256);
+- hash_code=(short *) AcquireMemory(MaxHashTable*sizeof(short));
+- hash_prefix=(short *) AcquireMemory(MaxHashTable*sizeof(short));
+- hash_suffix=(unsigned char *) AcquireMemory(MaxHashTable);
++ packet=(unsigned char *) AcquireMagickMemory(256);
++ hash_code=(short *) AcquireMagickMemory(MaxHashTable*sizeof(short));
++ hash_prefix=(short *) AcquireMagickMemory(MaxHashTable*sizeof(short));
++ hash_suffix=(unsigned char *) AcquireMagickMemory(MaxHashTable);
+ if ((packet == (unsigned char *) NULL) || (hash_code == (short *) NULL) ||
+ (hash_prefix == (short *) NULL) ||
+ (hash_suffix == (unsigned char *) NULL))
+@@ -137,7 +145,7 @@ unsigned int EncodeCompressedGIFImage(co
+ clear_code=((short) 1 << (data_size-1));
+ end_of_information_code=clear_code+1;
+ free_code=clear_code+2;
+- byte_count=0;
++ length=0;
+ datum=0;
+ bits=0;
+ for (i=0; i < MaxHashTable; i++)
+@@ -156,7 +164,7 @@ unsigned int EncodeCompressedGIFImage(co
+ break;
+ indexes=GetIndexes(image);
+ if (y == 0)
+- waiting_code=(*indexes);
++ waiting_code=(short) (*indexes);
+ for (x=(y == 0) ? 1 : 0; x < (long) image->columns; x++)
+ {
+ /*
+@@ -164,14 +172,15 @@ unsigned int EncodeCompressedGIFImage(co
+ */
+ index=indexes[x] & 0xff;
+ p++;
+- k=(int) ((int) index << (MaxGIFBits-8))+waiting_code;
++ k=(int) (index << (MaxGIFBits-8))+waiting_code;
+ if (k >= MaxHashTable)
+ k-=MaxHashTable;
+ next_pixel=false;
+ displacement=1;
+ if ((image_info->compression != NoCompression) && (hash_code[k] > 0))
+ {
+- if ((hash_prefix[k] == waiting_code) && (hash_suffix[k] == index))
++ if ((hash_prefix[k] == waiting_code) &&
++ (hash_suffix[k] == (unsigned char) index))
+ {
+ waiting_code=hash_code[k];
+ continue;
+@@ -185,7 +194,8 @@ unsigned int EncodeCompressedGIFImage(co
+ k+=MaxHashTable;
+ if (hash_code[k] == 0)
+ break;
+- if ((hash_prefix[k] == waiting_code) && (hash_suffix[k] == index))
++ if ((hash_prefix[k] == waiting_code) &&
++ (hash_suffix[k] == (unsigned char) index))
+ {
+ waiting_code=hash_code[k];
+ next_pixel=true;
+@@ -195,10 +205,10 @@ unsigned int EncodeCompressedGIFImage(co
+ if (next_pixel == true)
+ continue;
+ }
+- GIFOutputCode(waiting_code);
++ GIFOutputCode((unsigned long) waiting_code);
+ if (free_code < MaxGIFTable)
+ {
+- hash_code[k]=free_code++;
++ hash_code[k]=(short) free_code++;
+ hash_prefix[k]=waiting_code;
+ hash_suffix[k]=(unsigned char) index;
+ }
+@@ -217,7 +227,7 @@ unsigned int EncodeCompressedGIFImage(co
+ number_bits=data_size;
+ max_code=MaxCode(number_bits);
+ }
+- waiting_code=index;
++ waiting_code=(short) index;
+ }
+ if (image_info->interlace == NoInterlace)
+ offset++;
+@@ -263,42 +273,45 @@ unsigned int EncodeCompressedGIFImage(co
+ }
+ if (image->previous == (Image *) NULL)
+ if (QuantumTick(y,image->rows))
+- if (!MagickMonitor(SaveImageTag,y,image->rows,&image->exception))
+- break;
++ {
++ status=MagickMonitor(SaveImageTag,y,image->rows,&image->exception);
++ if (status == false)
++ break;
++ }
+ }
+ /*
+ Flush out the buffered code.
+ */
+- GIFOutputCode(waiting_code);
++ GIFOutputCode((unsigned long) waiting_code);
+ GIFOutputCode(end_of_information_code);
+ if (bits > 0)
+ {
+ /*
+ Add a character to current packet.
+ */
+- packet[byte_count++]=(unsigned char) (datum & 0xff);
+- if (byte_count >= 254)
++ packet[length++]=(unsigned char) (datum & 0xff);
++ if (length >= 254)
+ {
+- (void) WriteBlobByte(image,byte_count);
+- (void) WriteBlob(image,byte_count,(char *) packet);
+- byte_count=0;
++ (void) WriteBlobByte(image,(unsigned char) length);
++ (void) WriteBlob(image,length,packet);
++ length=0;
+ }
+ }
+ /*
+ Flush accumulated data.
+ */
+- if (byte_count > 0)
++ if (length > 0)
+ {
+- (void) WriteBlobByte(image,byte_count);
+- (void) WriteBlob(image,byte_count,(char *) packet);
++ (void) WriteBlobByte(image,(unsigned char) length);
++ (void) WriteBlob(image,length,packet);
+ }
+ /*
+ Free encoder memory.
+ */
+- LiberateMemory((void **) &hash_suffix);
+- LiberateMemory((void **) &hash_prefix);
+- LiberateMemory((void **) &hash_code);
+- LiberateMemory((void **) &packet);
++ hash_suffix=(unsigned char *) RelinquishMagickMemory(hash_suffix);
++ hash_prefix=(short *) RelinquishMagickMemory(hash_prefix);
++ hash_code=(short *) RelinquishMagickMemory(hash_code);
++ packet=(unsigned char *) RelinquishMagickMemory(packet);
+ return(true);
+ }
+
+@@ -308,10 +321,15 @@ unsigned int WriteCompressedGIFImage(con
+ *next_image;
+
+ int
+- y;
+-
++ c;
++
+ long
+- opacity;
++ j,
++ opacity,
++ y;
++
++ MagickOffsetType
++ scene;
+
+ QuantizeInfo
+ quantize_info;
+@@ -335,11 +353,9 @@ unsigned int WriteCompressedGIFImage(con
+ *q;
+
+ size_t
+- j;
++ length;
+
+ unsigned char
+- bits_per_pixel,
+- c,
+ *colormap,
Home |
Main Index |
Thread Index |
Old Index