- update py-Imaging to 1.17, from Alexander Shadchin

- use tk.port.mk and move to a more recent version of Tcl/Tk

mostly reads fine to fgsch@, and I've fixed the part which didn't.
This commit is contained in:
sthen 2010-11-15 20:57:10 +00:00
parent 1745732377
commit 369ef22d1b
10 changed files with 165 additions and 52 deletions

View File

@ -1,20 +1,21 @@
# $OpenBSD: Makefile,v 1.45 2010/11/10 22:10:03 jasper Exp $
# $OpenBSD: Makefile,v 1.46 2010/11/15 20:57:10 sthen Exp $
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 version: ${FLAVORS}"
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>

View File

@ -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

View File

@ -1,9 +1,12 @@
$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 $
$OpenBSD: patch-Scripts_pilfont_py,v 1.3 2010/11/15 20:57:10 sthen Exp $
patching this to use ${MODPY_BIN} is taken care of by
MODPY_ADJ_FILES in the port's Makefile.
--- 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: patch-Scripts_pilfont_py,v 1.3 2010/11/15 20:57:10 sthen Exp $

View File

@ -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
$OpenBSD: patch-Tk_tkImaging_c,v 1.5 2010/11/15 20:57:10 sthen Exp $
--- 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)
{

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-selftest_py,v 1.1 2010/11/15 20:57:10 sthen Exp $
--- 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

View File

@ -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):
$OpenBSD: patch-setup_py,v 1.5 2010/11/15 20:57:10 sthen Exp $
--- 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.",

View File

@ -0,0 +1 @@
Python Imaging Library (PIL) documentation.

View File

@ -0,0 +1,77 @@
@comment $OpenBSD: PLIST-docs,v 1.1 2010/11/15 20:57:10 sthen Exp $
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

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-examples,v 1.6 2010/02/26 19:18:28 espie Exp $
@comment $OpenBSD: PLIST-examples,v 1.7 2010/11/15 20:57:10 sthen Exp $
@pkgpath graphics/py-Imaging,-examples,python2.4
@pkgpath graphics/py-Imaging,-examples,python2.5
@pkgpath graphics/py-Imaging,-examples,python2.6
@ -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

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.3 2010/09/03 12:34:56 sthen Exp $
@comment $OpenBSD: PLIST-main,v 1.4 2010/11/15 20:57:10 sthen Exp $
@option no-default-conflict
@conflict py-Imaging-*-python${MODPY_VERSION}
@pkgpath graphics/py-Imaging
@ -57,6 +57,8 @@ lib/python${MODPY_VERSION}/site-packages/PIL/Image.py
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/PIL/ImageQt.py
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/PIL/MspImagePlugin.py
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/PIL/XpmImagePlugin.pyc
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