this one fixes the problems I mentioned and uses tk.port.mk,
to go with the python diff I just sent. tested with gmapcatcher.

I can do the whitespace change in a separate commit.

ok?

Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/py-Imaging/Makefile,v
retrieving revision 1.45
diff -u -p -r1.45 Makefile
--- Makefile    10 Nov 2010 22:10:03 -0000      1.45
+++ Makefile    14 Nov 2010 15:35:40 -0000
@@ -5,16 +5,17 @@ SHARED_ONLY=          Yes
 COMMENT-main=          Python imaging library
 COMMENT-examples=      example programs for the Python Imaging Library
 COMMENT-bin=           binaries for the Python Imaging Library
+COMMENT-docs=          documentation for the Python Imaging Library
 
-VERSION=               1.1.6
-DISTNAME=              Imaging-${VERSION}
+MODPY_EGG_VERSION=     1.1.7
+DISTNAME=              Imaging-${MODPY_EGG_VERSION}
 PKGNAME-main=          py-${DISTNAME}
-REVISION-main=         3
-FULLPKGNAME-examples=  py-Imaging-examples-${VERSION}
+FULLPKGNAME-examples=  py-Imaging-examples-${MODPY_EGG_VERSION}
 EPOCH-examples=                0
 FULLPKGPATH-examples=  graphics/py-Imaging,-examples
-PKGNAME-bin=           py-Imaging-bin-${VERSION}
-REVISION-bin=          4
+PKGNAME-bin=           py-Imaging-bin-${MODPY_EGG_VERSION}
+FULLPKGNAME-docs=      py-Imaging-docs-${MODPY_EGG_VERSION}
+FULLPKGPATH-docs=      graphics/py-Imaging,-docs
 
 CATEGORIES=            graphics
 
@@ -26,18 +27,20 @@ PERMIT_PACKAGE_CDROM=       Yes
 PERMIT_PACKAGE_FTP=    Yes
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
-WANTLIB-main=          freetype tcl84 z jpeg.>=62 tk84
+
+WANTLIB-main=          freetype z jpeg.>=62 lcms ${MODTK_WANTLIB}
 
 MASTER_SITES=          http://effbot.org/media/downloads/
 
-MODULES=               lang/python
+MODULES=               lang/python x11/tk
 
 RUN_DEPENDS=           ${MODPY_TKINTER_DEPENDS}
 RUN_DEPENDS-bin=       ${RUN_DEPENDS} \
                        :py-Imaging-*:graphics/py-Imaging
 BUILD_DEPENDS=         ${RUN_DEPENDS}
 LIB_DEPENDS-main=      ::graphics/jpeg \
-                       :tk->=8.4,<8.5:x11/tk/8.4
+                       ::graphics/lcms \
+                       ${MODTK_LIB_DEPENDS}
 
 FLAVORS=               python2.4 python2.6
 FLAVOR?=               python2.6
@@ -45,7 +48,7 @@ FLAVOR?=              python2.6
 .if ${FLAVOR:L:Mpython2.4} && !${FLAVOR:L:Npython2.4}
 MULTI_PACKAGES= -main
 .elif ${FLAVOR:L:Mpython2.6} && !${FLAVOR:L:Npython2.6}
-MULTI_PACKAGES= -main -examples -bin
+MULTI_PACKAGES= -main -examples -bin -docs
 .else
 ERRORS+=               "Fatal: You must select one version: ${FLAVORS}"
 .endif
