home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pypil112.zip / Imaging-1.1.2-os2emx.patch next >
Text File  |  2001-08-06  |  6KB  |  224 lines

  1. diff -crN Imaging-1.1.2/_imaging.c Imaging-1.1.2-os2emx/_imaging.c
  2. *** Imaging-1.1.2/_imaging.c    Thu May  3 20:57:38 2001
  3. --- Imaging-1.1.2-os2emx/_imaging.c    Sat Jul 14 21:26:30 2001
  4. ***************
  5. *** 61,67 ****
  6. --- 61,69 ----
  7.   /* Configuration stuff. Feel free to undef things you don't need. */
  8.   #define WITH_IMAGECHOPS /* ImageChops support */
  9.   #define    WITH_IMAGEDRAW /* ImageDraw support */
  10. + #ifndef __EMX__        /* OS/2 + EMX don't have mmap support */
  11.   #define    WITH_MAPPING /* use memory mapping to read some file formats */
  12. + #endif
  13.   #define    WITH_IMAGEPATH /* ImagePath stuff */
  14.   #define    WITH_ARROW /* arrow graphics stuff (experimental) */
  15.   #define    WITH_EFFECTS /* special effects */
  16. ***************
  17. *** 76,81 ****
  18. --- 78,87 ----
  19.   #define B16(p, i) ((((int)p[(i)]) << 8) + p[(i)+1])
  20.   #define L16(p, i) ((((int)p[(i)+1]) << 8) + p[(i)])
  21.   #define S16(v) ((v) < 32768 ? (v) : ((v) - 65536))
  22. + #ifdef __EMX__
  23. + #define    _fill    _pil_fill /* EMX already has a _fill() */
  24. + #endif
  25.   
  26.   /* -------------------------------------------------------------------- */
  27.   /* OBJECT ADMINISTRATION                        */
  28. diff -crN Imaging-1.1.2/BUILD Imaging-1.1.2-os2emx/BUILD
  29. *** Imaging-1.1.2/BUILD    Thu May  3 20:57:38 2001
  30. --- Imaging-1.1.2-os2emx/BUILD    Thu Jan  1 00:00:00 1970
  31. ***************
  32. *** 1,9 ****
  33. - # quick build (for lazy programmers).  for more information on the
  34. - # build process, see the README file.
  35. - cd libImaging
  36. - ./configure
  37. - make
  38. - cd ..
  39. - make -f Makefile.pre.in boot
  40. - make
  41. --- 0 ----
  42. diff -crN Imaging-1.1.2/BUILD.txt Imaging-1.1.2-os2emx/BUILD.txt
  43. *** Imaging-1.1.2/BUILD.txt    Thu Jan  1 00:00:00 1970
  44. --- Imaging-1.1.2-os2emx/BUILD.txt    Thu May  3 20:57:38 2001
  45. ***************
  46. *** 0 ****
  47. --- 1,9 ----
  48. + # quick build (for lazy programmers).  for more information on the
  49. + # build process, see the README file.
  50. + cd libImaging
  51. + ./configure
  52. + make
  53. + cd ..
  54. + make -f Makefile.pre.in boot
  55. + make
  56. diff -crN Imaging-1.1.2/libImaging/ImConfig.h Imaging-1.1.2-os2emx/libImaging/ImConfig.h
  57. *** Imaging-1.1.2/libImaging/ImConfig.h    Fri May  4 21:16:36 2001
  58. --- Imaging-1.1.2-os2emx/libImaging/ImConfig.h    Mon Aug  6 22:00:42 2001
  59. ***************
  60. *** 25,31 ****
  61. --- 25,33 ----
  62.    * later.  It might need some tweaking to work with other compilers,
  63.    * including 16-bit environments. */
  64.   #ifndef    WIN32
  65. + #ifndef __EMX__
  66.   #define    WIN32
  67. + #endif
  68.   #endif
  69.   
  70.   /* VC++ 4.0 is a bit annoying when it comes to precision issues (like
  71. diff -crN Imaging-1.1.2/libImaging/Makefile.os2emx Imaging-1.1.2-os2emx/libImaging/Makefile.os2emx
  72. *** Imaging-1.1.2/libImaging/Makefile.os2emx    Thu Jan  1 00:00:00 1970
  73. --- Imaging-1.1.2-os2emx/libImaging/Makefile.os2emx    Mon Aug  6 21:42:16 2001
  74. ***************
  75. *** 0 ****
  76. --- 1,94 ----
  77. + #
  78. + # The Python Imaging Library.
  79. + #
  80. + # makefile for OS/2 + EMX 0.9d/gcc 2.8.1
  81. + # - created by Andrew MacIntyre, 2001/7/14
  82. + #
  83. + # This makefile compiles and tests the Imaging core library.
  84. + #
  85. + # To build with the IJG JPEG and ZLIB libraries, you may have
  86. + # to change the JPEGINCLUDE setting.
  87. + #
  88. + # Copyright (c) Fredrik Lundh 1995-96.  All rights reserved.
  89. + # Copyright (c) Secret Labs AB 1996-97.
  90. + #
  91. + # See the README file for information on usage and redistribution.
  92. + #
  93. + all: imaging.lib
  94. + #JPEGINCLUDE=    -I../jpeg-6a
  95. + #ZLIBINCLUDE=    -I../zlib
  96. + CC=        gcc
  97. + CFLAGS=        -Zmt -s -O2
  98. + OUTLIB=        imaging.a
  99. + OMFLIB=        imaging.lib
  100. + OBJS=        Access.o\
  101. +         Bands.o\
  102. +         BitDecode.o\
  103. +         Blend.o\
  104. +         Chops.o\
  105. +         Convert.o\
  106. +         ConvertYCbCr.o\
  107. +         Copy.o\
  108. +         Crc32.o\
  109. +         Crop.o\
  110. +         Dib.o\
  111. +         Draw.o\
  112. +         Effects.o\
  113. +         EpsEncode.o\
  114. +         Except.o\
  115. +         File.o\
  116. +         Fill.o\
  117. +         Filter.o\
  118. +         FliDecode.o\
  119. +         Geometry.o\
  120. +         GetBBox.o\
  121. +         GifDecode.o\
  122. +         GifEncode.o\
  123. +         HexDecode.o\
  124. +         Histo.o\
  125. +         JpegDecode.o\
  126. +         JpegEncode.o\
  127. +         LzwDecode.o\
  128. +         Matrix.o\
  129. +         MspDecode.o\
  130. +         Negative.o\
  131. +         Offset.o\
  132. +         Pack.o\
  133. +         PackDecode.o\
  134. +         Palette.o\
  135. +         Paste.o\
  136. +         Quant.o\
  137. +         QuantHash.o\
  138. +         QuantHeap.o\
  139. +         PcdDecode.o\
  140. +         PcxDecode.o\
  141. +         PcxEncode.o\
  142. +         Point.o\
  143. +         RawDecode.o\
  144. +         RawEncode.o\
  145. +         Storage.o\
  146. +         SunRleDecode.o\
  147. +         TgaRleDecode.o\
  148. +         Unpack.o\
  149. +         UnpackYCC.o\
  150. +         XbmDecode.o\
  151. +         XbmEncode.o\
  152. +         ZipDecode.o\
  153. +         ZipEncode.o
  154. + $(OUTLIB):    $(OBJS)
  155. +         ar -crs $(OUTLIB) $(OBJS)
  156. + $(OMFLIB):    $(OUTLIB)
  157. +         emxomf -l -o $(OMFLIB) $(OUTLIB)
  158. + coretest.exe: coretest.c $(OUTLIB)
  159. +     $(CC) $(CFLAGS) -o coretest.exe coretest.c $(OUTLIB)
  160. + test:    coretest.exe
  161. +     coretest.exe
  162. Binary files Imaging-1.1.2/libImaging/wedge.ppm and Imaging-1.1.2-os2emx/libImaging/wedge.ppm differ
  163. diff -crN Imaging-1.1.2/setup.py Imaging-1.1.2-os2emx/setup.py
  164. *** Imaging-1.1.2/setup.py    Thu Jan  1 00:00:00 1970
  165. --- Imaging-1.1.2-os2emx/setup.py    Sat Jul 14 21:37:58 2001
  166. ***************
  167. *** 0 ****
  168. --- 1,43 ----
  169. + #!/usr/bin/env python
  170. + # To use:
  171. + #       python setup.py install
  172. + #
  173. + import os, sys, string, re
  174. + from glob import glob
  175. + import distutils
  176. + from distutils.core import setup, Extension
  177. + headers = glob (os.path.join ("libImaging","*.h"))
  178. + # The version is set in Lib/numeric_version.py
  179. + #execfile(os.path.join('Lib','numeric_version.py'))
  180. + PIL_version = '1.1.2'
  181. + # You might need to add a case here for your system
  182. + #library_dir_list = []
  183. + setup (name = "PIL",
  184. +        version = PIL_version,
  185. +        maintainer = "Pythonware",
  186. +        maintainer_email = "image-sig@python.org",
  187. +        description = "Python Imaging Library",
  188. +        url = "http://www.pythonware.com/products/pil/",
  189. +        packages = [''],
  190. +        extra_path = 'PIL',
  191. +        package_dir = {'': 'PIL'},
  192. +        include_dirs = ['libImaging'],
  193. +        ext_modules = [Extension('_imaging',
  194. +                                 ['_imaging.c',
  195. +                  'decode.c',
  196. +                  'encode.c',
  197. +                  'map.c',
  198. +                  'display.c',
  199. +                  'outline.c',
  200. +                  'path.c'],
  201. +                 library_dirs = ['libImaging'],
  202. +                 libraries = ['imaging', 'jpeg', 'z']),
  203. +                      ]
  204. +        )
  205. + print "PIL Version", PIL_version
  206.