$OpenBSD: patch-setupext_py,v 1.6 2005/12/12 07:27:18 alek Exp $
--- setupext.py.orig	Tue Jul  5 17:36:37 2005
+++ setupext.py	Sun Dec 11 17:11:50 2005
@@ -34,6 +34,7 @@ WIN32
 import os
 
 basedir = {
+    'openbsd3'  : [os.getenv('X11BASE') or '/usr/X11R6', os.getenv('LOCALBASE') or '/usr/local', '/usr',],
     'win32'  : ['win32_static',],
     'linux2' : ['/usr/local', '/usr',],
     'linux'  : ['/usr/local', '/usr',],
@@ -97,6 +98,8 @@ def temp_copy(_from, _to):
 def add_base_flags(module):
     incdirs = [os.path.join(p, 'include') for p in basedir[sys.platform]
                if os.path.exists(p)]
+    if os.getenv('EXTRA_INCLUDES') is not None:
+	incdirs += os.getenv('EXTRA_INCLUDES').split()
     libdirs = [os.path.join(p, 'lib')     for p in basedir[sys.platform]
                if os.path.exists(p)]
     module.include_dirs.extend(incdirs)
@@ -174,7 +177,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()
