--- buildconfig/config_darwin.py.orig	2023-02-13 18:38:10
+++ buildconfig/config_darwin.py	2023-02-21 13:59:17
@@ -9,6 +9,7 @@
 except ImportError:
     from buildconfig.config_unix import DependencyProg
 
+localbase = os.environ.get('LOCALBASE', '')
 
 class Dependency:
     libext = '.dylib'
@@ -51,7 +52,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/'
@@ -140,16 +141,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)):
