3 --- SConstruct.orig 2009-06-17 18:50:19.000000000 +0000
5 @@ -62,7 +62,7 @@ if PLATFORM == 'darwin':
7 DEFAULT_AUDIO_API = 'coreaudio'
8 DEFAULT_PREFIX = '/usr/local'
9 -elif PLATFORM == 'freebsd':
10 +elif PLATFORM == 'freebsd' or PLATFORM == 'netbsd':
11 PLATFORM_SYMBOL = 'SC_FREEBSD'
13 DEFAULT_AUDIO_API = 'jack'
14 @@ -289,7 +289,7 @@ opts.AddOptions(
16 'Build with debugging information', 0),
18 - 'Intermediate installation prefix for packaging', '/'),
19 + 'Intermediate installation prefix for packaging', '/', PathOption.PathIsDirCreate),
20 BoolOption('DEVELOPMENT',
21 'Build and install the development files', 0),
23 @@ -741,7 +741,7 @@ libscsynthEnv = serverEnv.Clone(
26 # functionality of libdl is included in libc on freebsd
27 -if PLATFORM == 'freebsd':
28 +if PLATFORM == 'freebsd' or PLATFORM == 'netbsd':
29 serverEnv.Append(LIBS = ['common', 'pthread'])
31 serverEnv.Append(LIBS = ['common', 'pthread', 'dl'])
32 @@ -751,7 +751,7 @@ if PLATFORM == 'darwin':
34 '-framework', 'CoreServices'])
35 #'-dylib_install_name', FINAL_PREFIX + '/lib/libsclang.dylib'])
36 -elif PLATFORM == 'linux':
37 +elif PLATFORM == 'linux' or PLATFORM == 'netbsd':
39 CPPDEFINES = [('SC_PLUGIN_LOAD_SYM', '\\"load\\"')],
40 LINKFLAGS = '-Wl,-rpath,' + FINAL_PREFIX + '/lib')
41 @@ -808,7 +808,7 @@ libscsynthStaticSources = libscsynthSour
42 libscsynthStatic = serverEnv.StaticLibrary('build/scsynth', libscsynthStaticSources)
43 env.Alias('install-programs', env.Install(lib_dir(INSTALL_PREFIX), [libscsynthStatic]))
45 -scsynth = serverEnv.Program('build/scsynth', scsynthSources, LIBS = ['scsynth'])
46 +scsynth = serverEnv.Program('build/scsynth', scsynthSources, LIBS = ['scsynth'] + serverEnv['LIBS'])
47 env.Alias('install-programs', env.Install(bin_dir(INSTALL_PREFIX), [scsynth]))
49 # ======================================================================
50 @@ -834,7 +834,7 @@ pluginEnv.Append(
51 if PLATFORM == 'darwin':
52 pluginEnv['SHLINKFLAGS'] = '$LINKFLAGS -bundle -flat_namespace -undefined suppress'
54 -if PLATFORM == 'freebsd':
55 +if PLATFORM == 'freebsd' or PLATFORM == 'netbsd':
59 @@ -972,7 +972,7 @@ if env.has_key('amd64') and env['amd64']
60 langEnv.Append( CXXFLAGS = ['-m32'] )
62 # functionality of libdl is included in libc on freebsd
63 -if PLATFORM == 'freebsd':
64 +if PLATFORM == 'freebsd' or PLATFORM == 'netbsd':
65 langEnv.Append(LIBS = ['common', 'scsynth', 'pthread', 'm'])
67 langEnv.Append(LIBS = ['common', 'scsynth', 'pthread', 'dl', 'm'])
68 @@ -985,7 +985,7 @@ if PLATFORM == 'darwin':
69 elif PLATFORM == 'linux':
71 LINKFLAGS = '-Wl,-rpath,build -Wl,-rpath,' + FINAL_PREFIX + '/lib')
72 -elif PLATFORM == 'freebsd':
73 +elif PLATFORM == 'freebsd' or PLATFORM == 'netbsd':
75 LINKFLAGS = '-Wl,-rpath,build -Wl,-rpath,' + FINAL_PREFIX + '/lib')
77 @@ -1038,6 +1038,7 @@ Source/lang/LangPrimSource/PyrSched.cpp
78 Source/lang/LangPrimSource/PyrPrimitive.cpp
79 Source/lang/LangPrimSource/PyrMathPrim.cpp
80 Source/lang/LangPrimSource/SC_ComPort.cpp
81 +Source/lang/LangPrimSource/SC_HID.cpp
82 Source/lang/LangPrimSource/OSCData.cpp
83 Source/lang/LangPrimSource/PyrArchiver.cpp
84 Source/lang/LangPrimSource/PyrArrayPrimitives.cpp
85 @@ -1071,7 +1072,6 @@ if PLATFORM == 'darwin':
86 LINKFLAGS = '-framework Carbon -framework IOKit -framework IOBluetooth'
88 libsclangSources += Split('''
89 -Source/lang/LangPrimSource/SC_HID.cpp
90 Source/lang/LangPrimSource/SC_CoreAudioPrim.cpp
91 Source/lang/LangPrimSource/HID_Utilities/HID_Error_Handler.c
92 Source/lang/LangPrimSource/HID_Utilities/HID_Name_Lookup.c
93 @@ -1099,10 +1099,7 @@ sclangSources = ['Source/lang/LangSource
95 libsclang = langEnv.SharedLibrary('build/sclang', libsclangSources)
96 env.Alias('install-bin', env.Install(lib_dir(INSTALL_PREFIX), [libsclang]))
97 - if PLATFORM == 'darwin':
98 - sclangLibs = ['scsynth', 'sclang']
100 - sclangLibs = ['sclang']
101 + sclangLibs = ['scsynth', 'sclang'] + langEnv['LIBS']
102 sclang = langEnv.Program('build/sclang', sclangSources, LIBS=sclangLibs)
103 env.Alias('install-programs', env.Install(bin_dir(INSTALL_PREFIX), [sclang]))