1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742
|
Description: consistent indentation
- use <space> rather than <tab>
- remove trailing whitespace
Author: IOhannes m zmölnig
Origin: Debian
Forwarded: no
Last-Update: 2020-01-15
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- sndobj.orig/SConstruct
+++ sndobj/SConstruct
@@ -13,11 +13,11 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# scons build system for SndObj
-#
+#
# Copyright (C) 2005 by Tim Blechmann and Victor Lazzarini
#
# See License.txt for for a disclaimer of all warranties
@@ -27,10 +27,42 @@
import os
import distutils.sysconfig
-env = Environment(ENV = {'PATH' : os.environ['PATH']})
+str2bool = lambda s: s.lower() in ['true', '1', 't', 'y', 'yes', 'yeah', 'yup', 'on']
+
+vars = Variables(None, ARGUMENTS)
+vars.Add('ALSA', 'on linux, build with alsa support', default=True, converter=str2bool)
+vars.Add('OSS', 'on unix or linux, build with OSS support', default=False, converter=str2bool)
+vars.Add('JACK', 'on linux or OSX, build with Jack support', default=True, converter=str2bool)
+vars.Add('flags', 'additional compile flags', "")
+vars.Add('prefix', 'install prefix of headers, static lib and shared lib', '/usr/local')
+vars.Add('instdir', 'base directory', '')
+vars.Add('pddir', 'PD directory on windows', 'C:\\PureData')
+vars.Add('nostaticlib', 'do not build static library', default=True, converter=str2bool)
+vars.Add('pythonmodule', 'build python module', default=False, converter=str2bool)
+vars.Add('numpy', 'include support for numpy arrays', default=False, converter=str2bool)
+vars.Add('javamodule', 'build java module', default=False, converter=str2bool)
+vars.Add('lispmodule', 'build CFFI module', default=False, converter=str2bool)
+vars.Add('examples', 'build C++ examples', default=False, converter=str2bool)
+vars.Add('no_rtio', 'No RT IO', default=False, converter=str2bool)
+vars.Add('buildASIO', 'Use ASIO, requires ASIO SDK files to be place in ./src/asio', default=False, converter=str2bool)
+vars.Add('install_name', 'on OSX, the dynamic library full install pathname (before installation)', 'lib/libsndobj.dylib')
+vars.Add('pythonpath', 'python include path (defaults to usual places)', '')
+vars.Add('pythonlibpath', 'python lib path (WIN only,defaults to usual places)', '')
+vars.Add('javapath', 'java headers path (defaults to usual places)', '')
+vars.Add('customCPPPATH', '','')
+vars.Add('customCCFLAGS', '','')
+vars.Add('customCXXFLAGS','','')
+vars.Add('customLIBS','','')
+vars.Add('customLIBPATH','','')
+vars.Add('customSHLINKFLAGS','','')
+vars.Add('customSWIGFLAGS','','')
+vars.Add('version', 'library version','2.6')
+
+env = Environment(ENV={'PATH' : os.environ['PATH']}, variables=vars)
env.SConsignFile()
# env.CacheDir('./obj')
+Help(vars.GenerateHelpText(env))
######################################################################
#
# general configuration
@@ -38,16 +70,16 @@
def getVersion():
- return sys.version[:3]
+ return sys.version[:3]
def getPlatform():
if sys.platform[:5] == 'linux':
return 'linux'
elif sys.platform[:3] == 'win':
if env['PLATFORM'] == 'win32':
- return 'win'
- else:
- return 'cygwin'
+ return 'win'
+ else:
+ return 'cygwin'
elif sys.platform[:6] == 'darwin':
return 'macosx'
elif sys.platform[:4] == 'irix' :
@@ -55,44 +87,10 @@
else:
return 'unsupported'
-opt = Options(['options.cache'])
-opt.AddOptions(
- BoolOption('alsa', 'on linux, build with alsa support', True),
- BoolOption('oss', 'on unix or linux, build with OSS support', False),
- BoolOption('jack', 'on linux or OSX, build with Jack support', True),
- ('flags', 'additional compile flags', ""),
- ('prefix', 'install prefix of headers, static lib and shared lib', '/usr/local'),
- ('instdir', 'base directory', ''),
- ('pddir', 'PD directory on windows', 'C:\\PureData'),
- BoolOption('nostaticlib', 'do not build static library', True),
- BoolOption('pythonmodule', 'build python module', False),
- BoolOption('numpy', 'include support for numpy arrays', False),
- BoolOption('javamodule', 'build java module', False),
- BoolOption('lispmodule', 'build CFFI module', False),
- BoolOption('examples', 'build C++ examples', False),
- BoolOption('no_rtio', 'No RT IO', False),
- BoolOption('useASIO', 'Use ASIO, requires ASIO SDK files to be place in ./src/asio', False),
- ('install_name', 'on OSX, the dynamic library full install pathname (before installation)', 'lib/libsndobj.dylib'),
- ('pythonpath', 'python include path (defaults to usual places)', ''),
- ('pythonlibpath', 'python lib path (WIN only,defaults to usual places)', ''),
- ('javapath', 'java headers path (defaults to usual places)', ''),
- ('customCPPPATH', '',''),
- ('customCCFLAGS', '',''),
- ('customCXXFLAGS','',''),
- ('customLIBS','',''),
- ('customLIBPATH','',''),
- ('customSHLINKFLAGS','',''),
- ('customSWIGFLAGS','',''),
- ('version', 'library version','2.6')
- )
-
-opt.Update(env)
-opt.Save('options.cache',env)
-Help(opt.GenerateHelpText(env))
version = env['version']
major = '2'
-print "SndObj Library version is " + version
-
+print("SndObj Library version is %s " % (version,))
+
customCPPPATH = env['customCPPPATH']
env.Prepend(CPPPATH = customCPPPATH)
customCCFLAGS = env['customCCFLAGS']
@@ -108,55 +106,55 @@
customSWIGFLAGS = env['customSWIGFLAGS']
env.Prepend(SWIGFLAGS = customSWIGFLAGS)
-print "Building the Sound Object Library"
+print("Building the Sound Object Library")
configure = env.Configure()
buildasio = 0
-print "scons tools in this system: ", env['TOOLS']
+print("scons tools in this system: %s" % (env['TOOLS'],))
cffipath = ''
pythonlibpath = []
-print "Checking for Realtime IO support..."
+print("Checking for Realtime IO support...")
if not env['no_rtio']:
if getPlatform() == 'linux':
msvctools = False
- print "OS is Linux..."
+ print("OS is Linux...")
hdrs = env.Command('include/SndObj/AudioDefs.h', 'src/AudioDefs.h', "cp -f src/*.h include/SndObj")
perms = env.Command('perms', 'src/AudioDefs.h', "chmod a-x include/SndObj/*.h")
Depends(perms,hdrs)
swigdef = []
- alsaFound = configure.CheckHeader("alsa/asoundlib.h", language = "C")
- ossFound = configure.CheckHeader("soundcard.h", language="C")
- jackFound = configure.CheckHeader("jack/jack.h", language = "C")
- if alsaFound and env['alsa']:
- env.Append(CPPDEFINES="ALSA")
+ alsaFound = configure.CheckHeader("alsa/asoundlib.h", language = "C")
+ ossFound = configure.CheckHeader("soundcard.h", language="C")
+ jackFound = configure.CheckHeader("jack/jack.h", language = "C")
+ if alsaFound and env['ALSA']:
+ env.Append(CPPDEFINES="ALSA")
swigdef.append('-DALSA')
env.Append(LIBS=['asound'])
- print "The library realtime IO (class SndRTIO) will be configured for ALSA"
- rtio = True
- elif ossFound and env['oss']:
- env.Append(CPPDEFINES="OSS")
- print "The library realtime IO (class SndRTIO) will be configured for OSS"
+ print("The library realtime IO (class SndRTIO) will be configured for ALSA")
+ rtio = True
+ elif ossFound and env['OSS']:
+ env.Append(CPPDEFINES="OSS")
+ print("The library realtime IO (class SndRTIO) will be configured for OSS")
rtio = True
else:
- print "No alsa or OSS RT support"
- rtio = False
- if jackFound:
+ print("No alsa or OSS RT support")
+ rtio = False
+ if jackFound and env['JACK']:
env.Append(CPPDEFINES=Split('JACK'))
env.Append(LIBS=['jack'])
swigdef.append('-DJACK')
- print "The library will include support for Jack (Class SndJackIO)"
+ print("The library will include support for Jack (Class SndJackIO)")
pythonincpath = ['/usr/include/python' + getVersion(), env['pythonpath']]
javapath = ['/usr/lib/java/jvm/include', env['javapath']]
-
-
+
+
if getPlatform() == 'win':
- print "OS is Windows, environment is win32..."
- env.Append(CPPDEFINES="WIN")
+ print("OS is Windows, environment is win32...")
+ env.Append(CPPDEFINES="WIN")
swigdef = ['-DWIN', '-DSWIGFIX', '-D_MSBC']
if 'msvc'in env['TOOLS']: # MSVC
msvctools = True
hdrs = env.Command('include/SndObj/AudioDefs.h', 'src/AudioDefs.h', "copy src\\*.h include\\SndObj")
separateLibs = False
- print 'using MSVC...'
+ print('using MSVC...')
includes = ["C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\Include", "C:\\pthreads\\pthreads.2", \
"C:\\Python%c%c\\Lib\\site-packages\\numpy\\core\\include\\" % (getVersion()[0], getVersion()[2])]
libs = ["C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\Lib"]
@@ -167,15 +165,15 @@
msvctools = False
hdrs = env.Command('include/SndObj/AudioDefs.h', 'src/AudioDefs.h', "cp -f src/*.h include/SndObj")
separateLibs = True
- print 'using MINGW...'
+ print('using MINGW...')
env.Append(CPPDEFINES=['GCC', 'USE_WIN32THREADS'])
swigdef.append(['-DUSE_WIN32THREADS'])
includes = ''
libs = ''
pythonlib = 'python%c%c'% (getVersion()[0], getVersion()[2])
env.Append(CPPPATH=includes)
- env.Append(LIBPATH=libs)
- env.Append(LIBPATH=['lib'])
+ env.Append(LIBPATH=libs)
+ env.Append(LIBPATH=['lib'])
env.Append(LIBS=['winmm'])
if env['buildASIO']: buildasio = 1
rtio = True
@@ -186,9 +184,9 @@
javapath = ["C:\\Program Files\\Java\\jdk1.5.0_05",env['javapath']]
if getPlatform() == 'cygwin':
- print "OS is Windows, environment is Cygwin..."
+ print("OS is Windows, environment is Cygwin...")
msvctools = False
- env.Append(CPPDEFINES=['WIN', 'GCC'])
+ env.Append(CPPDEFINES=['WIN', 'GCC'])
swigdef = ['-DWIN', '-DSWIGFIX', '-D_MBCS']
env.Append(LIBS=['winmm', 'pthread'])
env.Append(LIBPATH=['lib'])
@@ -198,26 +196,26 @@
javapath = ['/usr/lib/java/jvm/include', env['javapath']]
if getPlatform() == 'macosx':
- print "OS is MacOSX"
+ print("OS is MacOSX")
msvctools = False
hdrs = env.Command('include/SndObj/AudioDefs.h', 'src/AudioDefs.h', "cp -f src/*.h include/SndObj")
- env.Append(CPPDEFINES="MACOSX")
+ env.Append(CPPDEFINES="MACOSX")
swigdef = ['-DMACOSX']
- env.Append(CPPPATH=["/system/library/Frameworks/CoreAudio.framework/Headers"])
+ env.Append(CPPPATH=["/system/library/Frameworks/CoreAudio.framework/Headers"])
env.Append(LINKFLAGS= ['-framework', 'coreaudio'])
jackFound = configure.CheckHeader("jack/jack.h", language = "C")
- if jackFound:
- env.Append(CPPDEFINES=Split('JACK'))
+ if jackFound and env['JACK']:
+ env.Append(CPPDEFINES=Split('JACK'))
env.Append(LIBS=Split('jack'))
swigdef.append('-DJACK')
- print "The library will include support for Jack (Class SndJackIO)"
+ print("The library will include support for Jack (Class SndJackIO)")
rtio = True
pythonincpath = [env['pythonpath'], '/Library/Frameworks/Python.framework/Headers', '/System/Library/Frameworks/Python.framework/Headers']
- javapath = ['/System/Library/Frameworks/JavaVM.framework', env['javapath']]
+ javapath = ['/System/Library/Frameworks/JavaVM.framework', env['javapath']]
if getPlatform() == 'sgi':
- print "OS is SGI/Irix..."
+ print("OS is SGI/Irix...")
msvctools = False
hdrs = env.Command('include/SndObj/AudioDefs.h', 'src/AudioDefs.h', "cp -f src/*.h include/SndObj")
env.Append(CPPDEFINES="SGI")
@@ -227,10 +225,10 @@
jackFound = False
pythonincpath = ['/usr/include/python' + getVersion(), env['pythonpath']]
javapath = ['/usr/lib/java/jvm/include', env['javapath']]
-
+
if getPlatform() == 'unsupported':
- print "Realtime IO not supported on this platform: %s" % sys.platform
+ print("Realtime IO not supported on this platform: %s" % sys.platform)
env['no_rtio'] = True
if env['no_rtio']:
@@ -240,23 +238,23 @@
env.Append(LIBS=['pthread'])
msvctools = False
jackFound = False
- pythonincpath = ['/usr/include/python%c%c' % (getVersion()[0], getVersion()[2]), env['pythonpath']]
+ pythonincpath = ['/usr/include/python%c%c' % (getVersion()[0], getVersion()[2]), env['pythonpath']]
javapath = ['/usr/java/include', env['javapath']]
if getPlatform() == 'macosx':
pythonincpath = [env['pythonpath'], '/Library/Frameworks/Python.framework/Headers', '/System/Library/Frameworks/Python.framework/Headers']
- javapath = ['/System/Library/Frameworks/JavaVM.framework', env['javapath']]
+ javapath = ['/System/Library/Frameworks/JavaVM.framework', env['javapath']]
if not msvctools:
flags = "-O2" + env['flags']
else:
flags = "-EHsc -O2" + env['flags']
-
+
#check endianness
if sys.byteorder == "big":
- print "Host is big endian"
+ print("Host is big endian")
env.Append(CPPFLAGS="-DWORDS_BIGENDIAN")
else:
- print "Host is little endian"
+ print("Host is little endian")
if not rtio:
env.Prepend(CPPDEFINES=['NO_RTIO'])
@@ -264,18 +262,18 @@
env.Prepend(CPPPATH= ['include','include/rfftw'])
swigcheck = 'swig' in env['TOOLS']
-print 'swig %s' % (["doesn't exist", "exists..."][int(swigcheck)])
+print('swig %s' % (["doesn't exist", "exists..."][int(swigcheck)]))
pythonh = configure.CheckHeader("Python.h", language = "C")
if not pythonh:
for i in pythonincpath:
pythonh = configure.CheckHeader("%s/Python.h" % i, language = "C")
if pythonh:
- print "Python version is " + getVersion()
+ print("Python version is %s" % (getVersion(),))
break
if not pythonh:
- print "Python headers are missing... cannot build python module"
+ print("Python headers are missing... cannot build python module")
pysndobj = env.Clone()
jsndobj = env.Clone()
@@ -288,79 +286,84 @@
#
# sources
-sndobjsources = Split("""Oscil.cpp Oscilt.cpp Oscili.cpp
-PhOscili.cpp ADSR.cpp IADSR.cpp Buzz.cpp
-Balance.cpp DelayLine.cpp Tap.cpp Tapi.cpp
-Comb.cpp Allpass.cpp StringFlt.cpp Pluck.cpp
-VDelay.cpp Pitch.cpp Loop.cpp Filter.cpp
-Reson.cpp Lp.cpp ButtBP.cpp ButtBR.cpp
-ButtHP.cpp ButtLP.cpp Mix.cpp Pan.cpp
-Gain.cpp SyncGrain.cpp Interp.cpp Phase.cpp
-Lookup.cpp Lookupi.cpp Ring.cpp Rand.cpp
-Randh.cpp Randi.cpp Unit.cpp Ap.cpp
-Hilb.cpp SndIn.cpp SndObj.cpp MidiIn.cpp
-MidiMap.cpp Bend.cpp Fir.cpp FFT.cpp
-IFFT.cpp Convol.cpp FastOsc.cpp Osc.cpp
-Osci.cpp PVA.cpp IFGram.cpp HiPass.cpp
-LowPass.cpp TpTz.cpp PVS.cpp PVMorph.cpp
-PVFilter.cpp PVMask.cpp PVMix.cpp
-PVTransp.cpp PVBlur.cpp PVRead.cpp
-SinAnal.cpp SinSyn.cpp AdSyn.cpp ReSyn.cpp IFAdd.cpp
-SndRead.cpp SpecIn.cpp SpecMult.cpp
-SpecCart.cpp SpecCombine.cpp SpecInterp.cpp
-SpecPolar.cpp SpecSplit.cpp SpecThresh.cpp
+sndobjsources = Split("""Oscil.cpp Oscilt.cpp Oscili.cpp
+PhOscili.cpp ADSR.cpp IADSR.cpp Buzz.cpp
+Balance.cpp DelayLine.cpp Tap.cpp Tapi.cpp
+Comb.cpp Allpass.cpp StringFlt.cpp Pluck.cpp
+VDelay.cpp Pitch.cpp Loop.cpp Filter.cpp
+Reson.cpp Lp.cpp ButtBP.cpp ButtBR.cpp
+ButtHP.cpp ButtLP.cpp Mix.cpp Pan.cpp
+Gain.cpp SyncGrain.cpp Interp.cpp Phase.cpp
+Lookup.cpp Lookupi.cpp Ring.cpp Rand.cpp
+Randh.cpp Randi.cpp Unit.cpp Ap.cpp
+Hilb.cpp SndIn.cpp SndObj.cpp MidiIn.cpp
+MidiMap.cpp Bend.cpp Fir.cpp FFT.cpp
+IFFT.cpp Convol.cpp FastOsc.cpp Osc.cpp
+Osci.cpp PVA.cpp IFGram.cpp HiPass.cpp
+LowPass.cpp TpTz.cpp PVS.cpp PVMorph.cpp
+PVFilter.cpp PVMask.cpp PVMix.cpp
+PVTransp.cpp PVBlur.cpp PVRead.cpp
+SinAnal.cpp SinSyn.cpp AdSyn.cpp ReSyn.cpp IFAdd.cpp
+SndRead.cpp SpecIn.cpp SpecMult.cpp
+SpecCart.cpp SpecCombine.cpp SpecInterp.cpp
+SpecPolar.cpp SpecSplit.cpp SpecThresh.cpp
SpecVoc.cpp Ptrack.cpp""")
-sndiosources = Split("""SndIO.cpp SndRTIO.cpp SndFIO.cpp
-SndWave.cpp SndAiff.cpp SndBuffer.cpp
-SndMidi.cpp SndMidiIn.cpp SndWaveX.cpp
+sndiosources = Split("""SndIO.cpp SndRTIO.cpp SndFIO.cpp
+SndWave.cpp SndAiff.cpp SndBuffer.cpp
+SndMidi.cpp SndMidiIn.cpp SndWaveX.cpp
SndPVOCEX.cpp SndSinIO.cpp SndCoreAudio.cpp SndJackIO.cpp """)
if buildasio == 1: sndiosources.append(" SndASIO.cpp ");
-tablesources = Split("""HarmTable.cpp UsrHarmTable.cpp
-TrisegTable.cpp SndTable.cpp PlnTable.cpp
-HammingTable.cpp NoteTable.cpp UsrDefTable.cpp
-LoPassTable.cpp ImpulseTable.cpp
+tablesources = Split("""HarmTable.cpp UsrHarmTable.cpp
+TrisegTable.cpp SndTable.cpp PlnTable.cpp
+HammingTable.cpp NoteTable.cpp UsrDefTable.cpp
+LoPassTable.cpp ImpulseTable.cpp
SpecEnvTable.cpp EnvTable.cpp PVEnvTable.cpp PVTable.cpp""")
-
+
sndthrsources = Split("""SndThread.cpp SndRTThread.cpp""")
fftwsources = Split("""config.c fcr_9.c fhf_6.c fn_8.c frc_1.c ftw_16.c ftwi_7.c \
-executor.c fftwnd.c fhf_7.c fn_9.c frc_10.c ftw_2.c ftwi_8.c
-fcr_1.c fhb_10.c fhf_8.c fni_1.c frc_11.c ftw_3.c ftwi_9.c
-fcr_10.c fhb_16.c fhf_9.c fni_10.c frc_12.c ftw_32.c generic.c
-fcr_11.c fhb_2.c fn_1.c fni_11.c frc_128.c ftw_4.c malloc.c
-fcr_12.c fhb_3.c fn_10.c fni_12.c frc_13.c ftw_5.c planner.c
-fcr_128.c fhb_32.c fn_11.c fni_13.c frc_14.c ftw_6.c putils.c
-fcr_13.c fhb_4.c fn_12.c fni_14.c frc_15.c ftw_64.c rader.c
-fcr_14.c fhb_5.c fn_13.c fni_15.c frc_16.c ftw_7.c rconfig.c
-fcr_15.c fhb_6.c fn_14.c fni_16.c frc_2.c ftw_8.c rexec.c
-fcr_16.c fhb_7.c fn_15.c fni_2.c frc_3.c ftw_9.c rexec2.c
-fcr_2.c fhb_8.c fn_16.c fni_3.c frc_32.c ftwi_10.c rfftwf77.c
-fcr_3.c fhb_9.c fn_2.c fni_32.c frc_4.c ftwi_16.c rfftwnd.c
-fcr_32.c fhf_10.c fn_3.c fni_4.c frc_5.c ftwi_2.c rgeneric.c
-fcr_4.c fhf_16.c fn_32.c fni_5.c frc_6.c ftwi_3.c rplanner.c
-fcr_5.c fhf_2.c fn_4.c fni_6.c frc_64.c ftwi_32.c timer.c
-fcr_6.c fhf_3.c fn_5.c fni_64.c frc_7.c ftwi_4.c twiddle.c
-fcr_64.c fhf_32.c fn_6.c fni_7.c frc_8.c ftwi_5.c wisdom.c
-fcr_7.c fhf_4.c fn_64.c fni_8.c frc_9.c ftwi_6.c wisdomio.c
+executor.c fftwnd.c fhf_7.c fn_9.c frc_10.c ftw_2.c ftwi_8.c
+fcr_1.c fhb_10.c fhf_8.c fni_1.c frc_11.c ftw_3.c ftwi_9.c
+fcr_10.c fhb_16.c fhf_9.c fni_10.c frc_12.c ftw_32.c generic.c
+fcr_11.c fhb_2.c fn_1.c fni_11.c frc_128.c ftw_4.c malloc.c
+fcr_12.c fhb_3.c fn_10.c fni_12.c frc_13.c ftw_5.c planner.c
+fcr_128.c fhb_32.c fn_11.c fni_13.c frc_14.c ftw_6.c putils.c
+fcr_13.c fhb_4.c fn_12.c fni_14.c frc_15.c ftw_64.c rader.c
+fcr_14.c fhb_5.c fn_13.c fni_15.c frc_16.c ftw_7.c rconfig.c
+fcr_15.c fhb_6.c fn_14.c fni_16.c frc_2.c ftw_8.c rexec.c
+fcr_16.c fhb_7.c fn_15.c fni_2.c frc_3.c ftw_9.c rexec2.c
+fcr_2.c fhb_8.c fn_16.c fni_3.c frc_32.c ftwi_10.c rfftwf77.c
+fcr_3.c fhb_9.c fn_2.c fni_32.c frc_4.c ftwi_16.c rfftwnd.c
+fcr_32.c fhf_10.c fn_3.c fni_4.c frc_5.c ftwi_2.c rgeneric.c
+fcr_4.c fhf_16.c fn_32.c fni_5.c frc_6.c ftwi_3.c rplanner.c
+fcr_5.c fhf_2.c fn_4.c fni_6.c frc_64.c ftwi_32.c timer.c
+fcr_6.c fhf_3.c fn_5.c fni_64.c frc_7.c ftwi_4.c twiddle.c
+fcr_64.c fhf_32.c fn_6.c fni_7.c frc_8.c ftwi_5.c wisdom.c
+fcr_7.c fhf_4.c fn_64.c fni_8.c frc_9.c ftwi_6.c wisdomio.c
fcr_8.c fhf_5.c fn_7.c fni_9.c ftw_10.c ftwi_64.c cfft.c""")
asios = Split("""iasiothiscallresolver.cpp asiodrivers.cpp asio.cpp asiolist.cpp""")
-sndsources = map(lambda x: './src/' + x, sndobjsources + sndiosources \
- + tablesources + sndthrsources)
-rfftsources = map(lambda x: './src/rfftw/' + x, fftwsources)
+sndsources = ['./src/' + x for x in sndobjsources + sndiosources \
+ + tablesources + sndthrsources]
+rfftsources = ['./src/rfftw/' + x for x in fftwsources]
-asiosources = map(lambda x: './src/asio/' + x, asios)
+asiosources = ['./src/asio/' + x for x in asios]
######################################################################
#
# build
+try:
+ os.mkdir('lib')
+except OSError:
+ pass
+
if getPlatform() != 'win':
- sources = sndsources + rfftsources
+ sources = sndsources + rfftsources
env.Prepend(CCFLAGS = flags)
if getPlatform() == 'macosx':
env.Append(LINKFLAGS=['-install_name', env['install_name']])
@@ -395,7 +398,7 @@
####################################################################
-#
+#
# Python module
if swigcheck and env['pythonmodule'] and pythonh:
@@ -443,7 +446,7 @@
####################################################################
-#
+#
# Java module
if swigcheck and env['javamodule']:
@@ -543,7 +546,7 @@
return None
# jack examples
-if jackFound:
+if jackFound and env['JACK']:
examples.Append(LIBS= ['jack'])
schroeder_jack = BuildExample('./bin/jack_schroeder','./obj/jack_schroeder.o', 'src/examples/jack_schroeder.cpp')
examples.Depends(schroeder_jack, deplibs)
@@ -551,15 +554,15 @@
Depends(streson_jack, deplibs)
# realtime IO examples
if rtio:
- rtschroeder = BuildExample('./bin/rtschroeder','./obj/rtschroeder.o', 'src/examples/rtschroeder.cpp')
+ rtschroeder = BuildExample('./bin/rtschroeder','./obj/rtschroeder.o', 'src/examples/rtschroeder.cpp')
Depends(rtschroeder, deplibs)
- streson = BuildExample('./bin/streson','./obj/streson.o', 'src/examples/streson.cpp')
- Depends(streson, deplibs)
- blurring = BuildExample('./bin/blurring','./obj/blurring.o', 'src/examples/blurring.cpp')
+ streson = BuildExample('./bin/streson','./obj/streson.o', 'src/examples/streson.cpp')
+ Depends(streson, deplibs)
+ blurring = BuildExample('./bin/blurring','./obj/blurring.o', 'src/examples/blurring.cpp')
Depends(blurring, deplibs)
- harmonise = BuildExample('./bin/harmonise','./obj/harmonise.o', 'src/examples/harmonise.cpp')
+ harmonise = BuildExample('./bin/harmonise','./obj/harmonise.o', 'src/examples/harmonise.cpp')
Depends(harmonise, deplibs)
- transpose = BuildExample('./bin/transpose','./obj/transpose.o', 'src/examples/transpose.cpp')
+ transpose = BuildExample('./bin/transpose','./obj/transpose.o', 'src/examples/transpose.cpp')
Depends(transpose, deplibs)
# schroeder
schroeder = BuildExample('./bin/schroeder','./obj/schroeder.o', 'src/examples/schroeder.cpp')
@@ -580,7 +583,7 @@
# morph PD class
if configure.CheckHeader("m_pd.h", language="C") and env['examples']:
if getPlatform() == 'linux':
- morph = examples.SharedLibrary('./bin/morph~','src/examples/morph_tilde.cpp',
+ morph = examples.SharedLibrary('./bin/morph~','src/examples/morph_tilde.cpp',
SHLIBPREFIX = '', SHLIBSUFFIX= '.pd_linux', CCFLAGS=flags)
elif getPlatform() == 'macosx':
morphex = examples.Copy()
@@ -593,13 +596,13 @@
pdbin = env['pddir'] + "//bin"
examples.Append(LIBPATH=Split(pdbin))
examples.Append(LIBS=Split("pd"))
- morph = examples.SharedLibrary('./bin/morph~', 'src/examples/morph_tilde.cpp', CCFLAGS=flags)
+ morph = examples.SharedLibrary('./bin/morph~', 'src/examples/morph_tilde.cpp', CCFLAGS=flags)
Depends(morph, deplibs)
# LADSPA plugin example
if configure.CheckHeader("ladspa.h", language="C") and getPlatform() == 'linux' and env['examples']:
ladspa_srcs = ['src/examples/Ladspaplug.cpp', 'src/examples/ladspa_example.cpp']
- ladspa = examples.SharedLibrary('bin/ladspaex', ladspa_srcs, CCFLAGS=flags)
+ ladspa = examples.SharedLibrary('bin/ladspaex', ladspa_srcs, CCFLAGS=flags)
Depends(ladspa, deplibs)
@@ -609,12 +612,12 @@
pydest = env['instdir'] + distutils.sysconfig.get_python_lib()
prefix = env['instdir'] + env['prefix']
-print env['instdir']
+print(env['instdir'])
if msvctools:
prefix = ''
if env['pythonmodule']:
- print "installing python module in %s" % pydest
+ print("installing python module in %s" % pydest)
f = open('python/__init__.py', 'wt')
f.write('from sndobj import *')
f.close()
@@ -630,7 +633,7 @@
env.InstallAs(libdest, inst)
if env['pythonmodule']:
pytems = [ 'sndobj.py', '_sndobj.so']
- for i in pytems:
+ for i in pytems:
env.Install(pydest,os.path.join('python/',i))
elif getPlatform() == 'win' or getPlatform() == 'cygwin':
@@ -641,19 +644,19 @@
rfftwlibdest = prefix+'/lib/librfftw.a'
env.InstallAs(rfftwlibdest, rfftwlib)
if env['pythonmodule']:
- print "installing python module in %s" % pydest
+ print("installing python module in %s" % pydest)
pytems = [ 'python/sndobj.py', 'python/_sndobj.pyd']
for i in pytems:
env.InstallAs(os.path.join(pydest, i),i)
# Linux or other OSs (unix-like)
- else:
+ else:
libdest = prefix + '/lib/libsndobj.so'
instl = env.InstallAs(libdest + '.' + version, sndobjlib)
linkl = env.Command(libdest,libdest + '.' + version, 'cd %s;ln -sf libsndobj.so.%s libsndobj.so' % (prefix+'/lib', version))
- print "installing python module in %s" % pydest
+ print("installing python module in %s" % pydest)
if env['pythonmodule']:
- print "installing python module in %s" % pydest
+ print("installing python module in %s" % pydest)
pytems = [ 'python/sndobj.py', '_sndobj.so']
for i in pytems:
env.InstallAs(os.path.join(pydest, os.path.basename(i)), i)
@@ -661,27 +664,27 @@
#env.InstallAs(licensedest, 'License.txt')
if not env['nostaticlib']:
- env.Install(libdest, sndobjliba)
+ env.Install(libdest, sndobjliba)
incdest = prefix + '/include/SndObj/'
- headers = map(lambda x: './include/SndObj/' + x, os.listdir('./include/SndObj'))
+ headers = ['./include/SndObj/' + x for x in os.listdir('./include/SndObj')]
for header in headers:
if(header != './include/SndObj/CVS' and header[17] != '.'):
#env.Execute(Chmod(header, 0555))
- env.Install(incdest, header)
- rfftw_headers = map(lambda x: './include/rfftw/' + x, os.listdir('./include/rfftw'))
+ env.Install(incdest, header)
+ rfftw_headers = ['./include/rfftw/' + x for x in os.listdir('./include/rfftw')]
rfftw_incdest = prefix + '/include/rfftw/'
for header in rfftw_headers:
if(header != './include/rfftw/CVS'):
#env.Execute(Chmod(header, 0555))
- env.Install(rfftw_incdest, header)
+ env.Install(rfftw_incdest, header)
if getPlatform() == 'win':
- other_headers = map(lambda x: './include/' + x, os.listdir('./include/'))
+ other_headers = ['./include/' + x for x in os.listdir('./include/')]
other_incdest = prefix + '/include/'
for header in other_headers:
#env.Execute(Chmod(header, 0555)
if(header != './include/rfftw'):
if(header != './include/CVS'):
if(header != './include/SndObj'):
- env.Install(other_incdest, header)
+ env.Install(other_incdest, header)
-env.Alias('install', [prefix,pydest])
+env.Alias('install', [prefix,pydest])
--- sndobj.orig/trane/SConstruct
+++ sndobj/trane/SConstruct
@@ -5,37 +5,37 @@
env.SConsignFile()
def getVersion():
- return sys.version[:3]
+ return sys.version[:3]
def getPlatform():
if sys.platform[:5] == 'linux':
return 'linux'
elif sys.platform[:3] == 'win':
if env['PLATFORM'] == 'win32':
- return 'win'
- else:
- return 'cygwin'
+ return 'win'
+ else:
+ return 'cygwin'
elif sys.platform[:6] == 'darwin':
- return 'macosx'
+ return 'e'
else:
return 'unsupported'
print "Building The Trane Thing instrument"
configure = env.Configure()
env.Append(LIBS=['sndobj', 'fltk'])
-
+
if getPlatform() == 'linux':
print "OS is Linux..."
- alsaFound = configure.CheckHeader("alsa/asoundlib.h", language = "C")
- ossFound = configure.CheckHeader("soundcard.h", language="C")
+ alsaFound = configure.CheckHeader("alsa/asoundlib.h", language = "C")
+ ossFound = configure.CheckHeader("soundcard.h", language="C")
env.Append(CPPPATH=['/usr/local/include', '../include'])
- env.Append(LIBPATH=['/usr/local/lib', '../lib'])
- if alsaFound:
- env.Append(CPPDEFINES="ALSA")
+ env.Append(LIBPATH=['/usr/local/lib', '../lib'])
+ if alsaFound:
+ env.Append(CPPDEFINES="ALSA")
env.Append(LIBS=['asound'])
print "using ALSA"
- elif ossFound:
- env.Append(CPPDEFINES="OSS")
+ elif ossFound:
+ env.Append(CPPDEFINES="OSS")
print "using OSS"
fltkFound = configure.CheckHeader("Fl/Fl.H", language = "C++")
sources = Split("""main.cpp Instrument.cpp""")
@@ -45,7 +45,7 @@
elif getPlatform() == 'win':
print "OS is Windows, environment is win32..."
- env.Append(CPPDEFINES="WIN")
+ env.Append(CPPDEFINES="WIN")
if 'msvc'in env['TOOLS']: # MSVC
includes = "C:\\Program Files\\Microsoft Visual Studio\\VC98\\include"
libs = "C:\\Program Files\\Microsoft Visual Studio\\VC98\\lib"
@@ -57,13 +57,13 @@
env.Append(CPPDEFINES=['GCC', 'USE_WIN32THREADS'])
includes = 'c:/msys/1.0/local/include'
libs = 'c:/msys/1.0/local/lib'
- env.Append(LINKFLAGS='-mwindows')
+ env.Append(LINKFLAGS='-mwindows')
env.Append(LIBS=['pthreadVC', 'uuid', 'wsock32', 'comctl32', 'ole32'])
res = env.Command("trane_res.o", "trane.rc", "windres -o trane_res.o trane.rc")
sources = Split("""main.cpp Instrument.cpp trane_res.o""")
env.Append(CPPPATH=[includes, '../include'])
- env.Append(LIBPATH=[libs])
- env.Append(LIBPATH=['../lib'])
+ env.Append(LIBPATH=[libs])
+ env.Append(LIBPATH=['../lib'])
env.Append(LIBS=['winmm'])
fltkFound = configure.CheckHeader("FL/Fl.H", language = "C++")
if not fltkFound:
@@ -72,11 +72,11 @@
elif getPlatform() == 'macosx':
print "OS is MacOSX"
- env.Append(CPPDEFINES="MACOSX")
+ env.Append(CPPDEFINES="MACOSX")
swigdef = ['-DMACOSX']
env.Append(CPPPATH=['/usr/local/include', '../include'])
- env.Append(LIBPATH=['/usr/local/lib', '../lib'])
- env.Append(CPPPATH=["/system/library/Frameworks/CoreAudio.framework/Headers"])
+ env.Append(LIBPATH=['/usr/local/lib', '../lib'])
+ env.Append(CPPPATH=["/system/library/Frameworks/CoreAudio.framework/Headers"])
env.Append(LINKFLAGS= ['-framework', 'coreaudio'])
fltkFound = configure.CheckHeader("Fl/Fl.H", language = "C++")
sources = Split("""main.cpp Instrument.cpp""")
@@ -93,6 +93,3 @@
env.Command('trane.app/Contents/MacOS/trane', 'trane', 'cp -f trane trane.app/Contents/MacOS/;install_name_tool -change lib/libsndobj.dylib @executable_path/../Resources/libsndobj.dylib trane.app/Contents/MacOS/trane; install_name_tool -change /usr/local/lib/libfltk1.1.dylib @executable_path/../Resources/libfltk1.1.dylib trane.app/Contents/MacOS/trane')
env.Command('trane.app/Contents/Resources/libsndobj.dylib', '../lib/libsndobj.dylib', 'cp -f ../lib/libsndobj.dylib trane.app/Contents/Resources;install_name_tool -id libsndobj.dylib trane.app/Contents/Resources/libsndobj.dylib')
env.Command('trane.app/Contents/Resources/libfltk.1.1.dylib', '/usr/local/lib/libfltk.1.1.dylib', 'cp -f /usr/local/lib/libfltk.1.1.dylib trane.app/Contents/Resources;install_name_tool -id libfltk.1.1.dylib trane.app/Contents/Resources/libfltk.1.1.dylib')
-
-
-
|