SConsignFile()
EnsureSConsVersion(0, 96)
-ardour_version = '2.0.5'
+ardour_version = '2.1'
subst_dict = { }
BoolOption('AUDIOUNITS', 'Compile with Apple\'s AudioUnit library. (experimental)', 0),
BoolOption('COREAUDIO', 'Compile with Apple\'s CoreAudio library', 0),
BoolOption('GTKOSX', 'Compile for use with GTK-OSX, not GTK-X11', 0),
- PathOption('GTKOSX_PREFIX', 'Configure-style prefix used to install GTK-Quartz', "/opt/gtk"),
+ BoolOption('NATIVE_OSX_KEYS', 'Build key bindings file that matches OS X conventions', 0),
BoolOption('DEBUG', 'Set to build with debugging information and no optimizations', 0),
PathOption('DESTDIR', 'Set the intermediate install "prefix"', '/'),
EnumOption('DIST_TARGET', 'Build target for cross compiling packagers', 'auto', allowed_values=('auto', 'i386', 'i686', 'x86_64', 'powerpc', 'tiger', 'panther', 'none' ), ignorecase=2),
self.Append (LIBPATH = other.get ('LIBPATH', []))
self.Append (CPPPATH = other.get('CPPPATH', []))
self.Append (LINKFLAGS = other.get('LINKFLAGS', []))
+ self.Append (CCFLAGS = other.get('CCFLAGS', []))
self.Replace(LIBPATH = list(Set(self.get('LIBPATH', []))))
self.Replace(CPPPATH = list(Set(self.get('CPPPATH',[]))))
#doing LINKFLAGS breaks -framework
os.remove('.personal_use_only')
+####################
+# push environment
+####################
+
+def pushEnvironment(context):
+ if os.environ.has_key('PATH'):
+ context.Append(PATH = os.environ['PATH'])
+
+ if os.environ.has_key('PKG_CONFIG_PATH'):
+ context.Append(PKG_CONFIG_PATH = os.environ['PKG_CONFIG_PATH'])
+
+ if os.environ.has_key('CC'):
+ context['CC'] = os.environ['CC']
+
+ if os.environ.has_key('CXX'):
+ context['CXX'] = os.environ['CXX']
+
+ if os.environ.has_key('DISTCC_HOSTS'):
+ context['ENV']['DISTCC_HOSTS'] = os.environ['DISTCC_HOSTS']
+ context['ENV']['HOME'] = os.environ['HOME']
+
+pushEnvironment (env)
+
#######################
# Dependency Checking #
#######################
print 'Please consult http://ardour.org/building for more information'
def CheckPKGConfig(context, version):
- context.Message( 'Checking for pkg-config version >= %s... ' %version )
- ret = context.TryAction('pkg-config --atleast-pkgconfig-version=%s' % version)[0]
- context.Result( ret )
- return ret
+ context.Message( 'Checking for pkg-config version >= %s... ' %version )
+ ret = context.TryAction('pkg-config --atleast-pkgconfig-version=%s' % version)[0]
+ context.Result( ret )
+ return ret
def CheckPKGVersion(context, name, version):
- context.Message( 'Checking for %s... ' % name )
- ret = context.TryAction('pkg-config --atleast-version=%s %s' %(version,name) )[0]
- context.Result( ret )
- return ret
+ context.Message( 'Checking for %s... ' % name )
+ ret = context.TryAction('pkg-config --atleast-version=%s %s' %(version,name) )[0]
+ context.Result( ret )
+ return ret
+
+def CheckPKGExists(context, name):
+ context.Message ('Checking for %s...' % name)
+ ret = context.TryAction('pkg-config --exists %s' % name)[0]
+ context.Result (ret)
+ return ret
conf = Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig,
'CheckPKGVersion' : CheckPKGVersion })
libraries['samplerate'] = LibraryInfo()
libraries['samplerate'].ParseConfig('pkg-config --cflags --libs samplerate')
+conf = env.Configure (custom_tests = { 'CheckPKGExists' : CheckPKGExists } )
+
+if conf.CheckPKGExists ('fftw3f'):
+ libraries['fftw3f'] = LibraryInfo()
+ libraries['fftw3f'].ParseConfig('pkg-config --cflags --libs fftw3f')
+
+if conf.CheckPKGExists ('fftw3'):
+ libraries['fftw3'] = LibraryInfo()
+ libraries['fftw3'].ParseConfig('pkg-config --cflags --libs fftw3')
+
+env = conf.Finish ()
+
if env['FFT_ANALYSIS']:
- libraries['fftw3f'] = LibraryInfo()
- libraries['fftw3f'].ParseConfig('pkg-config --cflags --libs fftw3f')
#
# Check for fftw3 header as well as the library
- conf = Configure (libraries['fftw3f'])
- if conf.CheckHeader ('fftw3.h') == False:
- print "FFT Analysis cannot be compiled without the FFTW3 headers, which don't seem to be installed"
- sys.exit (1)
- libraries['fftw3f'] = conf.Finish();
+ #
+ conf = Configure(libraries['fftw3'])
+
+ if conf.CheckHeader ('fftw3.h') == False:
+ print ('FFT Analysis cannot be compiled without the FFTW3 headers, which do not seem to be installed')
+ sys.exit (1)
+ conf.Finish()
+
libraries['jack'] = LibraryInfo()
libraries['jack'].ParseConfig('pkg-config --cflags --libs jack')
# SCons should really do this for us
-conf = Configure (env)
+conf = env.Configure ()
have_cxx = conf.TryAction (Action (str(env['CXX']) + ' --version'))
if have_cxx[0] != 1:
# rationale: GTK-Quartz uses jhbuild and installs to /opt/gtk by default.
# All libraries needed should be built against this location
if topenv['GTKOSX']:
- libinfo.Append(CCFLAGS="-I/opt/gtk/include", LINKFLAGS="-L/opt/gtk/lib")
- libinfo.Append(CCFLAGS="-I/opt/local/include", LINKFLAGS="-L/opt/local/lib")
+ libinfo.Append(CPPPATH="/opt/gtk/include", LIBPATH="/opt/gtk/lib")
+ libinfo.Append(CXXFLAGS="-I/opt/gtk/include", LINKFLAGS="-L/opt/gtk/lib")
+ libinfo.Append(CPPPATH="/opt/local/include", LIBPATH="/opt/local/lib")
+ libinfo.Append(CXXFLAGS="-I/opt/local/include", LINKFLAGS="-L/opt/local/lib")
prep_libcheck(env, env)
+#
+# check for VAMP and rubberband (currently optional)
+#
+
+libraries['vamp'] = LibraryInfo()
+
+env['RUBBERBAND'] = False
+
+conf = env.Configure (custom_tests = { 'CheckPKGExists' : CheckPKGExists } )
+
+if conf.CheckPKGExists('vamp-sdk'):
+ have_vamp = True
+ libraries['vamp'].ParseConfig('pkg-config --cflags --libs vamp-sdk')
+else:
+ have_vamp = False
+
+libraries['vamp'] = conf.Finish ()
+
+if have_vamp:
+ if os.path.exists ('libs/rubberband/src'):
+ conf = Configure (libraries['vamp'])
+ if conf.CheckHeader ('fftw3.h'):
+ env['RUBBERBAND'] = True
+ libraries['rubberband'] = LibraryInfo (LIBS='rubberband',
+ LIBPATH='#libs/rubberband',
+ CPPPATH='#libs/rubberband',
+ CCFLAGS='-DUSE_RUBBERBAND')
+ libraries['vamp'] = conf.Finish ()
+
#
# Check for libusb
libraries['flac'] = LibraryInfo ()
prep_libcheck(env, libraries['flac'])
-libraries['flac'].Append(CCFLAGS="-I/usr/local/include", LINKFLAGS="-L/usr/local/lib")
+libraries['flac'].Append(CPPPATH="/usr/local/include", LIBPATH="/usr/local/lib")
#
# june 1st 2007: look for a function that is in FLAC 1.1.2 and not in later versions
libraries['boost'] = LibraryInfo ()
prep_libcheck(env, libraries['boost'])
-libraries['boost'].Append(CCFLAGS="-I/usr/local/include", LINKFLAGS="-L/usr/local/lib")
+libraries['boost'].Append(CPPPATH="/usr/local/include", LIBPATH="/usr/local/lib")
conf = Configure (libraries['boost'])
if conf.CheckHeader ('boost/shared_ptr.hpp', language='CXX') == False:
print "Boost header files do not appear to be installed."
CPPPATH='#libs/appleutility')
coredirs = [
- 'libs/soundtouch',
'templates'
]
else:
env['POWERMATE'] = 0
env['TRANZPORT'] = 0
+
+#
+# timestretch libraries
+#
+
+timefx_subdirs = ['libs/soundtouch']
+if env['RUBBERBAND']:
+ timefx_subdirs += ['libs/rubberband']
opts.Save('scache.conf', env)
Help(opts.GenerateHelpText(env))
-if os.environ.has_key('PATH'):
- env.Append(PATH = os.environ['PATH'])
-
-if os.environ.has_key('PKG_CONFIG_PATH'):
- env.Append(PKG_CONFIG_PATH = os.environ['PKG_CONFIG_PATH'])
-
-if os.environ.has_key('CC'):
- env['CC'] = os.environ['CC']
-
-if os.environ.has_key('CXX'):
- env['CXX'] = os.environ['CXX']
-
-if os.environ.has_key('DISTCC_HOSTS'):
- env['ENV']['DISTCC_HOSTS'] = os.environ['DISTCC_HOSTS']
- env['ENV']['HOME'] = os.environ['HOME']
-
final_prefix = '$PREFIX'
if env['DESTDIR'] :
# specbuild = env.SubstInFile ('ardour.spec','ardour.spec.in', SUBST_DICT = subst_dict)
the_revision = env.Command ('frobnicatory_decoy', [], create_stored_revision)
+remove_ardour = env.Command ('frobnicatory_decoy2', [],
+ [ Delete ('$PREFIX/etc/ardour2'),
+ Delete ('$PREFIX/lib/ardour2'),
+ Delete ('$PREFIX/bin/ardour2')])
env.Alias('revision', the_revision)
env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour_system.rc'))
+env.Alias('uninstall', remove_ardour)
Default (sysrcbuild)
for subdir in coredirs:
SConscript (subdir + '/SConscript')
-for sublistdir in [ subdirs, gtk_subdirs, surface_subdirs ]:
+for sublistdir in [ subdirs, timefx_subdirs, gtk_subdirs, surface_subdirs ]:
for subdir in sublistdir:
SConscript (subdir + '/SConscript')