comparison build/openbsd4-config.py @ 429:be291458d9b5

Adding OpenBSD support. Thanks to tobiasu.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 23 Feb 2010 17:36:21 +0000
parents
children be625cdff350
comparison
equal deleted inserted replaced
428:a1884665aa95 429:be291458d9b5
1 # Install the following packages: libvorbis python py-yaml swig png openal sdl
2 # sdl-image sdl-ttf guichan boost
3 #
4
5 import sys
6 import os
7
8 def initEnvironment(env):
9 # Vorbisfile
10 env.Append(CPPPATH = [
11 os.path.join('/', 'usr', 'local', 'include'),
12 os.path.join('/', 'usr', 'local', 'include', 'vorbis')
13 ])
14 env.Append(LIBPATH = [os.path.join('/', 'usr', 'local', 'lib')])
15 env.Append(LIBS = ['ogg', 'vorbis'])
16
17 # PNG
18 env.Append(CPPPATH = [os.path.join('/', 'usr', 'local', 'include', 'libpng')])
19
20 # Python library
21 pythonversion = 'python' + str(os.sys.version_info[0]) + '.' + str(os.sys.version_info[1])
22 env.Append(CPPPATH = os.path.join('/', 'usr', 'local', 'include', pythonversion))
23 env.Append(LIBS = [pythonversion, 'util'])
24
25 # OpenBSD specific pthreads option
26 env.Append(LINKFLAGS = ['-pthread'])
27
28 return env
29
30 def addExtras(env, opengl):
31 if opengl:
32 env.Append(LIBS = ['stdc++', 'GL', 'GLU'])
33 env.Append(LIBPATH = os.path.join('/', 'usr', 'X11R6', 'lib'))
34
35 return env
36
37 def getRequiredHeaders(opengl):
38 return None
39
40 def getRequiredLibs(opengl):
41 libs = [
42 ('vorbisfile', 'vorbisfile.h'),
43 ('openal', 'AL/al.h'),
44 ('SDL', 'SDL.h'),
45 ('SDL_ttf', 'SDL_ttf.h'),
46 ('SDL_image', 'SDL_image.h'),
47 ('guichan', 'guichan.hpp'),
48 ('guichan_sdl', ''),
49 (('boost_filesystem', 'boost_filesystem-gcc', 'boost_filesystem-gcc41', 'boost_filesystem-mt'), 'boost/filesystem.hpp'),
50 (('boost_regex', 'boost_regex-gcc', 'boost_regex-gcc41', 'boost_regex-mt'), 'boost/regex.hpp'),
51 ('png', 'png.h'),
52 ('Xcursor', 'X11/Xcursor/Xcursor.h')]
53
54 if (opengl):
55 libs.append(('guichan_opengl', ''))
56
57 return libs
58
59 def getOptionalLibs(opengl):
60 return None
61
62 # vim: ft=python:
63