summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authormarkd <markd@pkgsrc.org>2004-06-15 13:24:44 +0000
committermarkd <markd@pkgsrc.org>2004-06-15 13:24:44 +0000
commitd1eecab0d5ac8b05c43b8a1fab768320942c7a08 (patch)
tree5d6a0f32b955da274d19da5d8415520a02d5f529 /graphics
parent96ad7da25b7213a90c71a9d7f8f6727834b56745 (diff)
downloadpkgsrc-d1eecab0d5ac8b05c43b8a1fab768320942c7a08.tar.gz
Fix building with recent ImageMagick's.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pixieplus/Makefile3
-rw-r--r--graphics/pixieplus/patches/patch-aa601
-rw-r--r--graphics/pixieplus/patches/patch-ab56
-rw-r--r--graphics/pixieplus/patches/patch-ac13
4 files changed, 672 insertions, 1 deletions
diff --git a/graphics/pixieplus/Makefile b/graphics/pixieplus/Makefile
index b255a8dbf26..27eb416b0f5 100644
--- a/graphics/pixieplus/Makefile
+++ b/graphics/pixieplus/Makefile
@@ -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 @@ GNU_CONFIGURE= YES
.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 --git a/graphics/pixieplus/patches/patch-aa b/graphics/pixieplus/patches/patch-aa
new file mode 100644
index 00000000000..d1afac51e9b
--- /dev/null
+++ b/graphics/pixieplus/patches/patch-aa
@@ -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,
+ *global_colormap;
+
+@@ -348,7 +364,7 @@ unsigned int WriteCompressedGIFImage(con
+ status;
+
+ unsigned long
+- scene;
++ bits_per_pixel;
+
+ /*
+ Open output image file.
+@@ -357,9 +373,11 @@ unsigned int WriteCompressedGIFImage(con
+ assert(image_info->signature == MagickSignature);
+ assert(image != (Image *) NULL);
+ assert(image->signature == MagickSignature);
++ if (image->debug != false)
++ (void) LogMagickEvent(TraceEvent,GetMagickModule(),image->filename);
+ status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
+ if (status == false)
+- ThrowWriterException(FileOpenError,"Unable to open file",image);
++ return(status);
+ /*
+ Determine image bounding box.
+ */
+@@ -380,37 +398,36 @@ unsigned int WriteCompressedGIFImage(con
+ /*
+ Allocate colormap.
+ */
+- global_colormap=(unsigned char *) AcquireMemory(768);
+- colormap=(unsigned char *) AcquireMemory(768);
++ global_colormap=(unsigned char *) AcquireMagickMemory(768);
++ colormap=(unsigned char *) AcquireMagickMemory(768);
+ if ((global_colormap == (unsigned char *) NULL) ||
+ (colormap == (unsigned char *) NULL))
+- ThrowWriterException(ResourceLimitError,"Memory allocation failed",image);
++ ThrowWriterException(ResourceLimitError,"Memory allocation failed");
+ for (i=0; i < 768; i++)
+- colormap[i]=0;
++ colormap[i]=(unsigned char) 0;
+ /*
+ Write GIF header.
+ */
+ if ((GetImageAttribute(image,"comment") == (ImageAttribute *) NULL) &&
+- !image_info->adjoin && !image->matte)
+- (void) WriteBlob(image,6,"GIF87a");
++ (image_info->adjoin == false) && (image->matte == false))
++ (void) WriteBlob(image,6,(unsigned char *) "GIF87a");
+ else
+ if (LocaleCompare(image_info->magick,"GIF87") == 0)
+- (void) WriteBlob(image,6,"GIF87a");
++ (void) WriteBlob(image,6,(unsigned char *) "GIF87a");
+ else
+- (void) WriteBlob(image,6,"GIF89a");
++ (void) WriteBlob(image,6,(unsigned char *) "GIF89a");
+ page.x=image->page.x;
+ page.y=image->page.y;
+ if ((image->page.width != 0) && (image->page.height != 0))
+ page=image->page;
+- (void) WriteBlobLSBShort(image,page.width);
+- (void) WriteBlobLSBShort(image,page.height);
++ (void) WriteBlobLSBShort(image,(unsigned short) page.width);
++ (void) WriteBlobLSBShort(image,(unsigned short) page.height);
+ /*
+ Write images to file.
+ */
+ interlace=image_info->interlace;
+- if (image_info->adjoin && (image->next != (Image *) NULL))
++ if ((image_info->adjoin != false) && (image->next != (Image *) NULL))
+ interlace=NoInterlace;
+- opacity=(-1);
+ scene=0;
+ do
+ {
+@@ -422,22 +439,24 @@ unsigned int WriteCompressedGIFImage(con
+ */
+ GetQuantizeInfo(&quantize_info);
+ quantize_info.dither=image_info->dither;
+- quantize_info.number_colors=image->matte ? 255 : 256;
++ quantize_info.number_colors=(unsigned long)
++ (image->matte != false ? 255 : 256);
+ (void) QuantizeImage(&quantize_info,image);
+- if (image->matte)
++ if (image->matte != false)
+ {
+ /*
+ Set transparent pixel.
+ */
+ opacity=(long) image->colors++;
+- ReacquireMemory((void **) &image->colormap,
+- image->colors*sizeof(PixelPacket));
++ image->colormap=(PixelPacket *) ResizeMagickMemory(image->colormap,
++ (size_t) image->colors*sizeof(PixelPacket));
+ if (image->colormap == (PixelPacket *) NULL)
+ {
+- LiberateMemory((void **) &global_colormap);
+- LiberateMemory((void **) &colormap);
++ global_colormap=(unsigned char *)
++ RelinquishMagickMemory(global_colormap);
++ colormap=(unsigned char *) RelinquishMagickMemory(colormap);
+ ThrowWriterException(ResourceLimitError,
+- "Memory allocation failed",image)
++ "Memory allocation failed")
+ }
+ image->colormap[opacity]=image->background_color;
+ for (y=0; y < (long) image->rows; y++)
+@@ -449,17 +468,17 @@ unsigned int WriteCompressedGIFImage(con
+ indexes=GetIndexes(image);
+ for (x=0; x < (long) image->columns; x++)
+ {
+- if (p->opacity == TransparentOpacity)
++ if ((double) p->opacity > image->fuzz)
+ indexes[x]=(IndexPacket) opacity;
+ p++;
+ }
+- if (!SyncImagePixels(image))
++ if (SyncImagePixels(image) == false)
+ break;
+ }
+ }
+ }
+ else
+- if (image->matte)
++ if (image->matte != false)
+ {
+ /*
+ Identify transparent pixel index.
+@@ -472,7 +491,7 @@ unsigned int WriteCompressedGIFImage(con
+ indexes=GetIndexes(image);
+ for (x=0; x < (long) image->columns; x++)
+ {
+- if (p->opacity == TransparentOpacity)
++ if ((double) p->opacity > image->fuzz)
+ {
+ opacity=(long) indexes[x];
+ break;
+@@ -495,13 +514,13 @@ unsigned int WriteCompressedGIFImage(con
+ *q++=ScaleQuantumToChar(image->colormap[i].green);
+ *q++=ScaleQuantumToChar(image->colormap[i].blue);
+ }
+- for ( ; i < (1L << bits_per_pixel); i++)
++ for ( ; i < (long) (1UL << bits_per_pixel); i++)
+ {
+- *q++=(Quantum) 0x0;
+- *q++=(Quantum) 0x0;
+- *q++=(Quantum) 0x0;
++ *q++=(unsigned char) 0x0;
++ *q++=(unsigned char) 0x0;
++ *q++=(unsigned char) 0x0;
+ }
+- if ((image->previous == (Image *) NULL) || !image_info->adjoin)
++ if ((image->previous == (Image *) NULL) || (image_info->adjoin == false))
+ {
+ /*
+ Write global colormap.
+@@ -509,13 +528,14 @@ unsigned int WriteCompressedGIFImage(con
+ c=0x80;
+ c|=(8-1) << 4; /* color resolution */
+ c|=(bits_per_pixel-1); /* size of global colormap */
+- (void) WriteBlobByte(image,c);
+- for (j=0; j < Max(image->colors-1,1); j++)
++ (void) WriteBlobByte(image,(unsigned char) c);
++ for (j=0; j < (long) Max(image->colors-1,1); j++)
+ if (FuzzyColorMatch(&image->background_color,image->colormap+j,0))
+ break;
+- (void) WriteBlobByte(image,(long) j); /* background color */
+- (void) WriteBlobByte(image,0x0); /* reserved */
+- (void) WriteBlob(image,3*(1 << bits_per_pixel),(char *) colormap);
++ (void) WriteBlobByte(image,(unsigned char) j); /* background color */
++ (void) WriteBlobByte(image,(unsigned char) 0x0); /* reserved */
++ length=(size_t) (3*(1 << bits_per_pixel));
++ (void) WriteBlob(image,length,colormap);
+ for (j=0; j < 768; j++)
+ global_colormap[j]=colormap[j];
+ }
+@@ -524,16 +544,17 @@ unsigned int WriteCompressedGIFImage(con
+ /*
+ Write Graphics Control extension.
+ */
+- (void) WriteBlobByte(image,0x21);
+- (void) WriteBlobByte(image,0xf9);
+- (void) WriteBlobByte(image,0x04);
+- c=(unsigned char) ((int) image->dispose << 2);
++ (void) WriteBlobByte(image,(unsigned char) 0x21);
++ (void) WriteBlobByte(image,(unsigned char) 0xf9);
++ (void) WriteBlobByte(image,(unsigned char) 0x04);
++ c=((image->dispose) << 2);
+ if (opacity >= 0)
+ c|=0x01;
+- (void) WriteBlobByte(image,c);
+- (void) WriteBlobLSBShort(image,image->delay);
+- (void) WriteBlobByte(image,opacity >= 0 ? opacity : 0);
+- (void) WriteBlobByte(image,0x00);
++ (void) WriteBlobByte(image,(unsigned char) c);
++ (void) WriteBlobLSBShort(image,(unsigned short) image->delay);
++ (void) WriteBlobByte(image,(unsigned char)
++ (opacity >= 0 ? opacity : 0));
++ (void) WriteBlobByte(image,(unsigned char) 0x00);
+ if (GetImageAttribute(image,"comment") != (ImageAttribute *) NULL)
+ {
+ const ImageAttribute
+@@ -548,18 +569,18 @@ unsigned int WriteCompressedGIFImage(con
+ /*
+ Write Comment extension.
+ */
+- (void) WriteBlobByte(image,0x21);
+- (void) WriteBlobByte(image,0xfe);
++ (void) WriteBlobByte(image,(unsigned char) 0x21);
++ (void) WriteBlobByte(image,(unsigned char) 0xfe);
+ attribute=GetImageAttribute(image,"comment");
+ p=attribute->value;
+ while (strlen(p) != 0)
+ {
+ count=Min(strlen(p),255);
+- (void) WriteBlobByte(image,(long) count);
++ (void) WriteBlobByte(image,(unsigned char) count);
+ for (i=0; i < (long) count; i++)
+- (void) WriteBlobByte(image,*p++);
++ (void) WriteBlobByte(image,(unsigned char) *p++);
+ }
+- (void) WriteBlobByte(image,0x0);
++ (void) WriteBlobByte(image,(unsigned char) 0x00);
+ }
+ if ((image->previous == (Image *) NULL) &&
+ (image->next != (Image *) NULL) && (image->iterations != 1))
+@@ -567,14 +588,14 @@ unsigned int WriteCompressedGIFImage(con
+ /*
+ Write Netscape Loop extension.
+ */
+- (void) WriteBlobByte(image,0x21);
+- (void) WriteBlobByte(image,0xff);
+- (void) WriteBlobByte(image,0x0b);
+- (void) WriteBlob(image,11,"NETSCAPE2.0");
+- (void) WriteBlobByte(image,0x03);
+- (void) WriteBlobByte(image,0x01);
+- (void) WriteBlobLSBShort(image,image->iterations);
+- (void) WriteBlobByte(image,0x00);
++ (void) WriteBlobByte(image,(unsigned char) 0x21);
++ (void) WriteBlobByte(image,(unsigned char) 0xff);
++ (void) WriteBlobByte(image,(unsigned char) 0x0b);
++ (void) WriteBlob(image,11,(unsigned char *) "NETSCAPE2.0");
++ (void) WriteBlobByte(image,(unsigned char) 0x03);
++ (void) WriteBlobByte(image,(unsigned char) 0x01);
++ (void) WriteBlobLSBShort(image,(unsigned short) image->iterations);
++ (void) WriteBlobByte(image,(unsigned char) 0x00);
+ }
+ }
+ (void) WriteBlobByte(image,','); /* image separator */
+@@ -585,51 +606,50 @@ unsigned int WriteCompressedGIFImage(con
+ page.y=image->page.y;
+ if ((image->page.width != 0) && (image->page.height != 0))
+ page=image->page;
+- (void) WriteBlobLSBShort(image,page.x);
+- (void) WriteBlobLSBShort(image,page.y);
+- (void) WriteBlobLSBShort(image,image->columns);
+- (void) WriteBlobLSBShort(image,image->rows);
++ (void) WriteBlobLSBShort(image,(unsigned short) (page.x < 0 ? 0 : page.x));
++ (void) WriteBlobLSBShort(image,(unsigned short) (page.y < 0 ? 0 : page.y));
++ (void) WriteBlobLSBShort(image,(unsigned short) image->columns);
++ (void) WriteBlobLSBShort(image,(unsigned short) image->rows);
+ c=0x00;
+ if (interlace != NoInterlace)
+ c|=0x40; /* pixel data is interlaced */
+- for (j=0; j < (3*image->colors); j++)
++ for (j=0; j < (long) (3*image->colors); j++)
+ if (colormap[j] != global_colormap[j])
+ break;
+- if (j == (3*image->colors))
+- (void) WriteBlobByte(image,c);
++ if (j == (long) (3*image->colors))
++ (void) WriteBlobByte(image,(unsigned char) c);
+ else
+ {
+ c|=0x80;
+ c|=(bits_per_pixel-1); /* size of local colormap */
+- (void) WriteBlobByte(image,c);
+- (void) WriteBlob(image,3*(1 << bits_per_pixel),(char *) colormap);
++ (void) WriteBlobByte(image,(unsigned char) c);
++ length=(size_t) (3*(1UL << bits_per_pixel));
++ (void) WriteBlob(image,length,colormap);
+ }
+ /*
+ Write the image data.
+ */
+- c=Max(bits_per_pixel,2);
+- (void) WriteBlobByte(image,c);
++ c=(int) Max(bits_per_pixel,2);
++ (void) WriteBlobByte(image,(unsigned char) c);
+ status=EncodeCompressedGIFImage(image_info,image,Max(bits_per_pixel,2)+1);
+ if (status == false)
+ {
+- LiberateMemory((void **) &global_colormap);
+- LiberateMemory((void **) &colormap);
+- ThrowWriterException(ResourceLimitError,"Memory allocation failed",
+- image)
++ global_colormap=(unsigned char *)
++ RelinquishMagickMemory(global_colormap);
++ colormap=(unsigned char *) RelinquishMagickMemory(colormap);
++ ThrowWriterException(ResourceLimitError,"Memory allocation failed");
+ }
+- (void) WriteBlobByte(image,0x0);
++ (void) WriteBlobByte(image,(unsigned char) 0x00);
+ if (image->next == (Image *) NULL)
+ break;
+ image=GetNextImage(image);
+- if (!MagickMonitor(SaveImagesTag,scene++,GetImageListSize(image),&image->exception))
++ status=MagickMonitor(SaveImagesTag,scene++,GetImageListSize(image),&image->exception);
++ if (status == false)
+ break;
+- } while (image_info->adjoin);
++ } while (image_info->adjoin != false);
+ (void) WriteBlobByte(image,';'); /* terminator */
+- LiberateMemory((void **) &global_colormap);
+- LiberateMemory((void **) &colormap);
+- if (image_info->adjoin)
+- while (image->previous != (Image *) NULL)
+- image=image->previous;
++ global_colormap=(unsigned char *) RelinquishMagickMemory(global_colormap);
++ colormap=(unsigned char *) RelinquishMagickMemory(colormap);
+ CloseBlob(image);
+ return(true);
+ }
diff --git a/graphics/pixieplus/patches/patch-ab b/graphics/pixieplus/patches/patch-ab
new file mode 100644
index 00000000000..685e3aeaeeb
--- /dev/null
+++ b/graphics/pixieplus/patches/patch-ab
@@ -0,0 +1,56 @@
+$NetBSD: patch-ab,v 1.1 2004/06/15 13:24:44 markd Exp $
+
+--- configure.orig 2004-06-16 00:41:14.000000000 +1200
++++ configure
+@@ -21614,51 +21614,6 @@ echo "$as_me: error: Cannot find ImageMa
+ { (exit 1); exit 1; }; }
+ fi
+
+-echo "$as_me:21617: checking for magick/resource.h" >&5
+-echo $ECHO_N "checking for magick/resource.h... $ECHO_C" >&6
+-if test "${ac_cv_header_magick_resource_h+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+- cat >conftest.$ac_ext <<_ACEOF
+-#line 21623 "configure"
+-#include "confdefs.h"
+-#include <magick/resource.h>
+-_ACEOF
+-if { (eval echo "$as_me:21627: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+- ac_status=$?
+- egrep -v '^ *\+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:21633: \$? = $ac_status" >&5
+- (exit $ac_status); } >/dev/null; then
+- if test -s conftest.err; then
+- ac_cpp_err=$ac_c_preproc_warn_flag
+- else
+- ac_cpp_err=
+- fi
+-else
+- ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
+- ac_cv_header_magick_resource_h=yes
+-else
+- echo "$as_me: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- ac_cv_header_magick_resource_h=no
+-fi
+-rm -f conftest.err conftest.$ac_ext
+-fi
+-echo "$as_me:21652: result: $ac_cv_header_magick_resource_h" >&5
+-echo "${ECHO_T}$ac_cv_header_magick_resource_h" >&6
+-if test $ac_cv_header_magick_resource_h = yes; then
+- :
+-else
+- { { echo "$as_me:21657: error: Old ImageMagick headers found. You must have ImageMagick 5.5.0 or above. Read INSTALL.README!" >&5
+-echo "$as_me: error: Old ImageMagick headers found. You must have ImageMagick 5.5.0 or above. Read INSTALL.README!" >&2;}
+- { (exit 1); exit 1; }; }
+-fi
+-
+ MAGICKPREFIX=`Magick-config --prefix`
+ echo ImageMagick prefix $MAGICKPREFIX
+
diff --git a/graphics/pixieplus/patches/patch-ac b/graphics/pixieplus/patches/patch-ac
new file mode 100644
index 00000000000..eaa36fc2369
--- /dev/null
+++ b/graphics/pixieplus/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1 2004/06/15 13:24:44 markd Exp $
+
+--- app/ifapp.cpp.orig 2003-02-09 17:56:50.000000000 +1300
++++ app/ifapp.cpp
+@@ -34,7 +34,7 @@ int xioErrorHandler(Display *dpy);
+ // ImageMagick message and progress stubs
+ extern "C"{
+ unsigned int magickMonitor(const char *msg, const off_t value,
+- const size_t span, ExceptionInfo *)
++ const MagickSizeType span, ExceptionInfo *)
+ {
+ if(!appPtr)
+ return(true);