pil-systempython25 stable port information

Package: pil-systempython25
Version: 1.1.6
Revision: 2
Distribution: 10.5, 10.6
Description: Python Imaging Library
DescDetail: <<
The Python Imaging Library (PIL) adds image processing capabilities to
your Python interpreter. This library supports many file formats, and
provides powerful image processing and graphics capabilities.
<<
Source: http://effbot.org/downloads/Imaging-%v.tar.gz
Source-MD5: 3a9b5c20ca52f0a9900512d2c7347622
BuildDepends: libpng3, libjpeg, freetype219, fink (>= 0.24.12)
Depends: libpng3-shlibs, libjpeg-shlibs, freetype219-shlibs
NoSetCPPFLAGS: true
NoSetLDFLAGS: true
Replaces: pil
Provides: pil
GCC: 4.0
PatchFile: %n.patch
PatchFile-MD5: 91f1a62d996f63771e4e0bf01e128231
PatchScript: <<
sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p1
patch -p1 < `dirname %{PatchFile}`/TkAlpha-Imaging-1.1.6.patch
## FIXME: use PatchFileN when it gets released
<<
CompileScript: <<
ARCHFLAGS=" " /usr/bin/python setup.py build
<<
InstallScript: <<
#!/bin/sh -ev
/usr/bin/python setup.py install --prefix=%p --root=%d --install-purelib=%p/Library/Python/2.5/site-packages --install-platlib=%p/Library/Python/2.5/site-packages
mkdir -p %i/share/doc/%n
cp -R Docs/ %i/share/doc/%n/html
cp -R Scripts %i/share/doc/%n
mkdir -p %i/Library/Python/2.5/include/python2.5/PIL
cp -f libImaging/ImPlatform.h libImaging/Imaging.h %i/Library/Python/2.5/include/python2.5/PIL
<<
RuntimeVars: <<
PYTHONPATH: %p/Library/Python/2.5/site-packages
<<
DocFiles: CHANGES BUILDME CONTENTS README
DescUsage: <<
The package sets the runtime environment variable PYTHONPATH to
%p/Library/Python/2.5/site-packages, so that /usr/bin/python
will find PIL modules with commands like

from PIL import Image

If, however, you want to run a script that uses only

import Image

then you need to set PYTHONPATH to
%p/Library/Python/2.5/site-packages/PIL:$PYTHONPATH
<<
License: OSI-Approved
Homepage: http://www.pythonware.com/products/pil
Maintainer: Martin Costabel

pil-systempython25 stable port .patch

diff -Nurd -x'*~' Imaging-1.1.6.orig/setup.py Imaging-1.1.6/setup.py
--- Imaging-1.1.6.orig/setup.py 2006-12-03 06:37:29.000000000 -0500
+++ Imaging-1.1.6/setup.py 2008-08-12 15:01:14.000000000 -0400
@@ -136,17 +136,9 @@
# fink installation directories
- add_directory(library_dirs, "/sw/lib")
- add_directory(include_dirs, "/sw/include")
- # darwin ports installation directories
- add_directory(library_dirs, "/opt/local/lib")
- add_directory(include_dirs, "/opt/local/include")
+ add_directory(library_dirs, "@PREFIX@/lib")
+ add_directory(include_dirs, "@PREFIX@/include")

- add_directory(library_dirs, "/usr/local/lib")
# FIXME: check /opt/stuff directories here?

- prefix = sysconfig.get_config_var("prefix")
- if prefix:
- add_directory(library_dirs, os.path.join(prefix, "lib"))
- add_directory(include_dirs, os.path.join(prefix, "include"))

#
# locate tkinter libraries
@@ -193,8 +185,10 @@
#
# add standard directories

- add_directory(library_dirs, "/usr/local/lib")
- add_directory(include_dirs, "/usr/local/include")
+ prefix = sysconfig.get_config_var("prefix")
+ if prefix:
+ add_directory(library_dirs, os.path.join(prefix, "lib"))
+ add_directory(include_dirs, os.path.join(prefix, "include"))

