$OpenBSD: patch-setupext_py,v 1.8 2007/10/12 11:07:43 djm Exp $
--- setupext.py.orig	Mon Feb 26 19:30:45 2007
+++ setupext.py	Wed Sep  5 21:57:56 2007
@@ -44,6 +44,8 @@ WIN32 - VISUAL STUDIO 7.1 (2003)
 import os
 
 basedir = {
+    'openbsd3'  : [os.getenv('X11BASE') or '/usr/X11R6', os.getenv('LOCALBASE') or '/usr/local', '/usr',],
+    'openbsd4'  : [os.getenv('X11BASE') or '/usr/X11R6', os.getenv('LOCALBASE') or '/usr/local', '/usr',],
     'win32'  : ['win32_static',],
     'linux2' : ['/usr/local', '/usr',],
     'linux'  : ['/usr/local', '/usr',],
@@ -127,6 +129,8 @@ def add_base_flags(module):
 
     incdirs = filter(os.path.exists,
                      [os.path.join(p, 'include') for p in basedir[sys.platform] ])
+    if os.getenv('EXTRA_INCLUDES') is not None:
+	incdirs += os.getenv('EXTRA_INCLUDES').split()
     libdirs = filter(os.path.exists,
                      [os.path.join(p, 'lib')     for p in basedir[sys.platform] ]+
                      [os.path.join(p, 'lib64')     for p in basedir[sys.platform] ] )
@@ -227,7 +231,9 @@ def add_pygtk_flags(module):
     pygtkIncludes = getoutput('pkg-config --cflags-only-I pygtk-2.0').split()
     gtkIncludes = getoutput('pkg-config --cflags-only-I gtk+-2.0').split()
     includes = pygtkIncludes + gtkIncludes
-    module.include_dirs.extend([include[2:] for include in includes])
+    list = []
+    list.extend([include[2:] for include in includes])
+    module.include_dirs = list + module.include_dirs
 
     pygtkLinker = getoutput('pkg-config --libs pygtk-2.0').split()
     gtkLinker =  getoutput('pkg-config --libs gtk+-2.0').split()