@@ -53,9 +56,6 @@ ERRORS+=              "Fatal: You must select one ve
 MODPY_VERSION=         ${FLAVOR:S/python//}
 MODPY_ADJ_FILES=       Scripts/pil*.py
 
-do-configure:
-       ${SUBST_CMD} ${WRKSRC}/setup.py ${WRKSRC}/Scripts/pilfont.py
-
 INCDIR=${PREFIX}/include/python${MODPY_VERSION}
 post-install:
        ${INSTALL_SCRIPT_DIR} ${PREFIX}/share/examples/py-Imaging
@@ -66,14 +66,14 @@ post-install:
        for file in ${WRKSRC}/Scripts/pil*.py; do \
                ${INSTALL_SCRIPT} $$file ${PREFIX}/bin/`basename $$file .py`; \
        done
-       find ${WRKINST} -name \*.egg-info -exec rm {} \;
        ${INSTALL_DATA_DIR} ${INCDIR}
        ${INSTALL_DATA} ${WRKSRC}/libImaging/ImPlatform.h ${INCDIR}
        ${INSTALL_DATA} ${WRKSRC}/libImaging/Imaging.h ${INCDIR}
+       ${INSTALL_SCRIPT_DIR} ${PREFIX}/share/doc/py-Imaging
+       ${INSTALL_SCRIPT} ${WRKSRC}/Docs/* ${PREFIX}/share/doc/py-Imaging
 
 do-regress: fake
-       @cd ${WRKSRC} && \
-               ${MAKE_ENV} PYTHONPATH=${WRKINST}${MODPY_SITEPKG}/PIL \
-               ${MODPY_BIN} ./selftest.py
+       @cd ${WRKSRC} && ${SETENV} PYTHONPATH=${WRKINST}${MODPY_SITEPKG} \
+               ${REGRESS_ENV} ${MODPY_BIN} ./selftest.py
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/graphics/py-Imaging/distinfo,v
retrieving revision 1.7
diff -u -p -r1.7 distinfo
--- distinfo    1 Sep 2008 19:13:05 -0000       1.7
+++ distinfo    14 Nov 2010 15:35:40 -0000
@@ -1,5 +1,5 @@
-MD5 (Imaging-1.1.6.tar.gz) = OptcIMpS8KmQBRLSxzR2Ig==
-RMD160 (Imaging-1.1.6.tar.gz) = M2u5JILrgz5bscnoweWFyb3DONE=
-SHA1 (Imaging-1.1.6.tar.gz) = lS0kHkr4ugn3TmkmEIt8DHSND4k=
-SHA256 (Imaging-1.1.6.tar.gz) = fdc1irUZFhlnyDjfJ0ZSgtGAoyBvaTui22QnPWiLP5A=
-SIZE (Imaging-1.1.6.tar.gz) = 435854
+MD5 (Imaging-1.1.7.tar.gz) = /BSlThzgKgIlvohUv7pHjg==
+RMD160 (Imaging-1.1.7.tar.gz) = mvVw/hAOJQpIYDFDQf4+bWldf94=
+SHA1 (Imaging-1.1.7.tar.gz) = dsN1BCURcf2o2o5j7Li8QqaaXIE=
+SHA256 (Imaging-1.1.7.tar.gz) = iVvHwkmMjh+bmZOPGkDchrPxSXQfEFz3x70uByVAUhE=
+SIZE (Imaging-1.1.7.tar.gz) = 498749
Index: patches/patch-Scripts_pilfont_py
===================================================================
RCS file: /cvs/ports/graphics/py-Imaging/patches/patch-Scripts_pilfont_py,v
retrieving revision 1.2
diff -u -p -r1.2 patch-Scripts_pilfont_py
--- patches/patch-Scripts_pilfont_py    10 Nov 2010 22:10:03 -0000      1.2
+++ patches/patch-Scripts_pilfont_py    14 Nov 2010 15:35:40 -0000
@@ -1,9 +1,10 @@
+XXX for MODPY_ADJ_FILES
+
 $OpenBSD: patch-Scripts_pilfont_py,v 1.2 2010/11/10 22:10:03 jasper Exp $
---- Scripts/pilfont.py.orig    Wed Nov 10 23:03:57 2010
-+++ Scripts/pilfont.py Wed Nov 10 23:04:16 2010
-@@ -1,4 +1,4 @@
--#
-+#!${MODPY_BIN}
- # The Python Imaging Library
- # $Id: patch-Scripts_pilfont_py,v 1.2 2010/11/10 22:10:03 jasper Exp $
+--- Scripts/pilfont.py.orig    Sun Nov  1 05:44:12 2009
++++ Scripts/pilfont.py Sun Nov 14 15:30:26 2010
+@@ -1,3 +1,4 @@
++#! /usr/local/bin/python
  #
+ # The Python Imaging Library
+ # $Id$
Index: patches/patch-Tk_tkImaging_c
===================================================================
RCS file: /cvs/ports/graphics/py-Imaging/patches/patch-Tk_tkImaging_c,v
retrieving revision 1.4
diff -u -p -r1.4 patch-Tk_tkImaging_c
--- patches/patch-Tk_tkImaging_c        5 Sep 2010 13:04:43 -0000       1.4
+++ patches/patch-Tk_tkImaging_c        14 Nov 2010 15:35:40 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-Tk_tkImaging_c,v 1.4 2010/09/05 13:04:43 sthen Exp $
---- Tk/tkImaging.c.orig        Sun Dec  3 11:37:29 2006
-+++ Tk/tkImaging.c     Sun Sep  5 13:59:42 2010
-@@ -240,8 +240,8 @@ PyImagingPhotoGet(ClientData clientdata, Tcl_Interp* i
+--- Tk/tkImaging.c.orig        Sun Nov  1 05:44:12 2009
++++ Tk/tkImaging.c     Sat Nov 13 14:56:09 2010
+@@ -258,8 +258,8 @@ PyImagingPhotoGet(ClientData clientdata, Tcl_Interp* i
  void
  TkImaging_Init(Tcl_Interp* interp)
  {
Index: patches/patch-selftest_py
===================================================================
RCS file: patches/patch-selftest_py
diff -N patches/patch-selftest_py
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-selftest_py   14 Nov 2010 15:35:40 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- selftest.py.orig   Sun Nov 14 16:59:57 2010
++++ selftest.py        Sun Nov 14 17:00:03 2010
+@@ -3,7 +3,7 @@
+ ROOT = "."
+ 
+ import os, sys
+-sys.path.insert(0, ROOT)
++sys.path.insert(0, os.getenv("PYTHONPATH"))
+ 
+ from PIL import Image
+ from PIL import ImageDraw
Index: patches/patch-setup_py
===================================================================
RCS file: /cvs/ports/graphics/py-Imaging/patches/patch-setup_py,v
retrieving revision 1.4
diff -u -p -r1.4 patch-setup_py
--- patches/patch-setup_py      10 Nov 2010 22:10:03 -0000      1.4
+++ patches/patch-setup_py      14 Nov 2010 15:35:40 -0000
@@ -1,27 +1,42 @@
 $OpenBSD: patch-setup_py,v 1.4 2010/11/10 22:10:03 jasper Exp $
---- setup.py.orig      Sun Dec  3 11:37:29 2006
-+++ setup.py   Sun Sep  5 13:59:42 2010
-@@ -199,6 +199,9 @@ class pil_build_ext(build_ext):
+--- setup.py.orig      Sun Nov 15 21:06:10 2009
++++ setup.py   Sun Nov 14 17:21:14 2010
+@@ -160,6 +160,13 @@ class pil_build_ext(build_ext):
+ 
+         if _tkinter:
+             TCL_VERSION = _tkinter.TCL_VERSION[:3]
++            TK_VERSION = _tkinter.TK_VERSION[:3]
++            add_directory(include_dirs,
++                          os.path.join(os.getenv("LOCALBASE"),
++                                       "include/tcl%s" % TCL_VERSION))
++            add_directory(include_dirs,
++                          os.path.join(os.getenv("LOCALBASE"),
++                                       "include/tk%s" % TK_VERSION))
+ 
+         if _tkinter and not TCL_ROOT:
+             # we have Tkinter but the TCL_ROOT variable was not set;
+@@ -214,6 +221,11 @@ class pil_build_ext(build_ext):
          add_directory(library_dirs, "/usr/lib")
          add_directory(include_dirs, "/usr/include")
  
-+      add_directory(library_dirs, "${X11BASE}/lib")
-+      add_directory(include_dirs, "${X11BASE}/include")
++        add_directory(library_dirs,
++                      os.path.join(os.getenv("X11BASE"), "lib"))
++        add_directory(include_dirs,
++                      os.path.join(os.getenv("X11BASE"), "include"))
 +
          #
          # insert new dirs *before* default libs, to avoid conflicts
          # between Python PYD stub libs and real libraries
-@@ -328,7 +331,8 @@ class pil_build_ext(build_ext):
-         elif feature.tcl and feature.tk:
+@@ -314,7 +326,7 @@ class pil_build_ext(build_ext):
+             if feature.freetype_version == 20:
+                 defs.append(("USE_FREETYPE_2_0", None))
              exts.append(Extension(
-                 "_imagingtk", ["_imagingtk.c", "Tk/tkImaging.c"],
--                libraries=[feature.tcl, feature.tk]
-+                libraries=[feature.tcl, feature.tk],
-+              include_dirs=["${LOCALBASE}/include/tk8.4", 
"${LOCALBASE}/include/tcl8.4", "${X11BASE}/include"]
+-                "_imagingft", ["_imagingft.c"], libraries=["freetype"],
++                "_imagingft", ["_imagingft.c"], libraries=["freetype", "z"],
+                 define_macros=defs
                  ))
  
-         if os.path.isfile("_imagingmath.c"):
-@@ -451,7 +455,6 @@ if __name__ == "__main__":
+@@ -481,7 +493,6 @@ if __name__ == "__main__":
          package_dir={"": "PIL"},
          packages=[""],
          platforms="Python 1.5.2 and later.",
Index: pkg/DESCR-docs
===================================================================
RCS file: pkg/DESCR-docs
diff -N pkg/DESCR-docs
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-docs      14 Nov 2010 15:35:40 -0000
@@ -0,0 +1 @@
+Python Imaging Library (PIL) documentation.
Index: pkg/PLIST-docs
===================================================================
RCS file: pkg/PLIST-docs
diff -N pkg/PLIST-docs
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-docs      14 Nov 2010 15:35:40 -0000
@@ -0,0 +1,77 @@
+...@comment $OpenBSD$
+share/doc/py-Imaging/
+share/doc/py-Imaging/effbot.css
+share/doc/py-Imaging/index.html
+share/doc/py-Imaging/pythondoc-PIL.ArgImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.BdfFontFile.html
+share/doc/py-Imaging/pythondoc-PIL.BmpImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.BufrStubImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.ContainerIO.html
+share/doc/py-Imaging/pythondoc-PIL.CurImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.DcxImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.EpsImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.ExifTags.html
+share/doc/py-Imaging/pythondoc-PIL.FitsStubImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.FliImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.FontFile.html
+share/doc/py-Imaging/pythondoc-PIL.FpxImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.GbrImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.GdImageFile.html
+share/doc/py-Imaging/pythondoc-PIL.GifImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.GimpGradientFile.html
+share/doc/py-Imaging/pythondoc-PIL.GimpPaletteFile.html
+share/doc/py-Imaging/pythondoc-PIL.GribStubImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.Hdf5StubImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.IcnsImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.IcoImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.ImImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.Image.html
+share/doc/py-Imaging/pythondoc-PIL.ImageChops.html
+share/doc/py-Imaging/pythondoc-PIL.ImageColor.html
+share/doc/py-Imaging/pythondoc-PIL.ImageDraw.html
+share/doc/py-Imaging/pythondoc-PIL.ImageEnhance.html
+share/doc/py-Imaging/pythondoc-PIL.ImageFile.html
+share/doc/py-Imaging/pythondoc-PIL.ImageFileIO.html
+share/doc/py-Imaging/pythondoc-PIL.ImageFilter.html
+share/doc/py-Imaging/pythondoc-PIL.ImageFont.html
+share/doc/py-Imaging/pythondoc-PIL.ImageGL.html
+share/doc/py-Imaging/pythondoc-PIL.ImageGrab.html
+share/doc/py-Imaging/pythondoc-PIL.ImageOps.html
+share/doc/py-Imaging/pythondoc-PIL.ImagePalette.html
+share/doc/py-Imaging/pythondoc-PIL.ImagePath.html
+share/doc/py-Imaging/pythondoc-PIL.ImageSequence.html
+share/doc/py-Imaging/pythondoc-PIL.ImageStat.html
+share/doc/py-Imaging/pythondoc-PIL.ImageTk.html
+share/doc/py-Imaging/pythondoc-PIL.ImageTransform.html
+share/doc/py-Imaging/pythondoc-PIL.ImageWin.html
+share/doc/py-Imaging/pythondoc-PIL.ImtImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.IptcImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.JpegImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.McIdasImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.MicImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.MpegImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.MspImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.OleFileIO.html
+share/doc/py-Imaging/pythondoc-PIL.PSDraw.html
+share/doc/py-Imaging/pythondoc-PIL.PaletteFile.html
+share/doc/py-Imaging/pythondoc-PIL.PalmImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.PcdImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.PcfFontFile.html
+share/doc/py-Imaging/pythondoc-PIL.PcxImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.PdfImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.PixarImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.PngImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.PpmImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.PsdImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.SgiImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.SpiderImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.SunImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.TarIO.html
+share/doc/py-Imaging/pythondoc-PIL.TgaImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.TiffImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.TiffTags.html
+share/doc/py-Imaging/pythondoc-PIL.WalImageFile.html
+share/doc/py-Imaging/pythondoc-PIL.WmfImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.XVThumbImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.XbmImagePlugin.html
+share/doc/py-Imaging/pythondoc-PIL.XpmImagePlugin.html
Index: pkg/PLIST-examples
===================================================================
RCS file: /cvs/ports/graphics/py-Imaging/pkg/PLIST-examples,v
retrieving revision 1.6
diff -u -p -r1.6 PLIST-examples
--- pkg/PLIST-examples  26 Feb 2010 19:18:28 -0000      1.6
+++ pkg/PLIST-examples  14 Nov 2010 15:35:40 -0000
@@ -7,7 +7,6 @@ share/examples/py-Imaging/README
 share/examples/py-Imaging/enhancer.py
 share/examples/py-Imaging/explode.py
 share/examples/py-Imaging/gifmaker.py
-share/examples/py-Imaging/image2py.py
 share/examples/py-Imaging/painter.py
 share/examples/py-Imaging/pilconvert.py
 share/examples/py-Imaging/pildriver.py
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/graphics/py-Imaging/pkg/PLIST-main,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST-main
--- pkg/PLIST-main      3 Sep 2010 12:34:56 -0000       1.3
+++ pkg/PLIST-main      14 Nov 2010 15:35:40 -0000
@@ -57,6 +57,8 @@ lib/python${MODPY_VERSION}/site-packages
 lib/python${MODPY_VERSION}/site-packages/PIL/Image.pyc
 lib/python${MODPY_VERSION}/site-packages/PIL/ImageChops.py
 lib/python${MODPY_VERSION}/site-packages/PIL/ImageChops.pyc
+lib/python${MODPY_VERSION}/site-packages/PIL/ImageCms.py
+lib/python${MODPY_VERSION}/site-packages/PIL/ImageCms.pyc
 lib/python${MODPY_VERSION}/site-packages/PIL/ImageColor.py
 lib/python${MODPY_VERSION}/site-packages/PIL/ImageColor.pyc
 lib/python${MODPY_VERSION}/site-packages/PIL/ImageDraw.py
@@ -91,6 +93,8 @@ lib/python${MODPY_VERSION}/site-packages
 lib/python${MODPY_VERSION}/site-packages/PIL/ImageQt.pyc
 lib/python${MODPY_VERSION}/site-packages/PIL/ImageSequence.py
 lib/python${MODPY_VERSION}/site-packages/PIL/ImageSequence.pyc
+lib/python${MODPY_VERSION}/site-packages/PIL/ImageShow.py
+lib/python${MODPY_VERSION}/site-packages/PIL/ImageShow.pyc
 lib/python${MODPY_VERSION}/site-packages/PIL/ImageStat.py
 lib/python${MODPY_VERSION}/site-packages/PIL/ImageStat.pyc
 lib/python${MODPY_VERSION}/site-packages/PIL/ImageTk.py
@@ -115,6 +119,7 @@ lib/python${MODPY_VERSION}/site-packages
 lib/python${MODPY_VERSION}/site-packages/PIL/MspImagePlugin.pyc
 lib/python${MODPY_VERSION}/site-packages/PIL/OleFileIO.py
 lib/python${MODPY_VERSION}/site-packages/PIL/OleFileIO.pyc
+lib/python${MODPY_VERSION}/site-packages/PIL/PIL-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info
 lib/python${MODPY_VERSION}/site-packages/PIL/PSDraw.py
 lib/python${MODPY_VERSION}/site-packages/PIL/PSDraw.pyc
 lib/python${MODPY_VERSION}/site-packages/PIL/PaletteFile.py
@@ -164,6 +169,7 @@ lib/python${MODPY_VERSION}/site-packages
 lib/python${MODPY_VERSION}/site-packages/PIL/__init__.py
 lib/python${MODPY_VERSION}/site-packages/PIL/__init__.pyc
 lib/python${MODPY_VERSION}/site-packages/PIL/_imaging.so
+lib/python${MODPY_VERSION}/site-packages/PIL/_imagingcms.so
 lib/python${MODPY_VERSION}/site-packages/PIL/_imagingft.so
 lib/python${MODPY_VERSION}/site-packages/PIL/_imagingmath.so
 lib/python${MODPY_VERSION}/site-packages/PIL/_imagingtk.so

Reply via email to