diff options
Diffstat (limited to 'audio/csound5/patches/patch-ac')
-rw-r--r-- | audio/csound5/patches/patch-ac | 172 |
1 files changed, 172 insertions, 0 deletions
diff --git a/audio/csound5/patches/patch-ac b/audio/csound5/patches/patch-ac new file mode 100644 index 00000000000..a35211bba5b --- /dev/null +++ b/audio/csound5/patches/patch-ac @@ -0,0 +1,172 @@ +$NetBSD: patch-ac,v 1.1.1.1 2006/05/21 22:46:22 ben Exp $ + +--- SConstruct.orig 2006-03-15 07:22:43.000000000 -0800 ++++ SConstruct +@@ -50,6 +50,8 @@ def today(): + def getPlatform(): + if sys.platform[:5] == 'linux': + return 'linux' ++ elif sys.platform[:6] == 'netbsd': ++ return 'netbsd' + elif sys.platform[:3] == 'win': + return 'mingw' + elif sys.platform[:6] == 'darwin': +@@ -335,6 +337,15 @@ elif getPlatform() == 'mingw': + pythonLinkFlags = [] + pythonLibraryPath = [] + pythonLibs = ['python%s' % commonEnvironment['pythonVersion'].replace('.', '')] ++elif getPlatform() == 'netbsd': ++ commonEnvironment.Append(CCFLAGS = Split(os.environ['CFLAGS'])) ++ commonEnvironment.Append(CXXFLAGS = Split(os.environ['CXXFLAGS'])) ++ commonEnvironment.Append(LINKFLAGS = Split(os.environ['LDFLAGS'])) ++ pythonIncludePath = [] ++ pythonLinkFlags = [] ++ pythonLibraryPath = [] ++ pythonLibs = [] ++ SConsignFile("/dev/null") + + # Check for prerequisites. + # We check only for headers; checking for libs may fail +@@ -485,7 +496,7 @@ def buildzip(env, target, source): + # library version is CS_VERSION.CS_APIVERSION + csoundLibraryVersion = '5.1' + csoundLibraryName = 'csound' +-if getPlatform() == 'linux' and commonEnvironment['useDouble'] != '0': ++if (getPlatform() == 'linux' or getPlatform() == 'netbsd') and commonEnvironment['useDouble'] != '0': + csoundLibraryName += '64' + # flags for linking with the Csound library + libCsoundLinkFlags = [] +@@ -526,6 +537,12 @@ if commonEnvironment['buildRelease'] != + tmp += '64' + s = '-DCS_DEFAULT_PLUGINDIR=\\"%s\\"' % tmp + csoundLibraryEnvironment.Append(CPPFLAGS = [s]) ++ if getPlatform() == 'netbsd': ++ tmp = '%s/lib/csound5/plugins' % commonEnvironment['prefix'] ++ if commonEnvironment['useDouble'] != '0': ++ tmp += '64' ++ s = '-DCS_DEFAULT_PLUGINDIR=\\"%s\\"' % tmp ++ csoundLibraryEnvironment.Append(CPPFLAGS = [s]) + csoundDynamicLibraryEnvironment = csoundLibraryEnvironment.Copy() + csoundDynamicLibraryEnvironment.Append(LIBS = ['sndfile']) + if getPlatform() == 'mingw': +@@ -550,6 +567,8 @@ if getPlatform() == 'mingw': + csoundDynamicLibraryEnvironment['ENV']['PATH'] = os.environ['PATH'] + elif getPlatform() == 'linux': + csoundDynamicLibraryEnvironment.Append(LIBS = ['dl', 'm', 'pthread']) ++elif getPlatform() == 'netbsd': ++ csoundDynamicLibraryEnvironment.Append(LIBS = ['m', 'pthread']) + csoundInterfacesEnvironment = csoundDynamicLibraryEnvironment.Copy() + + if buildOSXFramework: +@@ -989,7 +1008,7 @@ makePlugin(pluginEnvironment, 'stdopcod' + pluginLibraries.append('opcodes.dir') + MacOSX_InstallPlugin('opcodes.dir') + +-if getPlatform() == 'linux' or getPlatform() == 'darwin': ++if getPlatform() == 'linux' or getPlatform() == 'darwin' or getPlatform == 'netbsd': + makePlugin(pluginEnvironment, 'control', ['Opcodes/control.c']) + makePlugin(pluginEnvironment, 'ftest', ['Opcodes/ftest.c']) + makePlugin(pluginEnvironment, 'mixer', ['Opcodes/mixer.cpp']) +@@ -1042,6 +1061,9 @@ else: + -framework Carbon -framework CoreAudio -framework CoreMidi + -framework ApplicationServices + ''')) ++ elif getPlatform() == 'netbsd': ++ widgetsEnvironment.ParseConfig('fltk-config --use-images --cflags --cxxflags --ldflags') ++ widgetsEnvironment.Append(LIBS = ['stdc++', 'pthread', 'm']) + makePlugin(widgetsEnvironment, 'widgets', + ['InOut/FL_graph.cpp', 'InOut/winFLTK.c', 'InOut/widgets.cpp']) + +@@ -1082,6 +1104,8 @@ else: + elif getPlatform() == 'mingw': + portaudioEnvironment.Append(LIBS = ['winmm', 'dsound']) + portaudioEnvironment.Append(LIBS = csoundWindowsLibraries) ++ elif getPlatform() == 'netbsd': ++ portaudioEnvironment.ParseConfig('pkg-config --cflags --libs portaudio-2.0') + makePlugin(portaudioEnvironment, 'rtpa', ['InOut/rtpa.c']) + + if not (commonEnvironment['useJack'] == '1' and jackFound): +@@ -1118,7 +1142,7 @@ else: + fluidEnvironment.Append(CPPFLAGS = ['-DFLUIDSYNTH_NOT_A_DLL']) + fluidEnvironment.Append(LIBS = ['winmm', 'dsound']) + fluidEnvironment.Append(LIBS = csoundWindowsLibraries) +- elif getPlatform() == 'linux' or getPlatform() == 'darwin': ++ elif getPlatform() == 'linux' or getPlatform() == 'darwin' or getPlatform() == 'netbsd': + fluidEnvironment.Append(LIBS = ['pthread']) + makePlugin(fluidEnvironment, 'fluidOpcodes', + ['Opcodes/fluidOpcodes/fluidOpcodes.c']) +@@ -1237,6 +1261,13 @@ else: + guiProgramEnvironment.Prepend(LINKFLAGS = ['-mwindows']) + vstEnvironment.Append(LIBS = ['fltk_images', 'fltk']) + guiProgramEnvironment.Append(LINKFLAGS = '-mwindows') ++ elif getPlatform() == 'netbsd': ++ vstEnvironment.Append(LIBS = ['m']) ++ vstEnvironment.Append(SHLINKFLAGS = '--no-export-all-symbols') ++ vstEnvironment.Append(LINKFLAGS = ['-Wl,-rpath-link,.']) ++ guiProgramEnvironment.Prepend(LINKFLAGS = ['-Wl,-rpath-link,.']) ++ os.spawnvp(os.P_WAIT, 'rm', ['rm', '-f', '_CsoundVST.so']) ++ os.symlink('lib_CsoundVST.so', '_CsoundVST.so') + guiProgramEnvironment.Prepend(LIBS = ['_CsoundVST']) + for option in vstEnvironment['CCFLAGS']: + if string.find(option, '-D') == 0: +@@ -1420,7 +1451,7 @@ else: + stkEnvironment.Append(LIBS = ['stdc++']) + if getPlatform() == 'mingw': + stkEnvironment.Append(LIBS = csoundWindowsLibraries) +- elif getPlatform() == 'linux' or getPlatform() == 'darwin': ++ elif getPlatform() == 'linux' or getPlatform() == 'darwin' or getPlatform() == 'netbsd': + stkEnvironment.Append(LIBS = ['pthread']) + # This is the one that actually defines the opcodes. + # They are straight wrappers, as simple as possible. +@@ -1443,6 +1474,8 @@ else: + elif getPlatform() == 'mingw': + pyEnvironment['ENV']['PATH'] = os.environ['PATH'] + pyEnvironment.Append(SHLINKFLAGS = '--no-export-all-symbols') ++ elif getPlatform() == 'netbsd': ++ pyEnvironment.Append(LIBS = ['m']) + pythonOpcodes = makePlugin(pyEnvironment, 'py', + ['Opcodes/py/pythonopcodes.c']) + if getPlatform() == 'mingw' and pythonLibs[0] < 'python24': +@@ -1461,7 +1494,7 @@ if commonEnvironment['buildPDClass']=='1 + pdClass = pdClassEnvironment.Program( + 'csoundapi~.pd_darwin', + 'frontends/csoundapi_tilde/csoundapi_tilde.c') +- elif getPlatform() == 'linux': ++ elif getPlatform() == 'linux' or getPlatform() == 'netbsd': + pdClass = pdClassEnvironment.SharedLibrary( + 'csoundapi~.pd_linux', + 'frontends/csoundapi_tilde/csoundapi_tilde.c', +@@ -1493,6 +1526,8 @@ if commonEnvironment['buildTclcsound'] = + ''')) + elif getPlatform() == 'linux': + csTclEnvironment.Append(LIBS = ['tcl8.4', 'tk8.4', 'dl', 'pthread']) ++ elif getPlatform() == 'netbsd': ++ csTclEnvironment.Append(LIBS = ['tcl8.4', 'tk8.4', 'pthread']) + elif getPlatform() == 'mingw': + csTclEnvironment.Append(LIBS = ['tcl84', 'tk84']) + csTclEnvironment.Append(LIBS = csoundWindowsLibraries) +@@ -1591,18 +1626,18 @@ else: + + PREFIX = commonEnvironment['prefix'] + +-BIN_DIR = PREFIX + "/bin" +-INCLUDE_DIR = PREFIX + "/include/csound" ++BIN_DIR = PREFIX + "/lib/csound5" ++INCLUDE_DIR = PREFIX + "/include/csound5" + + if (commonEnvironment['Word64'] == '1'): +- LIB_DIR = PREFIX + "/lib64" ++ LIB_DIR = PREFIX + "/lib64/csound5" + else: +- LIB_DIR = PREFIX + "/lib" ++ LIB_DIR = PREFIX + "/lib/csound5" + + if commonEnvironment['useDouble'] == '0': +- PLUGIN_DIR = LIB_DIR + "/csound/plugins" ++ PLUGIN_DIR = LIB_DIR + "/plugins" + else: +- PLUGIN_DIR = LIB_DIR + "/csound/plugins64" ++ PLUGIN_DIR = LIB_DIR + "/plugins" + + if commonEnvironment['install'] == '1': + installExecutables = Alias('install-executables', |