$OpenBSD: patch-setup_build_environment_py,v 1.2 2013/11/09 15:02:14 sthen Exp $

- find headers from /usr/local/include

- add a horrible hack to locate qt private headers unpacked using
the 'BUILD_DEPENDS=x11/qt4:patch' target

if updating patches, watch out for WRKDIR subst in last chunk.

--- setup/build_environment.py.orig	Fri Nov  8 03:44:31 2013
+++ setup/build_environment.py	Sat Nov  9 14:24:16 2013
@@ -7,11 +7,12 @@ __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.n
 __docformat__ = 'restructuredtext en'
 
 import os, socket, struct, subprocess, glob
+from distutils import sysconfig
 from distutils.spawn import find_executable
 
 from PyQt4 import pyqtconfig
 
-from setup import isosx, iswindows, islinux, is64bit
+from setup import isosx, iswindows, islinux, is64bit, isopenbsd
 is64bit
 
 OSX_SDK = '/Developer/SDKs/MacOSX10.5.sdk'
@@ -164,6 +165,12 @@ else:
     ft_lib_dirs = pkgconfig_lib_dirs('freetype2', 'FT_LIB_DIR', '/usr/lib')
     ft_libs = pkgconfig_libs('freetype2', '', '')
 
+if isopenbsd:
+    sw_inc_dir = os.path.join(sysconfig.PREFIX, 'include')
+    icu_inc_dirs = [sw_inc_dir]
+    chmlib_inc_dirs = [sw_inc_dir]
+    bq = glob.glob('${WRKDIR}/x11/qt4/qt-*/include')[-1]
+    qt_private_inc = ['%s/%s'%(bq, m) for m in ('QtGui', 'QtCore')]
 
 magick_error = None
 if not magick_inc_dirs or not os.path.exists(os.path.join(magick_inc_dirs[0],
