Commits

tanoku  committed 82c0125

Fixed MacOS X Configuration

  • Participants
  • Parent commits e3ca145
  • Branches pygame-ftmod

Comments (0)

Files changed (2)

File config_darwin.py

 import os, sys, string
 from glob import glob
 from distutils.sysconfig import get_python_inc
+from config_unix import DependencyProg
 
 class Dependency:
     libext = '.a'
     Dependency('SCRAP', '','',[]),
     Dependency('PORTMIDI', 'portmidi.h', 'libportmidi', ['portmidi']),
     FrameworkDependency('PORTTIME', 'CoreMidi.h', 'CoreMidi', 'CoreMidi'),
+    DependencyProg('FREETYPE', 'FREETYPE_CONFIG', 'freetype-config', '2.0', ['freetype'], '--ftversion')
 ]
 
 
     global DEPS
 
     print ('Hunting dependencies...')
-    incdirs = ['/usr/local/include','/opt/local/include']
+    incdirs = ['/usr/local/include','/opt/local/include', '/opt/local/include/freetype2/freetype']
     libdirs = ['/usr/local/lib','/opt/local/lib']
     newconfig = []
     for d in DEPS:

File src/freetype/freetype.c

             goto end;
         }
 
-        if (PGFT_TryLoadFont_RWops(ft, font, source, 0, face_index) != 0);
+        if (PGFT_TryLoadFont_RWops(ft, font, source, face_index) != 0);
         {
             PyErr_SetString(PyExc_RuntimeError, PGFT_GetError(ft));
             goto end;
     }
 
 end:
+
     if (file != original_file)
+    {
         Py_XDECREF(file);
+    }
 
     return PyErr_Occurred() ? -1 : 0;
 }
     return PyBool_FromLong((FREETYPE_MOD_STATE (self)->freetype != NULL));
 }
 
-
 static int
 _ft_traverse (PyObject *mod, visitproc visit, void *arg)
 {