--- buildconfig/config_darwin.py.orig	2021-12-27 11:57:00.000000000 +1100
+++ buildconfig/config_darwin.py	2022-01-01 20:11:59.000000000 +1100
@@ -9,6 +9,7 @@
 except ImportError:
     from buildconfig.config_unix import DependencyProg
 
+localbase = os.environ.get('LOCALBASE', '')
 
 try:
     basestring_ = basestring
@@ -57,7 +58,7 @@
 
 class FrameworkDependency(Dependency):
     def configure(self, incdirs, libdirs):
-        BASE_DIRS = '/', os.path.expanduser('~/'), '/System/'
+        BASE_DIRS = '/System/',
         for n in BASE_DIRS:
             n += 'Library/Frameworks/'
             fmwk = n + self.libs + '.framework/Versions/Current/'
@@ -146,16 +147,13 @@
     ])
 
     print ('Hunting dependencies...')
-    incdirs = ['/usr/local/include', '/opt/homebrew/include']
-    incdirs.extend(['/usr/local/include/SDL2', '/opt/homebrew/include/SDL2', '/opt/local/include/SDL2'])
+    incdirs = [localbase+'/include']
+    incdirs.extend([localbase+'/include/SDL2'])
 
     incdirs.extend([
-       #'/usr/X11/include',
-       '/opt/local/include',
-       '/opt/local/include/freetype2/freetype']
+       localbase+'/include/freetype2/freetype']
     )
-    #libdirs = ['/usr/local/lib', '/usr/X11/lib', '/opt/local/lib']
-    libdirs = ['/usr/local/lib', '/opt/local/lib', '/opt/homebrew/lib']
+    libdirs = [localbase+'/lib']
 
     for d in DEPS:
         if isinstance(d, (list, tuple)):
