summaryrefslogtreecommitdiff
path: root/graphics/py-imaging/patches/patch-ab
blob: c1b148c59825f0400c72a4e24dca34d92968a39b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
$NetBSD: patch-ab,v 1.2 2003/06/07 15:11:22 jmmv Exp $

--- setup.py.orig	Thu Mar 14 20:55:04 2002
+++ setup.py	Tue Sep  3 21:53:45 2002
@@ -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"
 
 # on windows, the following is used to control how and where to search
@@ -61,6 +61,8 @@
                 LIBRARY_DIRS.append(JPEGDIR)
             else:
                 LIBRARIES.append("jpeg")
+		INCLUDE_DIRS.append(JPEGDIR + "/include")
+		LIBRARY_DIRS.append(JPEGDIR + "/lib")
         elif lib == "TIFF":
             HAVE_LIBTIFF = 1
             LIBRARIES.append("tiff")
@@ -109,56 +111,6 @@
                 break
 
 # --------------------------------------------------------------------
-# configure imagingtk module
-
-try:
-    import _tkinter
-    TCL_VERSION = _tkinter.TCL_VERSION[:3]
-except (ImportError, AttributeError):
-    pass
-else:
-    INCLUDE_DIRS = ["libImaging"]
-    LIBRARY_DIRS = ["libImaging"]
-    LIBRARIES = ["Imaging"]
-    if sys.platform == "win32":
-        # locate tcl/tk on windows
-        if TCLROOT:
-            path = [TCLROOT]
-        else:
-            path = [
-                os.path.join("/py" + PY_VERSION, "Tcl"),
-                os.path.join(os.environ.get("ProgramFiles", ""), "Tcl"),
-                # FIXME: add more directories here?
-                ]
-        for root in path:
-            TCLROOT = os.path.abspath(root)
-            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)
-
-        # 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])
-    else:
-        # assume the libraries are installed in the default location
-        LIBRARIES.extend(["tk" + TCL_VERSION, "tcl" + TCL_VERSION])
-
-    MODULES.append(
-        Extension(
-            "_imagingtk",
-            ["_imagingtk.c", "Tk/tkImaging.c"],
-            include_dirs=INCLUDE_DIRS,
-            library_dirs=LIBRARY_DIRS,
-            libraries=LIBRARIES
-            )
-        )
 
 # build!