Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow builds on OpenBSD #4165

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion SConstruct
Expand Up @@ -1444,7 +1444,7 @@ if not preconfigured:
### platform specific bits

thread_suffix = 'mt'
if env['PLATFORM'] == 'FreeBSD':
if env['PLATFORM'] == 'FreeBSD' or env['PLATFORM'] == 'OpenBSD':
thread_suffix = ''
env.Append(LIBS = 'pthread')

Expand Down
9 changes: 7 additions & 2 deletions src/build.py
Expand Up @@ -38,6 +38,11 @@ def call(cmd, silent=True):

def ldconfig(*args,**kwargs):
call('ldconfig')
if env['PLATFORM'] == 'OpenBSD':
# For OBSD call ldconfig as done by rc -- refer to rc.conf(8)
call('ldconfig /usr/X11R6/lib /usr/local/lib')
else:
call('ldconfig')

if env['LINKING'] == 'static':
lib_env.Append(CXXFLAGS="-fPIC")
Expand Down Expand Up @@ -117,7 +122,7 @@ def ldconfig(*args,**kwargs):

lib_env['LIBS'].append('z')

if env['PLATFORM'] == 'FreeBSD':
if env['PLATFORM'] == 'FreeBSD' or env['PLATFORM'] == 'OpenBSD':
lib_env['LIBS'].append('pthread')

if env['PLATFORM'] == 'Darwin':
Expand All @@ -139,7 +144,7 @@ def ldconfig(*args,**kwargs):
else:
mapnik_lib_link_flag += ' -Wl,-h,%s' % mapnik_libname
else: # Linux and others
if env['PLATFORM'] != 'FreeBSD':
if env['PLATFORM'] != 'FreeBSD' or env['PLATFORM'] != 'OpenBSD':
lib_env['LIBS'].append('dl')
mapnik_lib_link_flag += ' -Wl,-rpath-link,.'
if env['ENABLE_SONAME']:
Expand Down