diff options
author | drochner <drochner@pkgsrc.org> | 2003-06-27 10:11:59 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2003-06-27 10:11:59 +0000 |
commit | a255fa18f62ce05c8086ef4908f702f8b1f9940b (patch) | |
tree | 6741859f56bce3ab025bc48aa357b4d085043e3d /graphics/py-imaging/patches | |
parent | e1f6018a66cd36279db94dfd735e1e4c54e9aa19 (diff) | |
download | pkgsrc-a255fa18f62ce05c8086ef4908f702f8b1f9940b.tar.gz |
update to 1.1.4
changes:
Version 1.1.4 adds improved build scripts, truetype/opentype font support,
memory mapping support also for non-Windows platforms, screen and clipboard
grabbing on Windows, support for CSS-style color strings, support for
IPTC/NAA and EXIF metadata, and more.
pkgsrc note:
We don't build the truetype component yet -- this might go into a separate
pkg to get more finegrained dependencies.
(Py-Imaging is supposed to work offline to, ie w/o X11.)
Diffstat (limited to 'graphics/py-imaging/patches')
-rw-r--r-- | graphics/py-imaging/patches/patch-ab | 171 |
1 files changed, 146 insertions, 25 deletions
diff --git a/graphics/py-imaging/patches/patch-ab b/graphics/py-imaging/patches/patch-ab index c1b148c5982..c8fe519aa5e 100644 --- a/graphics/py-imaging/patches/patch-ab +++ b/graphics/py-imaging/patches/patch-ab @@ -1,17 +1,17 @@ -$NetBSD: patch-ab,v 1.2 2003/06/07 15:11:22 jmmv Exp $ +$NetBSD: patch-ab,v 1.3 2003/06/27 10:12:00 drochner Exp $ ---- setup.py.orig Thu Mar 14 20:55:04 2002 -+++ setup.py Tue Sep 3 21:53:45 2002 +--- setup.py.orig 2003-05-09 14:00:56.000000000 +0200 ++++ setup.py 2003-06-24 14:34:28.000000000 +0200 @@ -23,7 +23,7 @@ # on windows, the build script expects to find both library files and # include files in the directories below. tweak as necessary. -JPEGDIR = "../../kits/jpeg-6b" -+JPEGDIR = "@JPEGDIR@" - ZLIBDIR = "../../kits/zlib-1.1.3" ++JPEGDIR = "/usr/pkg" + ZLIBDIR = "../../kits/zlib-1.1.4" + FREETYPEDIR = "../../kits/freetype-2.0" - # on windows, the following is used to control how and where to search -@@ -61,6 +61,8 @@ +@@ -69,6 +69,8 @@ LIBRARY_DIRS.append(JPEGDIR) else: LIBRARIES.append("jpeg") @@ -20,7 +20,7 @@ $NetBSD: patch-ab,v 1.2 2003/06/07 15:11:22 jmmv Exp $ elif lib == "TIFF": HAVE_LIBTIFF = 1 LIBRARIES.append("tiff") -@@ -109,56 +111,6 @@ +@@ -117,177 +119,6 @@ break # -------------------------------------------------------------------- @@ -35,6 +35,8 @@ $NetBSD: patch-ab,v 1.2 2003/06/07 15:11:22 jmmv Exp $ - INCLUDE_DIRS = ["libImaging"] - LIBRARY_DIRS = ["libImaging"] - LIBRARIES = ["Imaging"] +- EXTRA_COMPILE_ARGS = None +- EXTRA_LINK_ARGS = None - if sys.platform == "win32": - # locate tcl/tk on windows - if TCLROOT: @@ -50,30 +52,149 @@ $NetBSD: patch-ab,v 1.2 2003/06/07 15:11:22 jmmv Exp $ - if os.path.isfile(os.path.join(TCLROOT, "include", "tk.h")): - break - else: -- print "*** cannot find Tcl/Tk headers and library files" -- print " change the TCLROOT variable in the setup.py file" -- sys.exit(1) +- TCLROOT = None +- print "*** Cannot find Tcl/Tk headers and library files." +- print "*** To build the Tkinter interface, set the TCLROOT" +- print "*** variable in the setup.py file." - - # print "using Tcl/Tk libraries at", TCLROOT - # print "using Tcl/Tk version", TCL_VERSION - -- version = TCL_VERSION[0] + TCL_VERSION[2] -- INCLUDE_DIRS.append(os.path.join(TCLROOT, "include")) -- LIBRARY_DIRS.append(os.path.join(TCLROOT, "lib")) -- LIBRARIES.extend(["tk" + version, "tcl" + version]) +- if TCLROOT: +- version = TCL_VERSION[0] + TCL_VERSION[2] +- INCLUDE_DIRS.append(os.path.join(TCLROOT, "include")) +- LIBRARY_DIRS.append(os.path.join(TCLROOT, "lib")) +- LIBRARIES.extend(["tk" + version, "tcl" + version]) +- HAVE_TCLTK = 1 +- else: +- tk_framework_found = 0 +- if sys.platform == 'darwin': +- # First test for a MacOSX/darwin framework install +- from os.path import join, exists +- framework_dirs = [ +- '/System/Library/Frameworks/', +- '/Library/Frameworks', +- join(os.getenv('HOME'), '/Library/Frameworks') +- ] +- +- # Find the directory that contains the Tcl.framwork and Tk.framework +- # bundles. +- # XXX distutils should support -F! +- for F in framework_dirs: +- # both Tcl.framework and Tk.framework should be present +- for fw in 'Tcl', 'Tk': +- if not exists(join(F, fw + '.framework')): +- break +- else: +- # ok, F is now directory with both frameworks. Continure +- # building +- tk_framework_found = 1 +- break +- if tk_framework_found: +- # For 8.4a2, we must add -I options that point inside the Tcl and Tk +- # frameworks. In later release we should hopefully be able to pass +- # the -F option to gcc, which specifies a framework lookup path. +- # +- tk_include_dirs = [ +- join(F, fw + '.framework', H) +- for fw in 'Tcl', 'Tk' +- for H in 'Headers', 'Versions/Current/PrivateHeaders' +- ] +- +- # For 8.4a2, the X11 headers are not included. Rather than include a +- # complicated search, this is a hard-coded path. It could bail out +- # if X11 libs are not found... +- # tk_include_dirs.append('/usr/X11R6/include') +- INCLUDE_DIRS = INCLUDE_DIRS + tk_include_dirs +- frameworks = ['-framework', 'Tcl', '-framework', 'Tk'] +- EXTRA_COMPILE_ARGS = frameworks +- EXTRA_LINK_ARGS = frameworks +- HAVE_TCLTK = 1 +- +- if not tk_framework_found: +- # assume the libraries are installed in the default location +- LIBRARIES.extend(["tk" + TCL_VERSION, "tcl" + TCL_VERSION]) +- HAVE_TCLTK = 1 +- +- if HAVE_TCLTK: +- MODULES.append( +- Extension( +- "_imagingtk", +- ["_imagingtk.c", "Tk/tkImaging.c"], +- include_dirs=INCLUDE_DIRS, +- library_dirs=LIBRARY_DIRS, +- libraries=LIBRARIES +- ) +- ) +- +-# -------------------------------------------------------------------- +-# configure imagingft module +- +-if os.path.isdir(FREETYPEDIR) or os.name == "posix": +- +- FILES = [] +- INCLUDE_DIRS = ["libImaging"] +- LIBRARY_DIRS = [] +- LIBRARIES = [] +- have_freetype = 1 # Assume we have it, unless proven otherwise +- +- # use source distribution, if available +- for file in [ +- "src/autohint/autohint.c", +- "src/base/ftbase.c", +- #"src/cache/ftcache.c", +- "src/cff/cff.c", +- "src/cid/type1cid.c", +- "src/psaux/psaux.c", +- "src/psnames/psnames.c", +- "src/raster/raster.c", +- "src/sfnt/sfnt.c", +- "src/smooth/smooth.c", +- "src/truetype/truetype.c", +- "src/type1/type1.c", +- "src/winfonts/winfnt.c", +- "src/base/ftsystem.c", +- "src/base/ftinit.c", +- "src/base/ftglyph.c" +- ]: +- file = os.path.join(FREETYPEDIR, file) +- if os.path.isfile(file): +- FILES.append(file) +- else: +- FILES = [] +- break +- +- if FILES: +- INCLUDE_DIRS.append(os.path.join(FREETYPEDIR, "include")) +- INCLUDE_DIRS.append(os.path.join(FREETYPEDIR, "src")) +- elif os.path.isdir("/usr/include/freetype2"): +- # assume that the freetype library is installed in a +- # standard location +- # FIXME: search for libraries +- LIBRARIES.append("freetype") +- INCLUDE_DIRS.append("/usr/include/freetype2") +- elif os.path.isdir("/sw/include/freetype2"): +- # assume that the freetype library is installed in a +- # standard location +- # FIXME: search for libraries +- LIBRARIES.append("freetype") +- INCLUDE_DIRS.append("/sw/include/freetype2") +- LIBRARY_DIRS.append("/sw/lib") - else: -- # assume the libraries are installed in the default location -- LIBRARIES.extend(["tk" + TCL_VERSION, "tcl" + TCL_VERSION]) +- have_freetype = 0 - -- MODULES.append( -- Extension( -- "_imagingtk", -- ["_imagingtk.c", "Tk/tkImaging.c"], -- include_dirs=INCLUDE_DIRS, -- library_dirs=LIBRARY_DIRS, -- libraries=LIBRARIES +- if have_freetype: +- MODULES.append( +- Extension( +- "_imagingft", +- ["_imagingft.c"] + FILES, +- include_dirs=INCLUDE_DIRS, +- library_dirs=LIBRARY_DIRS, +- libraries=LIBRARIES, +- extra_compile_args=EXTRA_COMPILE_ARGS, +- extra_link_args=EXTRA_LINK_ARGS +- ) - ) -- ) # build! |