Fix building and disable TKINTER on Darwin.diff -r1.38 -r1.39 pkgsrc/graphics/py-imaging/Makefile
(adam)
@@ -1,38 +1,37 @@ | @@ -1,38 +1,37 @@ | |||
1 | # $NetBSD: Makefile,v 1.38 2010/12/23 11:44:44 dsainty Exp $ | 1 | # $NetBSD: Makefile,v 1.39 2011/01/03 12:17:30 adam Exp $ | |
2 | 2 | |||
3 | DISTNAME= Imaging-1.1.7 | 3 | DISTNAME= Imaging-1.1.7 | |
4 | PKGNAME= ${PYPKGPREFIX}-imaging-1.1.7 | 4 | PKGNAME= ${PYPKGPREFIX}-imaging-1.1.7 | |
5 | PKGREVISION= 2 | 5 | PKGREVISION= 2 | |
6 | CATEGORIES= graphics python | 6 | CATEGORIES= graphics python | |
7 | MASTER_SITES= http://effbot.org/media/downloads/ | 7 | MASTER_SITES= http://effbot.org/media/downloads/ | |
8 | 8 | |||
9 | MAINTAINER= tsarna@NetBSD.org | 9 | MAINTAINER= tsarna@NetBSD.org | |
10 | HOMEPAGE= http://www.pythonware.com/products/pil/ | 10 | HOMEPAGE= http://www.pythonware.com/products/pil/ | |
11 | COMMENT= PIL, the Python Imaging Library | 11 | COMMENT= PIL, the Python Imaging Library | |
12 | 12 | |||
13 | PKG_DESTDIR_SUPPORT= user-destdir | 13 | PKG_DESTDIR_SUPPORT= user-destdir | |
14 | 14 | |||
15 | DIST_SUBDIR= python | 15 | DIST_SUBDIR= python | |
16 | PYDISTUTILSPKG= yes | 16 | PYDISTUTILSPKG= yes | |
17 | PY_PATCHPLIST= yes | 17 | PY_PATCHPLIST= yes | |
18 | 18 | |||
19 | FREETYPE_ROOT= "${BUILDLINK_PREFIX.freetype2}/lib","${BUILDLINK_PREFIX.freetype2}/include" | 19 | SUBST_CLASSES= fix-path | |
20 | 20 | SUBST_MESSAGE.fix-path= Fixing paths. | ||
21 | SUBST_CLASSES= ft2 | 21 | SUBST_STAGE.fix-path= pre-configure | |
22 | SUBST_SED.ft2= -e "s;FREETYPE_ROOT = None;FREETYPE_ROOT = ${FREETYPE_ROOT:Q};" | 22 | SUBST_FILES.fix-path= setup.py | |
23 | SUBST_FILES.ft2= setup.py | 23 | SUBST_SED.fix-path= -e 's,/usr/local,${PREFIX},' | |
24 | SUBST_MESSAGE.ft2= Fixing path to freetype2. | 24 | SUBST_SED.fix-path+= -e 's,FREETYPE_ROOT = None,FREETYPE_ROOT = libinclude("${BUILDLINK_PREFIX.freetype2}"),' | |
25 | SUBST_STAGE.ft2= pre-configure | |||
26 | 25 | |||
27 | INSTALLATION_DIRS= ${PYINC}/PIL | 26 | INSTALLATION_DIRS= ${PYINC}/PIL | |
28 | 27 | |||
29 | post-install: | 28 | post-install: | |
30 | ${INSTALL_DATA} ${WRKSRC}/libImaging/ImPlatform.h ${DESTDIR}${PREFIX}/${PYINC}/PIL | 29 | ${INSTALL_DATA} ${WRKSRC}/libImaging/ImPlatform.h ${DESTDIR}${PREFIX}/${PYINC}/PIL | |
31 | ${INSTALL_DATA} ${WRKSRC}/libImaging/Imaging.h ${DESTDIR}${PREFIX}/${PYINC}/PIL | 30 | ${INSTALL_DATA} ${WRKSRC}/libImaging/Imaging.h ${DESTDIR}${PREFIX}/${PYINC}/PIL | |
32 | 31 | |||
33 | .include "../../devel/zlib/buildlink3.mk" | 32 | .include "../../devel/zlib/buildlink3.mk" | |
34 | .include "../../graphics/freetype2/buildlink3.mk" | 33 | .include "../../graphics/freetype2/buildlink3.mk" | |
35 | .include "../../graphics/lcms/buildlink3.mk" | 34 | .include "../../graphics/lcms/buildlink3.mk" | |
36 | .include "../../lang/python/extension.mk" | 35 | .include "../../lang/python/extension.mk" | |
37 | .include "../../mk/jpeg.buildlink3.mk" | 36 | .include "../../mk/jpeg.buildlink3.mk" | |
38 | .include "../../mk/bsd.pkg.mk" | 37 | .include "../../mk/bsd.pkg.mk" |
@@ -1,7 +1,7 @@ | @@ -1,7 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.13 2010/07/19 17:45:02 drochner Exp $ | 1 | $NetBSD: distinfo,v 1.14 2011/01/03 12:17:30 adam Exp $ | |
2 | 2 | |||
3 | SHA1 (python/Imaging-1.1.7.tar.gz) = 76c37504251171fda8da8e63ecb8bc42a69a5c81 | 3 | SHA1 (python/Imaging-1.1.7.tar.gz) = 76c37504251171fda8da8e63ecb8bc42a69a5c81 | |
4 | RMD160 (python/Imaging-1.1.7.tar.gz) = 9af570fe100e250a4860314341fe3e6d695d7fde | 4 | RMD160 (python/Imaging-1.1.7.tar.gz) = 9af570fe100e250a4860314341fe3e6d695d7fde | |
5 | Size (python/Imaging-1.1.7.tar.gz) = 498749 bytes | 5 | Size (python/Imaging-1.1.7.tar.gz) = 498749 bytes | |
6 | SHA1 (patch-ab) = 563eff2d51db778711946734871f790643851086 | 6 | SHA1 (patch-ab) = 4d6b80cf6792c860baf7650b22263c441f057c89 | |
7 | SHA1 (patch-ac) = 2ad2a988c7fdddb34812959ddfd60442282a48ea | 7 | SHA1 (patch-ac) = 2ad2a988c7fdddb34812959ddfd60442282a48ea |
@@ -1,45 +1,34 @@ | @@ -1,45 +1,34 @@ | |||
1 | $NetBSD: patch-ab,v 1.6 2009/12/11 21:37:31 drochner Exp $ | 1 | $NetBSD: patch-ab,v 1.7 2011/01/03 12:17:31 adam Exp $ | |
2 | 2 | |||
3 | --- setup.py.orig 2009-11-15 17:06:10.000000000 +0100 | 3 | --- setup.py.orig 2009-11-15 17:06:10.000000000 +0100 | |
4 | +++ setup.py | 4 | +++ setup.py | |
5 | @@ -86,10 +86,7 @@ from distutils import sysconfig | 5 | @@ -86,10 +86,7 @@ from distutils import sysconfig | |
6 | from distutils.core import Extension, setup | 6 | from distutils.core import Extension, setup | |
7 | from distutils.command.build_ext import build_ext | 7 | from distutils.command.build_ext import build_ext | |
8 | 8 | |||
9 | -try: | 9 | -try: | |
10 | - import _tkinter | 10 | - import _tkinter | |
11 | -except ImportError: | 11 | -except ImportError: | |
12 | - _tkinter = None | 12 | - _tkinter = None | |
13 | +_tkinter = None | 13 | +_tkinter = None | |
14 | 14 | |||
15 | def add_directory(path, dir, where=None): | 15 | def add_directory(path, dir, where=None): | |
16 | if dir and os.path.isdir(dir) and dir not in path: | 16 | if dir and os.path.isdir(dir) and dir not in path: | |
17 | @@ -147,7 +144,7 @@ class pil_build_ext(build_ext): | 17 | @@ -331,7 +328,7 @@ class pil_build_ext(build_ext): | |
18 | add_directory(library_dirs, "/opt/local/lib") | 18 | "_imagingcms", ["_imagingcms.c"], libraries=["lcms"] + extra | |
19 | add_directory(include_dirs, "/opt/local/include") | 19 | )) | |
20 | 20 | |||
21 | - add_directory(library_dirs, "/usr/local/lib") | 21 | - if sys.platform == "darwin": | |
22 | +# add_directory(library_dirs, "/usr/local/lib") | 22 | + if _tkinter and sys.platform == "darwin": | |
23 | # FIXME: check /opt/stuff directories here? | 23 | # locate Tcl/Tk frameworks | |
24 | 24 | frameworks = [] | ||
25 | prefix = sysconfig.get_config_var("prefix") | 25 | framework_roots = [ | |
26 | @@ -208,8 +205,8 @@ class pil_build_ext(build_ext): | |||
27 | add_directory(include_dirs, tcl_dir) | |||
28 | ||||
29 | # standard locations | |||
30 | - add_directory(library_dirs, "/usr/local/lib") | |||
31 | - add_directory(include_dirs, "/usr/local/include") | |||
32 | +# add_directory(library_dirs, "/usr/local/lib") | |||
33 | +# add_directory(include_dirs, "/usr/local/include") | |||
34 | ||||
35 | add_directory(library_dirs, "/usr/lib") | |||
36 | add_directory(include_dirs, "/usr/include") | |||
37 | @@ -481,7 +478,7 @@ if __name__ == "__main__": | 26 | @@ -481,7 +478,7 @@ if __name__ == "__main__": | |
38 | package_dir={"": "PIL"}, | 27 | package_dir={"": "PIL"}, | |
39 | packages=[""], | 28 | packages=[""], | |
40 | platforms="Python 1.5.2 and later.", | 29 | platforms="Python 1.5.2 and later.", | |
41 | - scripts = glob.glob("Scripts/pil*.py"), | 30 | - scripts = glob.glob("Scripts/pil*.py"), | |
42 | +# scripts = glob.glob("Scripts/pil*.py"), | 31 | +# scripts = glob.glob("Scripts/pil*.py"), | |
43 | url=HOMEPAGE, | 32 | url=HOMEPAGE, | |
44 | version=VERSION, | 33 | version=VERSION, | |
45 | ) | 34 | ) |