Hi,

This patch correct bugs where have following to tcl/tk update.
Tested ok with lastest snapshot on i386.

Please test it,
BSDManiak 
diff -urN /usr/ports/net/amsn/Makefile /usr/ports/mystuff/net/amsn/Makefile
--- /usr/ports/net/amsn/Makefile	Sun Aug 31 19:16:22 2008
+++ /usr/ports/mystuff/net/amsn/Makefile	Wed Jan 14 19:25:34 2009
@@ -2,6 +2,7 @@
 
 COMMENT=	open source MSN Messenger clone
 
+PKGNAME=	${DISTNAME}p0
 DISTNAME=	amsn-0.97.2
 CATEGORIES=	net
 
diff -urN /usr/ports/net/amsn/patches/patch-autoupdate_tcl /usr/ports/mystuff/net/amsn/patches/patch-autoupdate_tcl
--- /usr/ports/net/amsn/patches/patch-autoupdate_tcl	Thu Jan  1 01:00:00 1970
+++ /usr/ports/mystuff/net/amsn/patches/patch-autoupdate_tcl	Wed Jan 14 19:23:54 2009
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- autoupdate.tcl.orig	Wed Jan 14 19:22:42 2009
++++ autoupdate.tcl	Wed Jan 14 19:23:02 2009
+@@ -540,7 +540,7 @@ namespace eval ::autoupdate {
+ 	}
+ 
+ 	#///////////////////////////////////////////////////////////////////////
+-	package require http
++	package require -exact http 2.4.4
+ 
+ 	proc check_web_version { token } {
+ 		global version rcversion weburl
diff -urN /usr/ports/net/amsn/patches/patch-proxy_tcl /usr/ports/mystuff/net/amsn/patches/patch-proxy_tcl
--- /usr/ports/net/amsn/patches/patch-proxy_tcl	Thu Jan  1 01:00:00 1970
+++ /usr/ports/mystuff/net/amsn/patches/patch-proxy_tcl	Wed Jan 14 19:23:54 2009
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- proxy.tcl.orig	Wed Jan 14 19:23:26 2009
++++ proxy.tcl	Wed Jan 14 19:23:42 2009
+@@ -9,7 +9,7 @@
+ ::Version::setSubversionId {$Id: proxy.tcl 10035 2008-05-28 14:41:14Z baaazen $}
+ 
+ package provide Proxy 0.1
+-package require http
++package require -exact http 2.4.4
+ 
+ # This should be converted to a proper package, to use with package require
+ source socks.tcl	;# SOCKS5 proxy support
diff -urN /usr/ports/net/amsn/patches/patch-utils_TkCximage_src_TkCximage_cpp /usr/ports/mystuff/net/amsn/patches/patch-utils_TkCximage_src_TkCximage_cpp
--- /usr/ports/net/amsn/patches/patch-utils_TkCximage_src_TkCximage_cpp	Thu Jan  1 01:00:00 1970
+++ /usr/ports/mystuff/net/amsn/patches/patch-utils_TkCximage_src_TkCximage_cpp	Wed Jan 14 19:08:48 2009
@@ -0,0 +1,114 @@
+$OpenBSD$
+--- utils/TkCximage/src/TkCximage.cpp.orig	Fri Jan  4 17:08:26 2008
++++ utils/TkCximage/src/TkCximage.cpp	Wed Jan 14 19:08:46 2009
+@@ -13,6 +13,64 @@
+ char currenttime[30];
+ FILE * logfile;
+ 
++#define AVAILABLE_FORMATS 6
++      Tk_PhotoImageFormat cximageFormats[] = {
++      {
++       "cximage",
++       (Tk_ImageFileMatchProc *) ChanMatch,
++       (Tk_ImageStringMatchProc *) ObjMatch,
++       (Tk_ImageFileReadProc *) ChanRead,
++       (Tk_ImageStringReadProc *) ObjRead,
++       (Tk_ImageFileWriteProc *) ChanWrite,
++       (Tk_ImageStringWriteProc *) StringWrite
++      },
++      {
++       "cxgif",
++       (Tk_ImageFileMatchProc *) ChanMatch,
++       (Tk_ImageStringMatchProc *) ObjMatch,
++       (Tk_ImageFileReadProc *) ChanRead,
++       (Tk_ImageStringReadProc *) ObjRead,
++       (Tk_ImageFileWriteProc *) ChanWrite,
++       (Tk_ImageStringWriteProc *) StringWrite
++      },
++      {
++  "cxpng",
++  (Tk_ImageFileMatchProc *) ChanMatch,
++  (Tk_ImageStringMatchProc *) ObjMatch,
++  (Tk_ImageFileReadProc *) ChanRead,
++  (Tk_ImageStringReadProc *) ObjRead,
++  (Tk_ImageFileWriteProc *) ChanWrite,
++      (Tk_ImageStringWriteProc *) StringWrite
++      },
++      {
++      "cxjpg",
++      (Tk_ImageFileMatchProc *) ChanMatch,
++      (Tk_ImageStringMatchProc *) ObjMatch,
++      (Tk_ImageFileReadProc *) ChanRead,
++      (Tk_ImageStringReadProc *) ObjRead,
++      (Tk_ImageFileWriteProc *) ChanWrite,
++      (Tk_ImageStringWriteProc *) StringWrite
++      },
++      {
++       "cxtga",
++      (Tk_ImageFileMatchProc *) ChanMatch,
++      (Tk_ImageStringMatchProc *) ObjMatch,
++      (Tk_ImageFileReadProc *) ChanRead,
++      (Tk_ImageStringReadProc *) ObjRead,
++      (Tk_ImageFileWriteProc *) ChanWrite,
++      (Tk_ImageStringWriteProc *) StringWrite
++     },
++     {
++      "cxbmp",
++      (Tk_ImageFileMatchProc *) ChanMatch,
++      (Tk_ImageStringMatchProc *) ObjMatch,
++      (Tk_ImageFileReadProc *) ChanRead,
++      (Tk_ImageStringReadProc *) ObjRead,
++      (Tk_ImageFileWriteProc *) ChanWrite,
++      (Tk_ImageStringWriteProc *) StringWrite
++     }
++};
++
+ int RGB2BGR(Tk_PhotoImageBlock *data, BYTE * pixelPtr) {
+   int i;
+   int size = data->height * data->width * data->pixelSize;
+@@ -254,10 +312,6 @@ int Tkcximage_Init (Tcl_Interp *interp ) {
+   INITLOGS(); //
+   LOG("---------------------------------"); //
+ 
+-
+-  int AvailableFromats = 6;
+-  const char *KnownFormats[] = {"cximage", "cxgif", "cxpng", "cxjpg", "cxtga", "cxbmp"};
+-
+   //Check Tcl version is 8.3 or higher
+   if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
+     return TCL_ERROR;
+@@ -272,16 +326,6 @@ int Tkcximage_Init (Tcl_Interp *interp ) {
+ 
+   LOG("Tk stub initialized"); //
+ 
+-  Tk_PhotoImageFormat cximageFormats = {
+-    NULL,
+-    (Tk_ImageFileMatchProc *) ChanMatch,	
+-    (Tk_ImageStringMatchProc *) ObjMatch,	
+-    (Tk_ImageFileReadProc *) ChanRead,	
+-    (Tk_ImageStringReadProc *) ObjRead,	
+-    (Tk_ImageFileWriteProc *) ChanWrite,	
+-    (Tk_ImageStringWriteProc *) StringWrite
+-  };
+-	
+   LOG("Creating commands"); //
+ 
+   // Create the wrapping commands in the CxImage namespace linked to custom functions with a NULL clientdata and 
+@@ -310,14 +354,9 @@ int Tkcximage_Init (Tcl_Interp *interp ) {
+ #endif
+ 
+   LOG("Adding format : "); //
+-  for (i = 0; i < AvailableFromats; i++) {
+-    delete cximageFormats.name;
+-    cximageFormats.name = new char[strlen(KnownFormats[i]) + 1];
+-    strcpy(cximageFormats.name, KnownFormats[i]);
+-    Tk_CreatePhotoImageFormat(&cximageFormats);
+-    APPENDLOG(cximageFormats.name); //
+-    delete cximageFormats.name;
+-    cximageFormats.name = NULL;
++  for (i = 0; i < AVAILABLE_FORMATS; i++) {
++     Tk_CreatePhotoImageFormat(&cximageFormats[i]);
++     APPENDLOG(cximageFormats[i].name);
+   }
+ 
+   // end of Initialisation

Reply via email to