Commits

Fredrik Lundh committed df1c1f3 Merge

Merged in 64-bit Linux and Darwin build fixes from Laurence Rowe.

  • Participants
  • Parent commits 5c68247, f40cbad

Comments (0)

Files changed (2)

   - Added new compress_level and compress_type options to
     the PNG writer to get more control over ZIP compression
 
++ Add lib64 directories on Linux (from Laurence Rowe).
+
++ On Darwin look in /usr/x11 for freetype (from Laurence Rowe)..
+
 + Restored support for Python 2.2, for now.
 
 (1.2a0-20110108 snapshot)
 
 import glob, os, re, struct, sys
 
+try:
+    from platform import architecture
+except ImportError:
+    # Python 2.2
+    def architecture():
+        if isinstance(2**40, long):
+            return ("32bit", "")
+        else:
+            return ("64bit", "")
+
 # make it possible to run the setup script from another directory
 try:
     os.chdir(os.path.dirname(sys.argv[0]))
             # darwin ports installation directories
             add_directory(library_dirs, "/opt/local/lib")
             add_directory(include_dirs, "/opt/local/include")
+            # freetype2 ships with X11
+            add_directory(library_dirs, "/usr/x11/lib")
+            add_directory(include_dirs, "/usr/x11/include")
+
+        elif sys.platform == "linux2":
+            if architecture()[0] == "64bit":
+                add_directory(library_dirs, "/lib64")
+                add_directory(library_dirs, "/usr/lib64")
 
         add_directory(library_dirs, "/usr/local/lib")
         # FIXME: check /opt/stuff directories here?