rpms/amsn/F-10 amsn-0.97-tkcximage.patch, NONE, 1.1 amsn.spec, 1.20, 1.21
Sander Hoentjen
tjikkun at fedoraproject.org
Tue Feb 17 20:09:03 UTC 2009
Author: tjikkun
Update of /cvs/pkgs/rpms/amsn/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31757
Modified Files:
amsn.spec
Added Files:
amsn-0.97-tkcximage.patch
Log Message:
add patch for TkCxImage to build against newer tcl/tk (bug #483368)
amsn-0.97-tkcximage.patch:
--- NEW FILE amsn-0.97-tkcximage.patch ---
--- trunk/amsn/utils/TkCximage/src/TkCximage.cpp 2008/12/26 16:39:41 10817
+++ trunk/amsn/utils/TkCximage/src/TkCximage.cpp 2008/12/28 21:50:08 10818
@@ -26,6 +26,65 @@
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;
@@ -267,10 +326,6 @@
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;
@@ -285,15 +340,6 @@
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"); //
@@ -323,14 +369,9 @@
#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
Index: amsn.spec
===================================================================
RCS file: /cvs/pkgs/rpms/amsn/F-10/amsn.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- amsn.spec 27 Oct 2008 18:25:29 -0000 1.20
+++ amsn.spec 17 Feb 2009 20:08:33 -0000 1.21
@@ -3,7 +3,7 @@
Name: amsn
Version: 0.97.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: MSN Messenger clone for Linux, Mac and Windows
Group: Applications/Internet
@@ -12,6 +12,7 @@
Source0: http://dl.sourceforge.net/amsn/%{name}-%{version}.tar.bz2
Patch0: amsn-0.97-libng-fixes.patch
Patch1: amsn-0.97-libng-libv4l2.patch
+Patch2: amsn-0.97-tkcximage.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils, tk-devel, which, libpng-devel, libjpeg-devel
@@ -39,6 +40,7 @@
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p2
rm -r utils/bwidget1.8.0
rm -r skins/default/winicons
@@ -129,6 +131,9 @@
%changelog
+* Tue Feb 17 2009 Sander Hoentjen <sander at hoentjen.eu> - 0.97.2-2
+- add patch for TkCxImage to build against newer tcl/tk (bug #483368)
+
* Mon Oct 27 2008 Sander Hoentjen <sander at hoentjen.eu> - 0.97.2-1
- Update to latest release
More information about the fedora-extras-commits
mailing list