Ticket #23980: patch-setup.py-py-pil.diff

File patch-setup.py-py-pil.diff, 2.7 KB (added by christopherglong@…, 15 years ago)
  • patch-setup.py

    old new  
    1 --- setup.py    2005-03-23 19:16:40.000000000 +0100
    2 +++ setup.py    2005-07-11 18:50:55.000000000 +0200
    3 @@ -28,11 +28,11 @@
     1--- setup.py.orig       2006-12-03 04:37:29.000000000 -0700
     2+++ setup.py    2009-09-18 19:58:45.000000000 -0600
     3@@ -33,12 +33,12 @@
    44 #
    55 # TIFF_ROOT = libinclude("/opt/tiff")
    66 
    7 -FREETYPE_ROOT = None
     7-TCL_ROOT = None
    88-JPEG_ROOT = None
    9 -TIFF_ROOT = None
    109-ZLIB_ROOT = None
    11 -TCL_ROOT = None
    12 +FREETYPE_ROOT = "__PREFIX__/lib/", "__PREFIX__/include/freetype2/"
     10-TIFF_ROOT = None
     11-FREETYPE_ROOT = None
     12-LCMS_ROOT = None
     13+TCL_ROOT = "__PREFIX__/lib", "__PREFIX__/include"
    1314+JPEG_ROOT = "__PREFIX__/lib", "__PREFIX__/include"
    14 +TIFF_ROOT = "__PREFIX__/lib", "__PREFIX__/include"
    1515+ZLIB_ROOT = "__PREFIX__/lib", "__PREFIX__/include"
    16 +TCL_ROOT = "__PREFIX__/lib", "__PREFIX__/include"
     16+TIFF_ROOT = "__PREFIX__/lib", "__PREFIX__/include"
     17+FREETYPE_ROOT = "__PREFIX__/lib/", "__PREFIX__/include/freetype2/"
     18+LCMS_ROOT = "__PREFIX__/lib", "__PREFIX__/include"
    1719 
    1820 # FIXME: add mechanism to explicitly *disable* the use of a library
    1921 
     22@@ -331,30 +331,7 @@
     23                 "_imagingcms", ["_imagingcms.c"], libraries=["lcms"] + extra
     24                 ))
     25 
     26-        if sys.platform == "darwin":
     27-            # locate Tcl/Tk frameworks
     28-            frameworks = []
     29-            framework_roots = [
     30-                "/Library/Frameworks",
     31-                "/System/Library/Frameworks"
     32-                ]
     33-            for root in framework_roots:
     34-                if (os.path.exists(os.path.join(root, "Tcl.framework")) and
     35-                    os.path.exists(os.path.join(root, "Tk.framework"))):
     36-                    print "--- using frameworks at", root
     37-                    frameworks = ["-framework", "Tcl", "-framework", "Tk"]
     38-                    dir = os.path.join(root, "Tcl.framework", "Headers")
     39-                    add_directory(self.compiler.include_dirs, dir, 0)
     40-                    dir = os.path.join(root, "Tk.framework", "Headers")
     41-                    add_directory(self.compiler.include_dirs, dir, 1)
     42-                    break
     43-            if frameworks:
     44-                exts.append(Extension(
     45-                    "_imagingtk", ["_imagingtk.c", "Tk/tkImaging.c"],
     46-                    extra_compile_args=frameworks, extra_link_args=frameworks
     47-                    ))
     48-                feature.tcl = feature.tk = 1 # mark as present
     49-        elif feature.tcl and feature.tk:
     50+        if feature.tcl and feature.tk:
     51             exts.append(Extension(
     52                 "_imagingtk", ["_imagingtk.c", "Tk/tkImaging.c"],
     53                 libraries=[feature.tcl, feature.tk]