aboutsummaryrefslogtreecommitdiff
path: root/graphics/libimg
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2011-09-18 16:42:14 +0000
committerChris Rees <crees@FreeBSD.org>2011-09-18 16:42:14 +0000
commitafd8c6d473bbda0ec4d0a117ae6ae026f03e3b31 (patch)
treeab9def7b1db81b1d0619553d7c6555655a74c786 /graphics/libimg
parent06f3130eee320cb576169f5b108f8e99d8666a6a (diff)
downloadports-afd8c6d473bbda0ec4d0a117ae6ae026f03e3b31.tar.gz
ports-afd8c6d473bbda0ec4d0a117ae6ae026f03e3b31.zip
Notes
Diffstat (limited to 'graphics/libimg')
-rw-r--r--graphics/libimg/Makefile40
-rw-r--r--graphics/libimg/files/Makefile.bsd5
-rw-r--r--graphics/libimg/files/patch-jpeg29
-rw-r--r--graphics/libimg/files/patch-warnings213
-rw-r--r--graphics/libimg/files/tk84-Tk_PhotoPutBlock12
-rw-r--r--graphics/libimg/files/tk84-warnings18
-rw-r--r--graphics/libimg/files/tk85-Tk_PhotoPutBlock237
7 files changed, 68 insertions, 486 deletions
diff --git a/graphics/libimg/Makefile b/graphics/libimg/Makefile
index aa7561db7764..2aaddf2ba5db 100644
--- a/graphics/libimg/Makefile
+++ b/graphics/libimg/Makefile
@@ -12,13 +12,30 @@ CATEGORIES?= graphics tk
MASTER_SITES= SF/tkimg/tkimg/${PORTVERSION:R}
DISTNAME= img${PORTVERSION}
-MAINTAINER= crees@FreeBSD.org
+MAINTAINER= ports@FreeBSD.org
COMMENT= A library of image format handlers for Tk4.1 and later
LIB_DEPENDS= png:${PORTSDIR}/graphics/png \
jpeg:${PORTSDIR}/graphics/jpeg \
tiff:${PORTSDIR}/graphics/tiff
+.if defined(USE_TK) && ${USE_TK} == 83
+PKGNAMESUFFIX= -tk83
+USE_TK= 83
+USE_TK_BUILD= 83
+MAKEFILE= ${FILESDIR}/Makefile.bsd
+MAKE_ENV+= TCL_VER=8.3
+PATCHDIR=
+EXTRA_PATCHES= ${FILESDIR}/pre-tk84-warnings
+CONFLICTS= libimg-1.* libimg-tkstep-1.*
+.else
+USE_TK= 84
+USE_TK_BUILD= 84
+MAKEFILE= ${FILESDIR}/Makefile.bsd
+EXTRA_PATCHES= ${FILESDIR}/tk84-Tk_PhotoPutBlock ${FILESDIR}/tk84-warnings
+CONFLICTS= libimg-tk83-1.* libimg-tkstep-1.*
+.endif
+
DIR= lib/Img1.2
SHLIB_NAME= libimg.so.1
@@ -28,10 +45,6 @@ PLIST_SUB+= DIR="${DIR}" SHLIB_NAME="${SHLIB_NAME}" \
SHLIB_LINK="${SHLIB_LINK}"
WRKSRC= ${WRKDIR}/img${PORTVERSION}
-MAKEFILE= ${FILESDIR}/Makefile.bsd
-USE_TK= 83+
-USE_TK_BUILD= ${USE_TK}
-MAKE_ENV+= TCL_VER=${TCL_VER}
# We don't need the bundled libraries:
EXTRACT_AFTER_ARGS= | ${TAR} -xf - --exclude '*/libz/*' \
@@ -51,19 +64,4 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
.endif
-.include <bsd.port.pre.mk>
-
-.if ${TCL_VER} == 8.3
-PKGNAMESUFFIX= -tk83
-EXTRA_PATCHES= ${FILESDIR}/pre-tk84-warnings
-CONFLICTS= libimg-1.* libimg-tkstep-1.*
-.elif ${TCL_VER} == 8.4
-PKGNAMESUFFIX= -tk84
-EXTRA_PATCHES= ${FILESDIR}/tk84-Tk_PhotoPutBlock ${FILESDIR}/tk84-warnings
-CONFLICTS= libimg-tk83-1.* libimg-tkstep-1.*
-.else
-EXTRA_PATCHES= ${FILESDIR}/tk85-Tk_PhotoPutBlock ${FILESDIR}/tk84-warnings
-CONFLICTS= libimg-tk83-1.* libimg-tk84-1.* libimg-tkstep-1.*
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/graphics/libimg/files/Makefile.bsd b/graphics/libimg/files/Makefile.bsd
index a32af87dee1d..310b534be74c 100644
--- a/graphics/libimg/files/Makefile.bsd
+++ b/graphics/libimg/files/Makefile.bsd
@@ -2,9 +2,7 @@ SHLIB_NAME?= libimg.so.1
PORTVERSION?= 1.2.4
LOCALBASE?= /usr/local
-.if !defined(TCL_VER)
-TCL_VER= 8.4
-.endif
+TCL_VER?= 8.4
.if exists(${LOCALBASE}/lib/tk${TCL_VER}/tkConfig.sh)
# If for some reason the file does not exist -- make the best guess. In
@@ -30,7 +28,6 @@ CFLAGS+= -I${LOCALBASE}/include/tk${TCL_VER}
CFLAGS+= -DNDEBUG -Wall -I. -DUSE_TCL_STUBS -DUSE_TK_STUBS
CFLAGS+= -DVERSION=\"${PORTVERSION}\" -I${LOCALBASE}/include
CFLAGS+= -DHAVE_JPEGLIB_H -DHAVE_TIFF_H -DHAVE_DLFCN_H -DHAVE_IMG_H
-CFLAGS+= -DHAVE_INTTYPES_H -DHAVE_STDINT_H -DHAVE_UNISTD_H
all: pkgIndex.tcl
diff --git a/graphics/libimg/files/patch-jpeg b/graphics/libimg/files/patch-jpeg
index ec10e9dd4948..d4cdcfe42f93 100644
--- a/graphics/libimg/files/patch-jpeg
+++ b/graphics/libimg/files/patch-jpeg
@@ -167,7 +167,8 @@
return TCL_ERROR;
}
- /* Now we can initialize libjpeg. */
+- /* Now we can initialize libjpeg. */
++ /* Now we can initialize libjpeg_ */
((char *) cinfo)[sizeof(struct jpeg_compress_struct)] = 53;
- jpeg.CreateCompress(cinfo, JPEG_LIB_VERSION,
+ jpeg_CreateCompress(cinfo, JPEG_LIB_VERSION,
@@ -382,6 +383,13 @@
-}
+@@ -715,5 +409,5 @@
+ }
+ /* look for SOF0, SOF1, or SOF2, which are the only JPEG variants
+- * currently accepted by libjpeg.
++ * currently accepted by libjpeg_
+ */
+ if (buf[0] == (char) 0xc0 || buf[0] == (char) 0xc1
@@ -794,5 +488,5 @@
/* Initialize JPEG error handler */
/* We set up the normal JPEG error routines, then override error_exit. */
@@ -397,8 +405,9 @@
return TCL_ERROR;
}
- /* Now we can initialize libjpeg. */
+- /* Now we can initialize libjpeg. */
- jpeg.CreateDecompress(&cinfo, JPEG_LIB_VERSION,
++ /* Now we can initialize libjpeg_ */
+ jpeg_CreateDecompress(&cinfo, JPEG_LIB_VERSION,
(size_t) sizeof(struct jpeg_decompress_struct));
jpeg_channel_src(&cinfo, chan);
@@ -424,8 +433,9 @@
return TCL_ERROR;
}
- /* Now we can initialize libjpeg. */
+- /* Now we can initialize libjpeg. */
- jpeg.CreateDecompress(&cinfo, JPEG_LIB_VERSION,
++ /* Now we can initialize libjpeg_ */
+ jpeg_CreateDecompress(&cinfo, JPEG_LIB_VERSION,
(size_t) sizeof(struct jpeg_decompress_struct));
jpeg_obj_src(&cinfo, data);
@@ -457,6 +467,13 @@
+ jpeg_start_decompress(cinfo);
/* Check dimensions. */
+@@ -1002,5 +696,5 @@
+ break;
+ case JCS_RGB:
+- /* note: this pixel layout assumes default configuration of libjpeg. */
++ /* note: this pixel layout assumes default configuration of libjpeg_ */
+ block.pixelSize = 3;
+ block.offset[0] = 0;
@@ -1029,5 +723,5 @@
outY = destY;
for (curY = 0; curY < stopY; curY++) {
@@ -490,8 +507,9 @@
return TCL_ERROR;
}
- /* Now we can initialize libjpeg. */
+- /* Now we can initialize libjpeg. */
- jpeg.CreateCompress(&cinfo, JPEG_LIB_VERSION,
++ /* Now we can initialize libjpeg_ */
+ jpeg_CreateCompress(&cinfo, JPEG_LIB_VERSION,
(size_t) sizeof(struct jpeg_compress_struct));
jpeg_channel_dest(&cinfo, chan);
@@ -512,8 +530,9 @@
@@ -1167,6 +861,6 @@
}
- /* Now we can initialize libjpeg. */
+- /* Now we can initialize libjpeg. */
- jpeg.CreateCompress(&cinfo, JPEG_LIB_VERSION,
++ /* Now we can initialize libjpeg_ */
+ jpeg_CreateCompress(&cinfo, JPEG_LIB_VERSION,
(size_t) sizeof(struct jpeg_compress_struct));
jpeg_string_dest(&cinfo, dataPtr);
diff --git a/graphics/libimg/files/patch-warnings b/graphics/libimg/files/patch-warnings
deleted file mode 100644
index 930e07d25fb6..000000000000
--- a/graphics/libimg/files/patch-warnings
+++ /dev/null
@@ -1,213 +0,0 @@
---- imgObj.c 2002-01-15 16:00:08.000000000 -0500
-+++ imgObj.c 2011-09-14 01:42:03.000000000 -0400
-@@ -33,5 +33,5 @@
- return (initialized = IMG_PERL|IMG_OBJS);
- #else
-- char *version;
-+ const char *version;
- initialized = IMG_TCL;
- if (!Tcl_GetCommandInfo(interp,"image", &cmdInfo)) {
-@@ -186,5 +186,5 @@
- *lengthPtr = baPtr->used;
- }
-- return (unsigned char *) baPtr->bytes;
-+ return (char *)baPtr->bytes;
- } else {
- char *string = (char *) objPtr;
---- imgInit.c Tue Jan 15 15:59:58 2002
-+++ imgInit.c Thu Jun 9 05:27:40 2005
-@@ -94,5 +94,5 @@
- {
- Tk_PhotoImageFormat **formatPtr = Formats;
-- char *version;
-+ const char *version;
-
- if ((version = Tcl_InitStubs(interp, "8.0", 0)) == NULL) {
---- imgBMP.c 2002-01-15 16:00:07.000000000 -0500
-+++ imgBMP.c 2011-09-14 01:52:28.000000000 -0400
-@@ -222,5 +222,6 @@
- unsigned char *colorMap = NULL;
- char buf[10];
-- unsigned char *line = NULL, *expline = NULL;
-+ char *line = NULL;
-+ unsigned char *expline = NULL;
-
- CommonMatchBMP(handle, &fileWidth, &fileHeight, &colorMap, &numBits,
-@@ -237,5 +238,5 @@
-
- bytesPerLine = ((numBits * fileWidth + 31)/32)*4;
-- line = (unsigned char *) ckalloc(bytesPerLine);
-+ line = ckalloc(bytesPerLine);
-
- for(y=srcY+height; y<fileHeight; y++) {
-@@ -253,5 +254,5 @@
- switch (numBits) {
- case 24:
-- block.pixelPtr = line + srcX*3;
-+ block.pixelPtr = (unsigned char *)line + srcX*3;
- for( y = height-1; y>=0; y--) {
- ImgRead(handle, line, bytesPerLine);
---- imgGIF.c 2002-01-15 16:00:07.000000000 -0500
-+++ imgGIF.c 2011-09-14 02:10:28.000000000 -0400
-@@ -115,5 +115,5 @@
- int flag));
- static int GetDataBlock _ANSI_ARGS_((MFile *handle,
-- unsigned char *buf));
-+ char *buf));
- static int ReadColorMap _ANSI_ARGS_((MFile *handle, int number,
- unsigned char buffer[MAXCOLORMAPSIZE][4]));
-@@ -256,6 +256,6 @@
- Tcl_Obj **objv = NULL;
- myblock bl;
-- unsigned char buf[100];
-- unsigned char *trashBuffer = NULL;
-+ char buf[100];
-+ char *trashBuffer = NULL;
- int bitPixel;
- unsigned int colorResolution;
-@@ -402,6 +402,5 @@
- if (trashBuffer == NULL) {
- nBytes = fileWidth * fileHeight * 3;
-- trashBuffer =
-- (unsigned char *) ckalloc((unsigned int) nBytes);
-+ trashBuffer = ckalloc((unsigned int) nBytes);
- }
-
-@@ -602,9 +601,9 @@
- * returned here. */
- {
-- unsigned char buf[7];
-+ char buf[7];
-
- if ((ImgRead(handle, buf, 6) != 6)
-- || ((strncmp(GIF87a, (char *) buf, 6) != 0)
-- && (strncmp(GIF89a, (char *) buf, 6) != 0))) {
-+ || ((strncmp(GIF87a, buf, 6) != 0)
-+ && (strncmp(GIF89a, buf, 6) != 0))) {
- return 0;
- }
-@@ -633,5 +632,5 @@
- {
- int i;
-- unsigned char rgb[3];
-+ char rgb[3];
-
- for (i = 0; i < number; ++i) {
-@@ -658,5 +657,5 @@
- int *transparent;
- {
-- static unsigned char buf[256];
-+ static char buf[256];
- int count;
-
-@@ -670,10 +669,10 @@
- case 0xfe: /* Comment Extension */
- do {
-- count = GetDataBlock(handle, (unsigned char*) buf);
-+ count = GetDataBlock(handle, buf);
- } while (count > 0);
- return count;
-
- case 0xf9: /* Graphic Control Extension */
-- count = GetDataBlock(handle, (unsigned char*) buf);
-+ count = GetDataBlock(handle, buf);
- if (count < 0) {
- return 1;
-@@ -684,5 +683,5 @@
-
- do {
-- count = GetDataBlock(handle, (unsigned char*) buf);
-+ count = GetDataBlock(handle, buf);
- } while (count > 0);
- return count;
-@@ -690,5 +689,5 @@
-
- do {
-- count = GetDataBlock(handle, (unsigned char*) buf);
-+ count = GetDataBlock(handle, buf);
- } while (count > 0);
- return count;
-@@ -700,7 +699,7 @@
- GetDataBlock(handle, buf)
- MFile *handle;
-- unsigned char *buf;
-+ char *buf;
- {
-- unsigned char count;
-+ char count;
-
- if (! ReadOK(handle,&count,1)) {
-@@ -759,5 +758,5 @@
- int transparent;
- {
-- unsigned char initialCodeSize;
-+ char initialCodeSize;
- int v;
- int xpos = 0, ypos = 0, pass = 0, i;
-@@ -982,7 +981,7 @@
- int flag;
- {
-- static unsigned char buf[280];
-+ static char buf[280];
- static int bytes = 0, done;
-- static unsigned char *c;
-+ static char *c;
-
- static unsigned int window;
-@@ -1473,5 +1472,5 @@
- static int obits;
- static MFile *ofile;
--static unsigned char oblock[MAXCOLORMAPSIZE];
-+static char oblock[MAXCOLORMAPSIZE];
- static int oblen;
-
---- imgJPEG.c 2002-01-15 15:59:56.000000000 -0500
-+++ imgJPEG.c 2011-09-14 02:22:30.000000000 -0400
-@@ -1386,5 +1080,5 @@
- int nbytes;
-
-- nbytes = ImgRead(&src->handle, src->buffer, STRING_BUF_SIZE);
-+ nbytes = ImgRead(&src->handle, (char *)src->buffer, STRING_BUF_SIZE);
-
- if (nbytes <= 0) {
---- imgPS.c Sun Aug 13 06:06:53 2000
-+++ imgPS.c 2011-09-14 03:05:21.000000000 -0400
-@@ -178,5 +178,5 @@
- int *widthPtr, *heightPtr;
- {
-- unsigned char buf[41];
-+ char buf[41];
-
- if ((ImgRead(handle, (char *) buf, 11) != 11)
-@@ -184,11 +184,11 @@
- return 0;
- }
-- while (ImgRead(handle,(char *) buf, 1) == 1) {
-+ while (ImgRead(handle, buf, 1) == 1) {
- if (buf[0] == '%' &&
-- (ImgRead(handle, (char *) buf, 2) == 2) &&
-+ (ImgRead(handle, buf, 2) == 2) &&
- (!memcmp(buf, "%B", 2) &&
-- (ImgRead(handle, (char *) buf, 11) == 11) &&
-+ (ImgRead(handle, buf, 11) == 11) &&
- (!memcmp(buf, "oundingBox:", 11)) &&
-- (ImgRead(handle, (char *) buf, 40) == 40))) {
-+ (ImgRead(handle, buf, 40) == 40))) {
- int w, h, zoomx, zoomy;
- char *p = buf;
-@@ -272,5 +272,6 @@
- int len, i, j, fileWidth, fileHeight, maxintensity, index;
- char *p, type;
-- unsigned char buffer[1025], *line = NULL, *line3 = NULL;
-+ char buffer[1025];
-+ unsigned char *line = NULL, *line3 = NULL;
- char zoom[64], papersize[64];
- Tcl_Channel chan;
---- imgUtil.c 2002-01-15 15:59:59.000000000 -0500
-+++ imgUtil.c 2011-09-14 03:40:28.000000000 -0400
-@@ -249,3 +249,3 @@
- }
- *handlePtr = IMG_FAILED;
--}
-\ No newline at end of file
-+}
diff --git a/graphics/libimg/files/tk84-Tk_PhotoPutBlock b/graphics/libimg/files/tk84-Tk_PhotoPutBlock
index 16e5a903ff7c..7b4be394f46c 100644
--- a/graphics/libimg/files/tk84-Tk_PhotoPutBlock
+++ b/graphics/libimg/files/tk84-Tk_PhotoPutBlock
@@ -1,4 +1,4 @@
---- imgBMP.c Sun Aug 13 06:08:30 2000
+--- imgBMP.c.orig Sun Aug 13 06:08:30 2000
+++ imgBMP.c Mon Dec 1 12:49:07 2003
@@ -256,7 +256,7 @@
for( y = height-1; y>=0; y--) {
@@ -36,7 +36,7 @@
expline = block.pixelPtr;
}
break;
---- imgGIF.c Sun Aug 13 06:09:39 2000
+--- imgGIF.c.orig Sun Aug 13 06:09:39 2000
+++ imgGIF.c Mon Dec 1 12:50:19 2003
@@ -482,7 +482,7 @@
}
@@ -47,7 +47,7 @@
} else {
ImgPhotoPutBlock(imageHandle, &block, destX, destY, width, height);
}
---- imgJPEG.c Sun Aug 13 06:10:22 2000
+--- imgJPEG.c.orig Sun Aug 13 06:10:22 2000
+++ imgJPEG.c Mon Dec 1 12:50:53 2003
@@ -1030,7 +1030,7 @@
for (curY = 0; curY < stopY; curY++) {
@@ -58,7 +58,7 @@
outY++;
}
}
---- imgPS.c Sun Aug 13 06:06:53 2000
+--- imgPS.c.orig Sun Aug 13 06:06:53 2000
+++ imgPS.c Mon Dec 1 12:51:42 2003
@@ -395,7 +395,7 @@
for (j = 0; j < width; j++) {
@@ -121,7 +121,7 @@
\ No newline at end of file
+}
+#endif /* } */
---- imgWindow.c Sat Jan 15 13:25:37 2000
+--- imgWindow.c.orig Sat Jan 15 13:25:37 2000
+++ imgWindow.c Mon Dec 1 12:52:11 2003
@@ -378,7 +378,7 @@
}
@@ -132,7 +132,7 @@
#ifndef __WIN32__
XDestroyImage(ximage);
---- imgXPM.c Sun Aug 13 06:41:31 2000
+--- imgXPM.c.orig Sun Aug 13 06:41:31 2000
+++ imgXPM.c Mon Dec 1 12:52:34 2003
@@ -504,7 +504,7 @@
col = (int)0;
diff --git a/graphics/libimg/files/tk84-warnings b/graphics/libimg/files/tk84-warnings
index a458bf591d07..91aaaf017842 100644
--- a/graphics/libimg/files/tk84-warnings
+++ b/graphics/libimg/files/tk84-warnings
@@ -1,3 +1,21 @@
+--- imgObj.c Tue Jan 15 16:00:08 2002
++++ imgObj.c Thu Jun 9 05:28:23 2005
+@@ -33,5 +33,5 @@
+ return (initialized = IMG_PERL|IMG_OBJS);
+ #else
+- char *version;
++ const char *version;
+ initialized = IMG_TCL;
+ if (!Tcl_GetCommandInfo(interp,"image", &cmdInfo)) {
+--- imgInit.c Tue Jan 15 15:59:58 2002
++++ imgInit.c Thu Jun 9 05:27:40 2005
+@@ -94,5 +94,5 @@
+ {
+ Tk_PhotoImageFormat **formatPtr = Formats;
+- char *version;
++ const char *version;
+
+ if ((version = Tcl_InitStubs(interp, "8.0", 0)) == NULL) {
--- imgPmap.h Tue Jan 15 15:59:58 2002
+++ imgPmap.h Thu Jun 9 05:48:57 2005
@@ -53,5 +53,5 @@
diff --git a/graphics/libimg/files/tk85-Tk_PhotoPutBlock b/graphics/libimg/files/tk85-Tk_PhotoPutBlock
deleted file mode 100644
index 86868e5eee7e..000000000000
--- a/graphics/libimg/files/tk85-Tk_PhotoPutBlock
+++ /dev/null
@@ -1,237 +0,0 @@
---- imgBMP.c Sun Aug 13 06:08:30 2000
-+++ imgBMP.c Mon Dec 1 12:49:07 2003
-@@ -235,5 +236,5 @@
- }
-
-- Tk_PhotoExpand(imageHandle, destX + width, destY + height);
-+ Tk_PhotoExpand(interp, imageHandle, destX + width, destY + height);
-
- bytesPerLine = ((numBits * fileWidth + 31)/32)*4;
-@@ -256,7 +256,7 @@
- for( y = height-1; y>=0; y--) {
- ImgRead(handle, line, bytesPerLine);
-- Tk_PhotoPutBlock(imageHandle, &block, destX, destY+y,
-+ Tk_PhotoPutBlock(interp, imageHandle, &block, destX, destY+y,
-- width,1);
-+ width,1,TK_PHOTO_COMPOSITE_SET);
- }
- break;
- case 8:
-@@ -268,7 +268,7 @@
- expline += 3;
- }
-- Tk_PhotoPutBlock(imageHandle, &block, destX, destY+y,
-+ Tk_PhotoPutBlock(interp, imageHandle, &block, destX, destY+y,
-- width,1);
-+ width,1,TK_PHOTO_COMPOSITE_SET);
- expline = block.pixelPtr;
- }
- break;
-@@ -287,7 +287,7 @@
- expline += 3;
- }
-- Tk_PhotoPutBlock(imageHandle, &block, destX, destY+y,
-+ Tk_PhotoPutBlock(interp, imageHandle, &block, destX, destY+y,
-- width,1);
-+ width,1,TK_PHOTO_COMPOSITE_SET);
- expline = block.pixelPtr;
- }
- break;
-@@ -302,7 +302,7 @@
- expline += 3;
- }
-- Tk_PhotoPutBlock(imageHandle, &block, destX, destY+y,
-+ Tk_PhotoPutBlock(interp, imageHandle, &block, destX, destY+y,
-- width,1);
-+ width,1,TK_PHOTO_COMPOSITE_SET);
- expline = block.pixelPtr;
- }
- break;
---- imgGIF.c Sun Aug 13 06:09:39 2000
-+++ imgGIF.c Mon Dec 1 12:50:19 2003
-@@ -322,5 +322,5 @@
- }
-
-- Tk_PhotoExpand(imageHandle, destX + width, destY + height);
-+ Tk_PhotoExpand(interp, imageHandle, destX + width, destY + height);
-
- block.pixelSize = 4;
-@@ -482,7 +482,7 @@
- }
-
- if (transparent == -1) {
-- Tk_PhotoPutBlock(imageHandle, &block, destX, destY, width, height);
-+ Tk_PhotoPutBlock(interp, imageHandle, &block, destX, destY, width, height, TK_PHOTO_COMPOSITE_SET);
- } else {
- ImgPhotoPutBlock(imageHandle, &block, destX, destY, width, height);
- }
---- imgJPEG.c Sun Aug 13 06:10:22 2000
-+++ imgJPEG.c Mon Dec 1 12:50:53 2003
-@@ -1017,5 +711,5 @@
- block.offset[3] = block.offset[0];
-
-- Tk_PhotoExpand(imageHandle, destX + outWidth, destY + outHeight);
-+ Tk_PhotoExpand(interp, imageHandle, destX + outWidth, destY + outHeight);
-
- /* Make a temporary one-row-high sample array */
-@@ -1030,7 +1030,7 @@
- for (curY = 0; curY < stopY; curY++) {
- jpeg.read_scanlines(cinfo, buffer, 1);
- if (curY >= srcY) {
-- Tk_PhotoPutBlock(imageHandle, &block, destX, outY, outWidth, 1);
-+ Tk_PhotoPutBlock(interp, imageHandle, &block, destX, outY, outWidth, 1, TK_PHOTO_COMPOSITE_SET);
- outY++;
- }
- }
---- imgPS.c Sun Aug 13 06:06:53 2000
-+++ imgPS.c Mon Dec 1 12:51:42 2003
-@@ -365,5 +365,5 @@
- return TCL_OK;
- }
-- Tk_PhotoExpand(imageHandle, destX + width, destY + height);
-+ Tk_PhotoExpand(interp, imageHandle, destX + width, destY + height);
-
- maxintensity = strtoul(p, &p, 0);
-@@ -395,7 +395,7 @@
- for (j = 0; j < width; j++) {
- line3[j] = ((line[(j+srcX)/8]>>(7-(j+srcX)%8) & 1)) ? 0 : 255;
- }
-- Tk_PhotoPutBlock(imageHandle, &block, destX, destY++, width, 1);
-+ Tk_PhotoPutBlock(interp, imageHandle, &block, destX, destY++, width, 1, TK_PHOTO_COMPOSITE_SET);
- }
- break;
- case '5':
-@@ -413,7 +413,7 @@
- c++;
- }
- }
-- Tk_PhotoPutBlock(imageHandle, &block, destX, destY++, width, 1);
-+ Tk_PhotoPutBlock(interp, imageHandle, &block, destX, destY++, width, 1, TK_PHOTO_COMPOSITE_SET);
- }
- break;
- case '6':
-@@ -435,7 +435,7 @@
- c++;
- }
- }
-- Tk_PhotoPutBlock(imageHandle, &block, destX, destY++, width, 1);
-+ Tk_PhotoPutBlock(interp, imageHandle, &block, destX, destY++, width, 1, TK_PHOTO_COMPOSITE_SET);
- }
- break;
- }
---- imgUtil.c Tue Jan 15 15:59:59 2002
-+++ imgUtil.c Thu Jun 9 20:51:49 2005
-@@ -95,7 +95,7 @@
- }
- if (end > X) {
- blockPtr->pixelPtr = rowPtr + blockPtr->pixelSize * X;
-- Tk_PhotoPutBlock(handle, blockPtr, x+X, y+Y, end-X, 1);
-+ Tk_PhotoPutBlock(NULL, handle, blockPtr, x+X, y+Y, end-X, 1, TK_PHOTO_COMPOSITE_SET);
- }
- X = end;
- }
-@@ -103,12 +103,12 @@
- }
- blockPtr->pixelPtr = imagePtr;
- } else {
-- Tk_PhotoPutBlock(handle,blockPtr,x,y,width,height);
-+ Tk_PhotoPutBlock(NULL, handle,blockPtr,x,y,width,height,TK_PHOTO_COMPOSITE_SET);
- }
- return TCL_OK;
- }
-
--
-+#if 0 /* OS run-time linker is better suited for this job { */
- /*
- *----------------------------------------------------------------------
- *
-@@ -248,4 +248,5 @@
- dlclose(*handlePtr);
- }
- *handlePtr = IMG_FAILED;
--}
-\ No newline at end of file
-+}
-+#endif /* } */
---- imgWindow.c Sat Jan 15 13:25:37 2000
-+++ imgWindow.c Mon Dec 1 12:52:11 2003
-@@ -327,5 +327,5 @@
- #endif
-
-- Tk_PhotoExpand(imageHandle, destX + width, destY + height);
-+ Tk_PhotoExpand(interp, imageHandle, destX + width, destY + height);
- block.offset[0] = 0;
- block.offset[3] = 0;
-@@ -378,7 +378,7 @@
- }
- }
-
-- Tk_PhotoPutBlock(imageHandle, &block, destX, destY, width, height);
-+ Tk_PhotoPutBlock(interp, imageHandle, &block, destX, destY, width, height, TK_PHOTO_COMPOSITE_SET);
-
- #ifndef __WIN32__
- XDestroyImage(ximage);
---- imgXPM.c Sun Aug 13 06:41:31 2000
-+++ imgXPM.c Mon Dec 1 12:52:34 2003
-@@ -438,5 +438,5 @@
- block.pub.pixelPtr = (unsigned char *) ckalloc((unsigned) block.pub.pixelSize * width);
-
-- Tk_PhotoExpand(imageHandle, destX + width, destY + height);
-+ Tk_PhotoExpand(interp, imageHandle, destX + width, destY + height);
-
- i = srcY;
-@@ -504,7 +504,7 @@
- col = (int)0;
- }
- } while ((i < width) && col);
-- Tk_PhotoPutBlock(imageHandle, &block.pub, destX+j, destY, len, 1);
-+ Tk_PhotoPutBlock(interp, imageHandle, &block.pub, destX+j, destY, len, 1, TK_PHOTO_COMPOSITE_SET);
- } else {
- p += byteSize;
- i++;
---- imgPNG.c 2002-01-15 16:00:08.000000000 -0500
-+++ imgPNG.c 2011-09-14 02:26:32.000000000 -0400
-@@ -96,5 +96,5 @@
- static int CommonMatchPNG _ANSI_ARGS_((MFile *handle, int *widthPtr,
- int *heightPtr));
--static int CommonReadPNG _ANSI_ARGS_((png_structp png_ptr, Tcl_Obj *format,
-+static int CommonReadPNG _ANSI_ARGS_((Tcl_Interp *interp, png_structp png_ptr, Tcl_Obj *format,
- Tk_PhotoHandle imageHandle, int destX, int destY, int width,
- int height, int srcX, int srcY));
-@@ -345,4 +246,4 @@
-
-- return CommonReadPNG(png_ptr, format, imageHandle, destX, destY,
-+ return CommonReadPNG(interp, png_ptr, format, imageHandle, destX, destY,
- width, height, srcX, srcY);
- }
-@@ -377,4 +274,4 @@
-
-- return CommonReadPNG(png_ptr, format, imageHandle, destX, destY,
-+ return CommonReadPNG(interp, png_ptr, format, imageHandle, destX, destY,
- width, height, srcX, srcY);
- }
-@@ -388,6 +285,7 @@
- #define block bl.ck
-
--static int CommonReadPNG(png_ptr, format, imageHandle, destX, destY,
-+static int CommonReadPNG(interp, png_ptr, format, imageHandle, destX, destY,
- width, height, srcX, srcY)
-+ Tcl_Interp *interp;
- png_structp png_ptr;
- Tcl_Obj *format;
-@@ -443,5 +340,5 @@
- }
-
-- Tk_PhotoExpand(imageHandle, destX + width, destY + height);
-+ Tk_PhotoExpand(interp, imageHandle, destX + width, destY + height);
-
- Tk_PhotoGetImage(imageHandle, &block);
---- imgXBM.c 2002-01-15 16:00:08.000000000 -0500
-+++ imgXBM.c 2011-09-14 03:20:16.000000000 -0400
-@@ -227,5 +227,5 @@
- }
-
-- Tk_PhotoExpand(imageHandle, destX + width, destY + height);
-+ Tk_PhotoExpand(interp, imageHandle, destX + width, destY + height);
-
- numBytes = ((fileWidth+7)/8)*32;