add_directory(library_dirs, "/usr/lib")
add_directory(include_dirs, "/usr/include")
--- Imaging-1.1.6/Scripts/pildriver.py~ 2006-12-03 12:37:18.000000000 +0100
+++ Imaging-1.1.6/Scripts/pildriver.py 2008-11-08 21:41:12.000000000 +0100
@@ -48,7 +48,8 @@
# 3. Add support for composing and decomposing multiple-image files.
#

-import Image, string
+from PIL import Image
+import string

class PILDriver:

@@ -204,7 +205,7 @@

Process the top image with the given filter.
"""
- import ImageFilter
+ from PIL import ImageFilter
filter = eval("ImageFilter." + string.upper(self.do_pop()))
image = self.do_pop()
self.push(image.filter(filter))
@@ -349,7 +350,7 @@

Invert the top image.
"""
- import ImageChops
+ from PIL import ImageChops
self.push(ImageChops.invert(self.do_pop()))

def do_lighter(self):
@@ -357,7 +358,7 @@

Pop the two top images, push an image of the lighter pixels of both.
"""
- import ImageChops
+ from PIL import ImageChops
image1 = self.do_pop()
image2 = self.do_pop()
self.push(ImageChops.lighter(image1, image2))
@@ -367,7 +368,7 @@

Pop the two top images, push an image of the darker pixels of both.
"""
- import ImageChops
+ from PIL import ImageChops
image1 = self.do_pop()
image2 = self.do_pop()
self.push(ImageChops.darker(image1, image2))
@@ -377,7 +378,7 @@

Pop the two top images, push the difference image
"""
- import ImageChops
+ from PIL import ImageChops
image1 = self.do_pop()
image2 = self.do_pop()
self.push(ImageChops.difference(image1, image2))
@@ -387,7 +388,7 @@

Pop the two top images, push the multiplication image.
"""
- import ImageChops
+ from PIL import ImageChops
image1 = self.do_pop()
image2 = self.do_pop()
self.push(ImageChops.multiply(image1, image2))
@@ -397,7 +398,7 @@

Pop the two top images, superimpose their inverted versions.
"""
- import ImageChops
+ from PIL import ImageChops
image2 = self.do_pop()
image1 = self.do_pop()
self.push(ImageChops.screen(image1, image2))
@@ -407,7 +408,7 @@

Pop the two top images, produce the scaled sum with offset.
"""
- import ImageChops
+ from PIL import ImageChops
image1 = self.do_pop()
image2 = self.do_pop()
scale = float(self.do_pop())
@@ -419,8 +420,8 @@

Pop the two top images, produce the scaled difference with offset.
"""
- import ImageChops
- image1 = self.do_pop()
+ from PIL import ImageChops
+ image1 = self.do_pop()
image2 = self.do_pop()
scale = float(self.do_pop())
offset = int(self.do_pop())
@@ -433,7 +434,7 @@

Enhance color in the top image.
"""
- import ImageEnhance
+ from PIL import ImageEnhance
factor = float(self.do_pop())
image = self.do_pop()
enhancer = ImageEnhance.Color(image)
@@ -444,7 +445,7 @@

Enhance contrast in the top image.
"""
- import ImageEnhance
+ from PIL import ImageEnhance
factor = float(self.do_pop())
image = self.do_pop()
enhancer = ImageEnhance.Color(image)
@@ -455,7 +456,7 @@

Enhance brightness in the top image.
"""
- import ImageEnhance
+ from PIL import ImageEnhance
factor = float(self.do_pop())
image = self.do_pop()
enhancer = ImageEnhance.Color(image)
@@ -466,7 +467,7 @@

Enhance sharpness in the top image.
"""
- import ImageEnhance
+ from PIL import ImageEnhance
factor = float(self.do_pop())
image = self.do_pop()
enhancer = ImageEnhance.Color(image)
--- Imaging-1.1.6/Scripts/pilprint.py~ 2006-12-03 12:37:18.000000000 +0100
+++ Imaging-1.1.6/Scripts/pilprint.py 2008-11-08 21:43:00.000000000 +0100
@@ -13,8 +13,8 @@

VERSION = "pilprint 0.3/2003-05-05"

-import Image
-import PSDraw
+from PIL import Image
+from PIL import PSDraw

letter = ( 1.0*72, 1.0*72, 7.5*72, 10.0*72 )

pil-systempython25 _unstable_ port .patch