$OpenBSD: patch-setup_py,v 1.6 2016/03/01 01:02:30 sthen Exp $
--- setup.py.orig	Thu Feb  4 08:30:14 2016
+++ setup.py	Sun Feb 28 21:18:38 2016
@@ -320,6 +320,13 @@ class pil_build_ext(build_ext):
 
         if _tkinter:
             TCL_VERSION = _tkinter.TCL_VERSION[:3]
+            TK_VERSION = _tkinter.TK_VERSION[:3]
+            _add_directory(include_dirs,
+                          os.path.join(os.getenv("LOCALBASE"),
+                                       "include/tcl%s" % TCL_VERSION))
+            _add_directory(include_dirs,
+                          os.path.join(os.getenv("LOCALBASE"),
+                                       "include/tk%s" % TK_VERSION))
 
         if _tkinter and not TCL_ROOT:
             # we have Tkinter but the TCL_ROOT variable was not set;
@@ -359,6 +366,11 @@ class pil_build_ext(build_ext):
 
         _add_directory(library_dirs, "/usr/lib")
         _add_directory(include_dirs, "/usr/include")
+
+        _add_directory(library_dirs, os.path.join(os.getenv("LOCALBASE"), "lib"))
+        _add_directory(include_dirs, os.path.join(os.getenv("LOCALBASE"), "include"))
+        _add_directory(library_dirs, os.path.join(os.getenv("X11BASE"), "lib"))
+        _add_directory(include_dirs, os.path.join(os.getenv("X11BASE"), "include"))
 
         # on Windows, look for the OpenJPEG libraries in the location that
         # the official installer puts them
