mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-28 06:26:12 -04:00
293 lines
14 KiB
Plaintext
293 lines
14 KiB
Plaintext
$NetBSD: patch-ac,v 1.9 2014/02/24 16:19:39 joerg Exp $
|
|
|
|
--- SConstruct.orig 2013-01-07 12:49:34.000000000 +0000
|
|
+++ SConstruct
|
|
@@ -60,6 +60,10 @@ def getPlatform():
|
|
return 'darwin'
|
|
elif sys.platform[:5] == 'sunos':
|
|
return 'sunos'
|
|
+ elif sys.platform[:6] == 'netbsd':
|
|
+ return 'netbsd'
|
|
+ elif sys.platform[:9] == 'dragonfly':
|
|
+ return 'dragonfly'
|
|
else:
|
|
return 'unsupported'
|
|
|
|
@@ -408,6 +412,8 @@ if commonEnvironment['useGettext'] == '1
|
|
commonEnvironment.Append(LIBS=['intl'])
|
|
if getPlatform() == 'haiku':
|
|
commonEnvironment.Append(LIBS=['intl'])
|
|
+ if getPlatform() == 'netbsd':
|
|
+ commonEnvironment.Append(LIBS=['intl'])
|
|
else:
|
|
print "CONFIGURATION DECISION: No localisation"
|
|
|
|
@@ -505,17 +511,17 @@ else:
|
|
if getPlatform() == 'linux':
|
|
commonEnvironment.Append(CCFLAGS = ["-DLINUX"])
|
|
commonEnvironment.Append(CPPFLAGS = ['-DHAVE_SOCKETS'])
|
|
- commonEnvironment.Append(CPPPATH = ['/usr/local/include'])
|
|
- commonEnvironment.Append(CPPPATH = ['/usr/include'])
|
|
- commonEnvironment.Append(CPPPATH = ['/usr/include'])
|
|
- commonEnvironment.Append(CPPPATH = ['/usr/X11R6/include'])
|
|
commonEnvironment.Append(CCFLAGS = ["-DPIPES"])
|
|
commonEnvironment.Append(LINKFLAGS = ['-Wl,-Bdynamic'])
|
|
+ commonEnvironment.Append(CCFLAGS = Split(os.environ['CFLAGS']))
|
|
+ commonEnvironment.Append(CXXFLAGS = Split(os.environ['CXXFLAGS']))
|
|
+ commonEnvironment.Append(LINKFLAGS = Split(os.environ['LDFLAGS']))
|
|
elif getPlatform() == 'sunos':
|
|
commonEnvironment.Append(CCFLAGS = "-D_SOLARIS")
|
|
- commonEnvironment.Append(CPPPATH = '/usr/local/include')
|
|
- commonEnvironment.Append(CPPPATH = '/usr/include')
|
|
commonEnvironment.Append(CPPPATH = '/usr/jdk/instances/jdk1.5.0/include')
|
|
+ commonEnvironment.Append(CCFLAGS = Split(os.environ['CFLAGS']))
|
|
+ commonEnvironment.Append(CXXFLAGS = Split(os.environ['CXXFLAGS']))
|
|
+ commonEnvironment.Append(LINKFLAGS = Split(os.environ['LDFLAGS']))
|
|
if compilerGNU():
|
|
commonEnvironment.Append(CCFLAGS = "-DPIPES")
|
|
commonEnvironment.Append(LINKFLAGS = ['-Wl,-Bdynamic'])
|
|
@@ -570,6 +576,11 @@ elif getPlatform() == 'win32':
|
|
if compilerIntel():
|
|
print 'Generating code optimized for Intel Core 2 Duo and Pentium 4 that will run on other processors also.'
|
|
commonEnvironment.Append(CCFLAGS = Split('/O3 /QaxTP'))
|
|
+elif getPlatform() == 'netbsd' or getPlatform() == 'dragonfly' or getPlatform() == 'sunos5':
|
|
+ commonEnvironment.Append(CCFLAGS = Split(os.environ['CFLAGS']))
|
|
+ commonEnvironment.Append(CXXFLAGS = Split(os.environ['CXXFLAGS']))
|
|
+ commonEnvironment.Append(LINKFLAGS = Split(os.environ['LDFLAGS']))
|
|
+ SConsignFile("unused-consign-file")
|
|
|
|
if getPlatform() == 'linux':
|
|
path1 = '/usr/include/python%s' % commonEnvironment['pythonVersion']
|
|
@@ -942,6 +953,13 @@ if commonEnvironment['buildRelease'] !=
|
|
tmp += '64'
|
|
s = '-DCS_DEFAULT_PLUGINDIR=\\"%s\\"' % tmp
|
|
csoundLibraryEnvironment.Append(CPPFLAGS = [s])
|
|
+ if getPlatform() == 'netbsd' or getPlatform() == 'dragonfly' or getPlatform() == 'sunos':
|
|
+ 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.Clone()
|
|
csoundDynamicLibraryEnvironment.Append(LIBS = ['sndfile'])
|
|
if getPlatform() == 'win32':
|
|
@@ -999,6 +1017,11 @@ ws2_32
|
|
csoundDynamicLibraryEnvironment.Append(SHLINKFLAGS = ['-module'])
|
|
elif getPlatform() == 'linux' or getPlatform() == 'sunos' or getPlatform() == 'darwin':
|
|
csoundDynamicLibraryEnvironment.Append(LIBS = ['dl', 'm', 'pthread'])
|
|
+elif getPlatform() == 'netbsd':
|
|
+ csoundDynamicLibraryEnvironment.Append(LIBS = ['m', 'pthread'])
|
|
+elif getPlatform() == 'dragonfly':
|
|
+ csoundDynamicLibraryEnvironment.Append(LINKFLAGS = ['-pthread'])
|
|
+ csoundDynamicLibraryEnvironment.Append(LIBS = ['m'])
|
|
csoundInterfacesEnvironment = csoundDynamicLibraryEnvironment.Clone()
|
|
|
|
if buildOSXFramework:
|
|
@@ -1289,7 +1312,7 @@ else:
|
|
csoundLibraryEnvironment.Append(CCFLAGS='-fPIC')
|
|
csoundLibrary = csoundLibraryEnvironment.Library(
|
|
csoundLibraryName, libCsoundSources)
|
|
-if getPlatform() == 'linux' or getPlatform() == 'sunos' or getPlatform() == 'haiku':
|
|
+if getPlatform() == 'linux' or getPlatform() == 'sunos' or getPlatform() == 'haiku' or getPlatform() == 'netbsd' or getPlatform() == 'dragonfly':
|
|
# We need the library before sndfile in case we are building a static
|
|
# libcsound and passing -Wl,-as-needed
|
|
libCsoundLibs.insert(0,csoundLibrary)
|
|
@@ -1691,7 +1714,7 @@ makePlugin(pluginEnvironment, 'signalflo
|
|
makePlugin(pluginEnvironment, 'fractalnoise', ['Opcodes/tl/fractalnoise.cpp'])
|
|
|
|
# platform-specific
|
|
-if (getPlatform() == 'linux' or getPlatform() == 'darwin'):
|
|
+if getPlatform() == 'linux' or getPlatform() == 'darwin' or getPlatform() == 'netbsd' or getPlatform() == 'dragonfly' or getPlatform() == 'sunos':
|
|
makePlugin(pluginEnvironment, 'control', ['Opcodes/control.c'])
|
|
# makePlugin(pluginEnvironment, 'cpumeter', ['Opcodes/cpumeter.c'])
|
|
if getPlatform() == 'linux':
|
|
@@ -1738,8 +1761,10 @@ else:
|
|
print "CONFIGURATION DECISION: Building OSC plugin."
|
|
oscEnvironment = pluginEnvironment.Clone()
|
|
oscEnvironment.Append(LIBS = ['lo'])
|
|
- if getPlatform() != 'haiku':
|
|
- oscEnvironment.Append(LIBS = ['pthread'])
|
|
+ if getPlatform() == 'dragonfly':
|
|
+ oscEnvironment.Append(LINKFLAGS = ['-pthread'])
|
|
+ elif getPlatform() != 'haiku':
|
|
+ oscEnvironment.Append(LIBS = ['pthread'])
|
|
if getPlatform() == 'win32':
|
|
oscEnvironment.Append(LIBS = csoundWindowsLibraries)
|
|
if compilerGNU():
|
|
@@ -1842,8 +1867,15 @@ else:
|
|
WiiEnvironment.Append(LIBS = ['wiiuse', 'bluetooth'])
|
|
if p5gfound :
|
|
P5GEnvironment.Append(LIBS = ['p5glove'])
|
|
- vstEnvironment.Append(LIBS = ['stdc++', 'pthread', 'm'])
|
|
- guiProgramEnvironment.Append(LIBS = ['stdc++', 'pthread', 'm'])
|
|
+ if getPlatform() == 'dragonfly':
|
|
+ csoundProgramEnvironment.Append(LINKFLAGS = ['-pthread'])
|
|
+ vstEnvironment.Append(LIBS = ['stdc++', 'm'])
|
|
+ vstEnvironment.Append(LINKFLAGS = ['-pthread'])
|
|
+ guiProgramEnvironment.Append(LIBS = ['stdc++', 'm'])
|
|
+ guiProgramEnvironment.Append(LINKFLAGS = ['-pthread'])
|
|
+ else:
|
|
+ vstEnvironment.Append(LIBS = ['stdc++', 'pthread', 'm'])
|
|
+ guiProgramEnvironment.Append(LIBS = ['stdc++', 'pthread', 'm'])
|
|
if getPlatform() == 'darwin':
|
|
csoundProgramEnvironment.Append(LINKFLAGS = Split('''-framework Carbon -framework CoreAudio -framework CoreMIDI'''))
|
|
|
|
@@ -1872,6 +1904,13 @@ else:
|
|
widgetsEnvironment.Append(LIBS = csoundWindowsLibraries)
|
|
elif getPlatform() == 'darwin':
|
|
widgetsEnvironment.ParseConfig('fltk-config --use-images --cflags --cxxflags --ldflags')
|
|
+ elif getPlatform() == 'netbsd':
|
|
+ widgetsEnvironment.ParseConfig('fltk-config --use-images --cflags --cxxflags --ldflags')
|
|
+ widgetsEnvironment.Append(LIBS = ['stdc++', 'pthread', 'm'])
|
|
+ elif getPlatform() == 'dragonfly':
|
|
+ widgetsEnvironment.ParseConfig('fltk-config --use-images --cflags --cxxflags --ldflags')
|
|
+ widgetsEnvironment.Append(LIBS = ['stdc++', 'm'])
|
|
+ widgetsEnvironment.Append(LINKFLAGS = ['-pthread'])
|
|
makePlugin(widgetsEnvironment, 'widgets',
|
|
['InOut/FL_graph.cpp', 'InOut/winFLTK.c', 'InOut/widgets.cpp'])
|
|
|
|
@@ -1909,7 +1948,11 @@ if not (commonEnvironment['useALSA'] ==
|
|
else:
|
|
print "CONFIGURATION DECISION: Building ALSA plugin."
|
|
alsaEnvironment = pluginEnvironment.Clone()
|
|
- alsaEnvironment.Append(LIBS = ['asound', 'pthread'])
|
|
+ if getPlatform() == 'dragonfly':
|
|
+ alsaEnvironment.Append(LIBS = ['asound'])
|
|
+ alsaEnvironment.Append(LINKFLAGS = ['-pthread'])
|
|
+ else:
|
|
+ alsaEnvironment.Append(LIBS = ['asound', 'pthread'])
|
|
makePlugin(alsaEnvironment, 'rtalsa', ['InOut/rtalsa.c'])
|
|
|
|
if pulseaudioFound and (getPlatform() == 'linux' or getPlatform() == 'sunos'):
|
|
@@ -1942,6 +1985,9 @@ else:
|
|
portaudioEnvironment.Append(LIBS = ['winmm', 'dsound'])
|
|
portaudioEnvironment.Append(LIBS = csoundWindowsLibraries)
|
|
makePlugin(portaudioEnvironment, 'rtpa', ['InOut/rtpa.cpp'])
|
|
+ elif getPlatform() == 'netbsd' or getPlatform() == 'dragonfly' or getPlatform() == 'sunos5':
|
|
+ portaudioEnvironment.ParseConfig('pkg-config --cflags --libs portaudio-2.0')
|
|
+ makePlugin(portaudioEnvironment, 'rtpa', ['InOut/rtpa.c'])
|
|
else:
|
|
makePlugin(portaudioEnvironment, 'rtpa', ['InOut/rtpa.c'])
|
|
|
|
@@ -1954,6 +2000,9 @@ else:
|
|
jackEnvironment.Append(LIBS = ['jack', 'asound', 'pthread'])
|
|
elif getPlatform() == 'win32':
|
|
jackEnvironment.Append(LIBS = ['jackdmp'])
|
|
+ elif getPlatform() == 'dragonfly':
|
|
+ jackEnvironment.Append(LIBS = ['jack'])
|
|
+ jackEnvironment.Append(LINKFLAGS = ['-pthread'])
|
|
else:
|
|
jackEnvironment.Append(LIBS = ['pthread', 'jack'])
|
|
makePlugin(jackEnvironment, 'rtjack', ['InOut/rtjack.c'])
|
|
@@ -2016,6 +2065,12 @@ else:
|
|
fluidEnvironment.Append(LIBS = ['pthread'])
|
|
elif getPlatform() == 'haiku':
|
|
fluidEnvironment.Append(LIBS = ['fluidsynth'])
|
|
+ elif getPlatform() == 'netbsd':
|
|
+ fluidEnvironment.Append(LIBS = ['fluidsynth'])
|
|
+ fluidEnvironment.Append(LIBS = ['pthread'])
|
|
+ elif getPlatform() == 'dragonfly':
|
|
+ fluidEnvironment.Append(LIBS = ['fluidsynth'])
|
|
+ fluidEnvironment.Append(LINKFLAGS = ['-pthread'])
|
|
makePlugin(fluidEnvironment, 'fluidOpcodes',
|
|
['Opcodes/fluidOpcodes/fluidOpcodes.cpp'])
|
|
|
|
@@ -2178,8 +2233,10 @@ else:
|
|
stkEnvironment.Append(LIBS = ['stdc++'])
|
|
if getPlatform() == 'win32':
|
|
stkEnvironment.Append(LIBS = csoundWindowsLibraries)
|
|
- elif getPlatform() == 'linux' or getPlatform() == 'darwin' or getPlatform() == 'sunos':
|
|
+ elif getPlatform() == 'linux' or getPlatform() == 'darwin' or getPlatform() == 'sunos' or getPlatform() == 'netbsd':
|
|
stkEnvironment.Append(LIBS = ['pthread'])
|
|
+ elif getPlatform() == 'dragonfly':
|
|
+ stkEnvironment.Append(LINKFLAGS = ['-pthread'])
|
|
# This is the one that actually defines the opcodes.
|
|
# They are straight wrappers, as simple as possible.
|
|
stk = makePlugin(stkEnvironment, 'stk', ['Opcodes/stk/stkOpcodes.cpp'])
|
|
@@ -2206,6 +2263,8 @@ else:
|
|
pyEnvironment.Append(LIBS = ['dl', 'm'])
|
|
elif getPlatform() == 'win32':
|
|
pyEnvironment['ENV']['PATH'] = os.environ['PATH']
|
|
+ elif getPlatform() == 'netbsd' or getPlatform() == 'dragonfly':
|
|
+ pyEnvironment.Append(LIBS = ['m'])
|
|
pythonOpcodes = makePlugin(pyEnvironment, 'py',
|
|
['Opcodes/py/pythonopcodes.c'])
|
|
if getPlatform() == 'win32' and pythonLibs[0] < 'python24':
|
|
@@ -2606,6 +2665,13 @@ else:
|
|
vstEnvironment.Append(LIBS = Split('fltk fltk_images fltk_png fltk_jpeg fltk_z'))
|
|
else:
|
|
vstEnvironment.Append(LIBS = Split('csound64 csnd fltk fltkimages fltkpng fltkjpeg fltkz'))
|
|
+ elif getPlatform() == 'netbsd' or getPlatform() == 'dragonfly':
|
|
+ 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')
|
|
print 'PATH =', commonEnvironment['ENV']['PATH']
|
|
csoundVstSources = Split('''
|
|
frontends/CsoundVST/vstsdk2.4/public.sdk/source/vst2.x/audioeffect.cpp
|
|
@@ -2653,7 +2719,7 @@ if commonEnvironment['buildPDClass'] ==
|
|
pdClass = pdClassEnvironment.Program(
|
|
'csoundapi~.pd_darwin',
|
|
'frontends/csoundapi_tilde/csoundapi_tilde.c')
|
|
- elif getPlatform() == 'linux':
|
|
+ elif getPlatform() == 'linux' or getPlatform() == 'netbsd' or getPlatform() == 'dragonfly' or getPlatform() == 'sunos5':
|
|
pdClass = pdClassEnvironment.SharedLibrary(
|
|
'csoundapi~.pd_linux',
|
|
'frontends/csoundapi_tilde/csoundapi_tilde.c',
|
|
@@ -2694,6 +2760,15 @@ if commonEnvironment['buildTclcsound'] =
|
|
lib2 = 'tk%s' % commonEnvironment['tclversion']
|
|
csTclEnvironment.Append(LIBS = [lib1, lib2])
|
|
csTclEnvironment.Append(LIBS = csoundWindowsLibraries)
|
|
+ elif getPlatform() == 'netbsd':
|
|
+ lib1 = 'tcl%s' % commonEnvironment['tclversion']
|
|
+ lib2 = 'tk%s' % commonEnvironment['tclversion']
|
|
+ csTclEnvironment.Append(LIBS = [lib1, lib2, 'pthread'])
|
|
+ elif getPlatform() == 'dragonfly':
|
|
+ lib1 = 'tcl%s' % commonEnvironment['tclversion']
|
|
+ lib2 = 'tk%s' % commonEnvironment['tclversion']
|
|
+ csTclEnvironment.Append(LIBS = [lib1, lib2])
|
|
+ csTclEnvironment.Append(LINKFLAGS = ['-pthread'])
|
|
csTclCmdObj = csTclEnvironment.SharedObject(
|
|
'frontends/tclcsound/commands.c')
|
|
csTcl = csTclEnvironment.Program(
|
|
@@ -2831,8 +2906,7 @@ else:
|
|
blb = csBeatsEnvironment.CFile(target = 'frontends/beats/lex.yy.c',
|
|
source = 'frontends/beats/beats.l')
|
|
bb = csBeatsEnvironment.Program('csbeats',
|
|
- ['frontends/beats/main.c',
|
|
- byb,
|
|
+ ['frontends/beats/main.c', 'frontends/beats/beats.tab.c',
|
|
blb])
|
|
executables.append(bb)
|
|
|
|
@@ -2887,11 +2961,15 @@ INSTDIR = commonEnvironment['instdir']
|
|
PREFIX = INSTDIR + commonEnvironment['prefix']
|
|
|
|
BIN_DIR = PREFIX + "/bin"
|
|
+BIN_DIR = PREFIX + "/lib/csound5"
|
|
INCLUDE_DIR = PREFIX + "/include/csound"
|
|
+INCLUDE_DIR = PREFIX + "/include/csound5"
|
|
|
|
if (commonEnvironment['Lib64'] == '1'):
|
|
LIB_DIR = PREFIX + "/lib64"
|
|
+ LIB_DIR = PREFIX + "/lib64/csound5"
|
|
PYTHON_DIR = '%s/lib64' % sys.prefix
|
|
+ PYTHON_DIR = '%s/lib64/csount5' % sys.prefix
|
|
else:
|
|
LIB_DIR = PREFIX + "/lib"
|
|
PYTHON_DIR = '%s/lib' % sys.prefix
|
|
@@ -2903,8 +2981,10 @@ for i in sys.path:
|
|
|
|
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 + "/plugins64"
|
|
|
|
if commonEnvironment['install'] == '1':
|
|
installExecutables = Alias('install-executables',
|