[Image-SIG] PIL 1.1.4 alpha 2 -- small patches for win32/tk8.4.1/...

Nikolai SAOUKH photo#nms@otdel-1.org
Wed, 27 Nov 2002 16:05:56 +0300


--DocE+STaALJfprDB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Attached patches allows:

- compile PIL with MS Visual C (makefile.win & Dib.c)
- compile PIL against tk-8.4.1
- fix jpeg libname when platform == win32 (setup.py)
- move common directory path to separate variable (makefile.win & setup.py)

I would not insist on that patches.
Better ones are welcomed ;-)

--DocE+STaALJfprDB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=0

--- Tk/tkImaging.c.orig	Fri Nov 22 14:08:30 2002
+++ Tk/tkImaging.c	Tue Nov 26 23:09:06 2002
@@ -40,6 +40,8 @@
 
 #include <stdlib.h>
 
+#define USE_COMPOSITELESS_PHOTO_PUT_BLOCK 1
+
 #include "tk.h"
 
 #include "Imaging.h"
--- libImaging/Dib.c.orig	Fri Nov 22 14:08:32 2002
+++ libImaging/Dib.c	Tue Nov 26 22:09:58 2002
@@ -24,6 +24,9 @@
 
 #ifdef WIN32
 
+#undef INT32
+#undef UINT32
+
 #include "ImDib.h"
 
 
--- libImaging/Makefile.win.orig	Fri Nov 22 14:08:32 2002
+++ libImaging/Makefile.win	Tue Nov 26 22:10:58 2002
@@ -17,9 +17,10 @@
 
 all: imaging.lib
 
-JPEGINCLUDE=	-I../../../kits/jpeg-6b
-TIFFINCLUDE=	-I../../../kits/tifflib
-ZLIBINCLUDE=	-I../../../kits/zlib-1.1.4
+TOPDIR=../..
+JPEGINCLUDE=	-I$(TOPDIR)/jpeg-6b
+TIFFINCLUDE=	-I$(TOPDIR)/tiff-v3.5.7
+ZLIBINCLUDE=	-I$(TOPDIR)/zlib-1.1.4
 CC=		cl.exe
 CFLAGS=		-W3 -Ox -O2 -c -MD -nologo $(JPEGINCLUDE) \
 		$(TIFFINCLUDE) $(ZLIBINCLUDE)
@@ -90,8 +91,8 @@
 	$(CPP) -MD -o coretest.exe coretest.c $(OUTLIB)
 
 clean:
-	del *.obj
-	del $(OUTLIB)
+	-del *.obj
+	-del $(OUTLIB)
 
-test:
+test:	coretest.exe
 	coretest
--- setup.py.orig	Fri Nov 22 14:08:32 2002
+++ setup.py	Wed Nov 27 15:57:31 2002
@@ -23,9 +23,10 @@
 
 # on windows, the build script expects to find both library files and
 # include files in the directories below.  tweak as necessary.
-JPEGDIR = "../../kits/jpeg-6b"
-ZLIBDIR = "../../kits/zlib-1.1.4"
-FREETYPEDIR = "../../kits/freetype-2.0"
+TOPDIR="../"
+JPEGDIR = TOPDIR + "jpeg-6b"
+ZLIBDIR = TOPDIR + "zlib-1.1.4"
+FREETYPEDIR = TOPDIR + "freetype-2.1.3"
 
 # on windows, the following is used to control how and where to search
 # for Tcl/Tk files.  None enables automatic searching; to override, set
@@ -57,7 +58,7 @@
         if lib == "JPEG":
             HAVE_LIBJPEG = 1
             if sys.platform == "win32":
-                LIBRARIES.append("jpeg")
+                LIBRARIES.append("libjpeg")
                 INCLUDE_DIRS.append(JPEGDIR)
                 LIBRARY_DIRS.append(JPEGDIR)
             else:

--DocE+STaALJfprDB--