summaryrefslogtreecommitdiff
path: root/graphics/libimg
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>2003-12-09 21:45:48 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>2003-12-09 21:45:48 +0000
commit6325529f710ed93d40a9c72b0af0751d440d7910 (patch)
tree1b2dcd5cbfa0a552717b49e99361111aa905d54e /graphics/libimg
parentClean up historical baggage, and move the old local distfiles that (diff)
Bring Img up to the world of Tcl/Tk 8.4. Since the Tk_PhotoPutBlock()
function now has one more parameter to pass, I collected all the individual file patches in a single patch for that purpose, so if/when the original software is up to Tk 8.4, this patch file can easily be removed again.
Diffstat (limited to 'graphics/libimg')
-rw-r--r--graphics/libimg/Makefile5
-rw-r--r--graphics/libimg/files/Makefile.bsd2
-rw-r--r--graphics/libimg/files/patch-tk84_Tk_PhotoPutBlock138
3 files changed, 142 insertions, 3 deletions
diff --git a/graphics/libimg/Makefile b/graphics/libimg/Makefile
index 973883a236b1..5fe0476fe77e 100644
--- a/graphics/libimg/Makefile
+++ b/graphics/libimg/Makefile
@@ -7,14 +7,15 @@
PORTNAME= libimg
PORTVERSION= 1.2.4
-CATEGORIES= graphics tk83
+PORTREVISION= 1
+CATEGORIES= graphics tk84
MASTER_SITES= http://www.neosoft.com/tcl/ftparchive/sorted/packages-8.0/graphics/Img/1.2/
DISTNAME= img${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= A library of image format handlers for Tk4.1 and later
-LIB_DEPENDS= tk83.1:${PORTSDIR}/x11-toolkits/tk83 \
+LIB_DEPENDS= tk84.1:${PORTSDIR}/x11-toolkits/tk84 \
png.5:${PORTSDIR}/graphics/png \
jpeg.9:${PORTSDIR}/graphics/jpeg \
tiff.4:${PORTSDIR}/graphics/tiff
diff --git a/graphics/libimg/files/Makefile.bsd b/graphics/libimg/files/Makefile.bsd
index e0aa3464379e..ce3264438cab 100644
--- a/graphics/libimg/files/Makefile.bsd
+++ b/graphics/libimg/files/Makefile.bsd
@@ -3,7 +3,7 @@ SHLIB_NAME= libimg.so.1
PORTVERSION?= 1.2.4
LOCALBASE?= /usr/local
X11BASE?= /usr/X11R6
-TCL_VER?= 8.3
+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
diff --git a/graphics/libimg/files/patch-tk84_Tk_PhotoPutBlock b/graphics/libimg/files/patch-tk84_Tk_PhotoPutBlock
new file mode 100644
index 000000000000..7cdb0eb6d863
--- /dev/null
+++ b/graphics/libimg/files/patch-tk84_Tk_PhotoPutBlock
@@ -0,0 +1,138 @@
+--- 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--) {
+ ImgRead(handle, line, bytesPerLine);
+ Tk_PhotoPutBlock(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,
+- 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,
+- 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,
+- width,1);
++ width,1,TK_PHOTO_COMPOSITE_SET);
+ expline = block.pixelPtr;
+ }
+ break;
+--- imgGIF.c.orig Sun Aug 13 06:09:39 2000
++++ imgGIF.c Mon Dec 1 12:50:19 2003
+@@ -482,7 +482,7 @@
+ }
+
+ if (transparent == -1) {
+- Tk_PhotoPutBlock(imageHandle, &block, destX, destY, width, height);
++ Tk_PhotoPutBlock(imageHandle, &block, destX, destY, width, height, TK_PHOTO_COMPOSITE_SET);
+ } else {
+ ImgPhotoPutBlock(imageHandle, &block, destX, destY, width, height);
+ }
+--- 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++) {
+ jpeg.read_scanlines(cinfo, buffer, 1);
+ if (curY >= srcY) {
+- Tk_PhotoPutBlock(imageHandle, &block, destX, outY, outWidth, 1);
++ Tk_PhotoPutBlock(imageHandle, &block, destX, outY, outWidth, 1, TK_PHOTO_COMPOSITE_SET);
+ outY++;
+ }
+ }
+--- 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++) {
+ line3[j] = ((line[(j+srcX)/8]>>(7-(j+srcX)%8) & 1)) ? 0 : 255;
+ }
+- Tk_PhotoPutBlock(imageHandle, &block, destX, destY++, width, 1);
++ Tk_PhotoPutBlock(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(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(imageHandle, &block, destX, destY++, width, 1, TK_PHOTO_COMPOSITE_SET);
+ }
+ break;
+ }
+--- imgUtil.c.orig Sat Mar 20 23:09:14 1999
++++ imgUtil.c Mon Dec 1 12:47:43 2003
+@@ -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(handle, blockPtr, x+X, y+Y, end-X, 1, TK_PHOTO_COMPOSITE_SET);
+ }
+ X = end;
+ }
+@@ -103,7 +103,7 @@
+ }
+ blockPtr->pixelPtr = imagePtr;
+ } else {
+- Tk_PhotoPutBlock(handle,blockPtr,x,y,width,height);
++ Tk_PhotoPutBlock(handle,blockPtr,x,y,width,height,TK_PHOTO_COMPOSITE_SET);
+ }
+ return TCL_OK;
+ }
+@@ -248,4 +248,4 @@
+ dlclose(*handlePtr);
+ }
+ *handlePtr = IMG_FAILED;
+-}
+\ No newline at end of file
++}
+--- imgWindow.c.orig Sat Jan 15 13:25:37 2000
++++ imgWindow.c Mon Dec 1 12:52:11 2003
+@@ -378,7 +378,7 @@
+ }
+ }
+
+- Tk_PhotoPutBlock(imageHandle, &block, destX, destY, width, height);
++ Tk_PhotoPutBlock(imageHandle, &block, destX, destY, width, height, TK_PHOTO_COMPOSITE_SET);
+
+ #ifndef __WIN32__
+ XDestroyImage(ximage);
+--- 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;
+ }
+ } while ((i < width) && col);
+- Tk_PhotoPutBlock(imageHandle, &block.pub, destX+j, destY, len, 1);
++ Tk_PhotoPutBlock(imageHandle, &block.pub, destX+j, destY, len, 1, TK_PHOTO_COMPOSITE_SET);
+ } else {
+ p += byteSize;
+ i++;