$NetBSD: patch-aa,v 1.6 2012/04/17 17:17:28 drochner Exp $

--- setupext.py.orig	2011-10-06 14:50:23.000000000 +0000
+++ setupext.py
@@ -124,13 +124,13 @@ options = {'display_status': True,
            'verbose': False,
            'provide_pytz': 'auto',
            'provide_dateutil': 'auto',
-           'build_agg': True,
+           'build_agg': False,
            'build_gtk': 'auto',
            'build_gtkagg': 'auto',
            'build_tkagg': 'auto',
            'build_macosx': 'auto',
-           'build_image': True,
-           'build_windowing': True,
+           'build_image': False,
+           'build_windowing': False,
            'backend': None,
            'basedirlist': None}
 
@@ -221,12 +221,7 @@ sysconfig.customize_compiler = my_custom
 
 
 def run_child_process(cmd):
-    p = subprocess.Popen(cmd, shell=True,
-                         stdin=subprocess.PIPE,
-                         stdout=subprocess.PIPE,
-                         stderr=subprocess.STDOUT,
-                         close_fds=(sys.platform != 'win32'))
-    return p.stdin, p.stdout
+    return None, os.popen(cmd + " 2>&1")
 
 class CleanUpFile:
     """CleanUpFile deletes the specified filename when self is destroyed."""
@@ -364,11 +359,8 @@ def check_for_libpng():
     return True
 
 def add_base_flags(module):
-    incdirs = filter(os.path.exists,
-                     [os.path.join(p, 'include') for p in basedirlist ])
-    libdirs = filter(os.path.exists,
-                     [os.path.join(p, 'lib')     for p in basedirlist ]+
-                     [os.path.join(p, 'lib64')     for p in basedirlist ] )
+    incdirs = [os.path.join(os.environ['LOCALBASE'], 'include')]
+    libdirs = [os.path.join(os.environ['LOCALBASE'], 'lib')]
 
     module.include_dirs.extend(incdirs)
     module.include_dirs.append('.')
