  
      def get_basefile(self, tex, fontsize, dpi=None):
          """
-diff -ruN matplotlib-1.4.3/setupext.py matplotlib-1.4.3-new/setupext.py
---- matplotlib-1.4.3/setupext.py	2015-02-15 19:46:36.000000000 -0800
-+++ matplotlib-1.4.3-new/setupext.py	2015-08-29 11:41:56.353841376 -0700
-@@ -942,7 +942,12 @@
+diff -ruN matplotlib-1.5.1/setupext.py matplotlib-1.5.1-new/setupext.py
+--- matplotlib-1.5.1/setupext.py	2016-01-10 20:06:08.000000000 -0700
++++ matplotlib-1.5.1-new/setupext.py	2016-04-19 01:48:04.000000000 -0600
+@@ -890,7 +890,12 @@
  
      def check(self):
          if sys.platform == 'win32':

             return 'Using unknown version found on system.'
 
         status, output = getstatusoutput("freetype-config --ftversion")
@@ -956,8 +961,14 @@
         if version is None or 'No such file or directory\ngrep:' in version:
             version = self.version_from_header()
 

+            min_version='2.3', version=version)
+        except: pass
+
         # pkg_config returns the libtool version rather than the
         # freetype version so we need to explicitly pass the version
         # to _check_for_pkg_config
         return self._check_for_pkg_config(
-            'freetype2', 'ft2build.h',
+            'freetype', 'freetype2/ft2build.h',
             min_version='2.3', version=version)
 
     def version_from_header(self):
