set-punch-loop-from-region added (missing somehow!); keybindings changed; tarball...
[ardour.git] / SConstruct
index 1336c53b08a57734c4c11d8ebbbe1b791c514690..a2588d6ab596c4f611d44026f154d98159e94dc3 100644 (file)
@@ -16,7 +16,7 @@ import SCons.Node.FS
 SConsignFile()
 EnsureSConsVersion(0, 96)
 
-ardour_version = '2.1'
+ardour_version = '2.2'
 
 subst_dict = { }
 
@@ -231,6 +231,7 @@ def i18n (buildenv, sources, installenv):
         buildenv.PoBuild(po_file, ['po/'+po_file, potfile])
         mo_file = po_file.replace (".po", ".mo")
         installenv.Alias ('install', buildenv.MoBuild (mo_file, po_file))
+        installenv.Alias ('msgupdate', buildenv.MoBuild (mo_file, po_file))
     
     for lang in languages:
         modir = (os.path.join (install_prefix, 'share/locale/' + lang + '/LC_MESSAGES/'))
@@ -363,7 +364,7 @@ def distcopy (target, source, env):
     return p.close ()
 
 def tarballer (target, source, env):
-    cmd = 'tar -jcf ' + str (target[0]) +  ' ' + str(source[0]) + "  --exclude '*~'"
+    cmd = 'tar -jcf ' + str (target[0]) +  ' ' + str(source[0]) + "  --exclude '*~'" + " --exclude .svn --exclude '.svn/*'"
     print 'running ', cmd, ' ... '
     p = os.popen (cmd)
     return p.close ()
@@ -403,6 +404,29 @@ else:
         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 #
 #######################
@@ -425,22 +449,21 @@ def DependenciesRequiredMessage():
        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)
-    print ("Result was [%s]" % ret[1])
-    context.Result (ret[0])
+    ret = context.TryAction('pkg-config --exists %s' % name)[0]
+    context.Result (ret)
     return ret
 
 conf = Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig,
@@ -744,37 +767,18 @@ def prep_libcheck(topenv, libinfo):
 
 prep_libcheck(env, env)
 
-#
-# check for VAMP and rubberband (currently optional)
-#
-
-libraries['vamp'] = LibraryInfo()
-
-env['RUBBERBAND'] = False
-
-conf = libraries['vamp'].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
-
-print "---> WE HAVE VAMP: ", have_vamp
-
-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 ()
+libraries['vamp'] = LibraryInfo (LIBS='vampsdk',
+                                 LIBPATH='#libs/vamp-sdk',
+                                 CPPPATH='#libs/vamp-sdk/vamp')
 
+if conf.CheckHeader ('fftw3.h'):
+    env['RUBBERBAND'] = True
+    libraries['rubberband'] = LibraryInfo (LIBS='rubberband',
+                                           LIBPATH='#libs/rubberband',
+                                           CPPPATH='#libs/rubberband',
+                                           CCFLAGS='-DUSE_RUBBERBAND')
+    
 #
 # Check for libusb
 
@@ -960,6 +964,7 @@ if env['SYSLIBS']:
         'libs/pbd',
         'libs/midi++2',
         'libs/ardour',
+        'libs/vamp-sdk',
     # these are unconditionally included but have
     # tests internally to avoid compilation etc
     # if VST is not set
@@ -1024,6 +1029,7 @@ else:
         'libs/pbd',
         'libs/midi++2',
         'libs/ardour',
+        'libs/vamp-sdk',
     # these are unconditionally included but have
     # tests internally to avoid compilation etc
     # if VST is not set
@@ -1086,28 +1092,11 @@ else:
 #
 
 timefx_subdirs = ['libs/soundtouch']
-if env['RUBBERBAND']:
-    timefx_subdirs += ['libs/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'] :