$OpenBSD: patch-setup_py,v 1.5 2017/12/30 09:00:51 ajacoutot Exp $
Index: setup.py
--- setup.py.orig
+++ setup.py
@@ -40,6 +40,7 @@ INCLUDES = {
     'darwin': ['/usr/local/include'],
     'linux': [],
     'freebsd': ['/usr/local/include'],
+    'openbsd': ['${LOCALBASE}/include'],
     'win32': ['c:/icu/include'],
     'sunos5': [],
     'cygwin': [],
@@ -49,6 +50,7 @@ CFLAGS = {
     'darwin': ['-DPYICU_VER="%s"' %(VERSION), '-std=c++11'],
     'linux': ['-DPYICU_VER="%s"' %(VERSION), '-std=c++11'],
     'freebsd': ['-DPYICU_VER="%s"' %(VERSION), '-std=c++11'],
+    'openbsd': ['-DPYICU_VER="%s"' %(VERSION), '-std=c++11'],
     'win32': ['/Zc:wchar_t', '/EHsc', '/DPYICU_VER=\\"%s\\"' %(VERSION)],
     'sunos5': ['-DPYICU_VER="%s"' %(VERSION), '-std=c++11'],
     'cygwin': ['-DPYICU_VER="%s"' %(VERSION), '-D_GNU_SOURCE=1', '-std=c++11'],
@@ -59,6 +61,7 @@ DEBUG_CFLAGS = {
     'darwin': ['-O0', '-g', '-DDEBUG'],
     'linux': ['-O0', '-g', '-DDEBUG'],
     'freebsd': ['-O0', '-g', '-DDEBUG'],
+    'openbsd': ['-O0', '-g', '-DDEBUG'],
     'win32': ['/Od', '/DDEBUG'],
     'sunos5': ['-DDEBUG'],
     'cygwin': ['-Og', '-g', '-DDEBUG'],
@@ -68,6 +71,7 @@ LFLAGS = {
     'darwin': ['-L/usr/local/lib'],
     'linux': [],
     'freebsd': ['-L/usr/local/lib'],
+    'openbsd': ['-L${LOCALBASE}/lib'],
     'win32': ['/LIBPATH:c:/icu/lib'],
     'sunos5': [],
     'cygwin': [],
@@ -77,6 +81,7 @@ LIBRARIES = {
     'darwin': ['icui18n', 'icuuc', 'icudata'],
     'linux': ['icui18n', 'icuuc', 'icudata'],
     'freebsd': ['icui18n', 'icuuc', 'icudata'],
+    'openbsd': ['icui18n', 'icuuc', 'icudata'],
     'win32': ['icuin', 'icuuc', 'icudt'],
     'sunos5': ['icui18n', 'icuuc', 'icudata'],
     'cygwin': ['icui18n', 'icuuc', 'icudata'],
@@ -87,6 +92,8 @@ if platform.startswith(('linux', 'gnu')):
     platform = 'linux'
 elif platform.startswith('freebsd'):
     platform = 'freebsd'
+elif platform.startswith('openbsd'):
+    platform = 'openbsd'
 
 if 'PYICU_INCLUDES' in os.environ:
     _includes = os.environ['PYICU_INCLUDES'].split(os.pathsep)
