wscript: consistently use 4 spaces for indentation

This commit is contained in:
Mads Kiilerich 2022-01-25 00:38:32 +01:00
parent c3bdcdd3fa
commit bac32a8c2d
7 changed files with 98 additions and 98 deletions

View File

@ -64,7 +64,7 @@ gtk2_ardour_sources = [
'automation_streamview.cc', 'automation_streamview.cc',
'automation_time_axis.cc', 'automation_time_axis.cc',
'axis_view.cc', 'axis_view.cc',
# 'beatbox_gui.cc', # 'beatbox_gui.cc',
'bbt_marker_dialog.cc', 'bbt_marker_dialog.cc',
'big_clock_window.cc', 'big_clock_window.cc',
'big_transport_window.cc', 'big_transport_window.cc',
@ -331,7 +331,7 @@ gtk2_ardour_sources = [
'virtual_keyboard_window.cc', 'virtual_keyboard_window.cc',
'visibility_group.cc', 'visibility_group.cc',
'window_manager.cc', 'window_manager.cc',
# video-timeline related sources: # video-timeline related sources:
'video_image_frame.cc', 'video_image_frame.cc',
'add_video_dialog.cc', 'add_video_dialog.cc',
'editor_videotimeline.cc', 'editor_videotimeline.cc',
@ -820,8 +820,8 @@ def build(bld):
# @FONT_SIZE_XXXX@ # @FONT_SIZE_XXXX@
for sizename,points in iter(font_sizes.items()): for sizename,points in iter(font_sizes.items()):
key = "_".join (['FONT_SIZE',sizename]) key = "_".join (['FONT_SIZE',sizename])
font_subst_dict[key] = points font_subst_dict[key] = points
# various font names, eg @BOLD_MONOSPACE@ # various font names, eg @BOLD_MONOSPACE@
for font_sym,text in iter(font_names.items()): for font_sym,text in iter(font_names.items()):
@ -969,28 +969,28 @@ def build(bld):
mo) mo)
def i18n(bld): def i18n(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR'] I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
autowaf.build_i18n(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources, autowaf.build_i18n(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis') 'Paul Davis')
appdata_i18n_pot(bld) appdata_i18n_pot(bld)
appdata_i18n_po(bld) appdata_i18n_po(bld)
def i18n_pot(bld): def i18n_pot(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR'] I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
autowaf.build_i18n_pot(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources, autowaf.build_i18n_pot(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis') 'Paul Davis')
appdata_i18n_pot(bld) appdata_i18n_pot(bld)
def i18n_po(bld): def i18n_po(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR'] I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
autowaf.build_i18n_po(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources, autowaf.build_i18n_po(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis') 'Paul Davis')
appdata_i18n_po(bld) appdata_i18n_po(bld)
def i18n_mo(bld): def i18n_mo(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR'] I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
autowaf.build_i18n_mo(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources, autowaf.build_i18n_mo(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis') 'Paul Davis')
def appdata_i18n_pot(bld): def appdata_i18n_pot(bld):
potfile = os.path.join(bld.top_dir, 'gtk2_ardour', 'appdata', potfile = os.path.join(bld.top_dir, 'gtk2_ardour', 'appdata',
@ -1002,9 +1002,9 @@ def appdata_i18n_pot(bld):
'ardour.appdata.xml.in.in') 'ardour.appdata.xml.in.in')
Logs.info('Updating ' + potfile) Logs.info('Updating ' + potfile)
try: try:
subprocess.call(('itstool', '-i', itsfile, '-o', potfile, adsource)) subprocess.call(('itstool', '-i', itsfile, '-o', potfile, adsource))
except: except:
print ('Error processing appdata pot file - ignored') print ('Error processing appdata pot file - ignored')
elif bld.cmd == 'clean' and os.path.exists(potfile): elif bld.cmd == 'clean' and os.path.exists(potfile):
Logs.info('Removing Ardour appdata pot file') Logs.info('Removing Ardour appdata pot file')
os.remove(potfile) os.remove(potfile)

View File

@ -489,14 +489,14 @@ def build(bld):
avx_sources = [ 'sse_functions_avx_linux.cc' ] avx_sources = [ 'sse_functions_avx_linux.cc' ]
fma_sources = [ 'x86_functions_fma.cc' ] fma_sources = [ 'x86_functions_fma.cc' ]
elif bld.env['build_target'] == 'mingw': elif bld.env['build_target'] == 'mingw':
# usability of the 64 bit windows assembler depends on the compiler target, # usability of the 64 bit windows assembler depends on the compiler target,
# not the build host, which in turn can only be inferred from the name # not the build host, which in turn can only be inferred from the name
# of the compiler. # of the compiler.
if re.search ('x86_64-w64', str(bld.env['CC'])): if re.search ('x86_64-w64', str(bld.env['CC'])):
obj.source += [ 'sse_functions_xmm.cc' ] obj.source += [ 'sse_functions_xmm.cc' ]
obj.source += [ 'sse_functions_64bit_win.s', 'sse_avx_functions_64bit_win.s' ] obj.source += [ 'sse_functions_64bit_win.s', 'sse_avx_functions_64bit_win.s' ]
avx_sources = [ 'sse_functions_avx.cc' ] avx_sources = [ 'sse_functions_avx.cc' ]
fma_sources = [ 'x86_functions_fma.cc' ] fma_sources = [ 'x86_functions_fma.cc' ]
elif bld.env['build_target'] == 'aarch64': elif bld.env['build_target'] == 'aarch64':
obj.source += ['arm_neon_functions.cc'] obj.source += ['arm_neon_functions.cc']
obj.defines += [ 'ARM_NEON_SUPPORT' ] obj.defines += [ 'ARM_NEON_SUPPORT' ]

View File

@ -49,15 +49,15 @@ def configure(conf):
# Check to see if jack_port_rename() is available and working # Check to see if jack_port_rename() is available and working
if conf.env['libjack_link'] == 'link': if conf.env['libjack_link'] == 'link':
conf.check_cxx(fragment = "#include <jack/jack.h>\nint main(void) { jack_client_t* c; jack_port_t* p; jack_port_rename (c, p, \"foo\"); return 0; }\n", conf.check_cxx(fragment = "#include <jack/jack.h>\nint main(void) { jack_client_t* c; jack_port_t* p; jack_port_rename (c, p, \"foo\"); return 0; }\n",
mandatory = False, mandatory = False,
execute = False, execute = False,
features = ['cxx'], features = ['cxx'],
msg = 'Checking for jack_port_rename()', msg = 'Checking for jack_port_rename()',
okmsg = 'ok', okmsg = 'ok',
errmsg = 'not found (or broken). jack_port_rename() will not be used, and jack_port_set_name() will be used instead', errmsg = 'not found (or broken). jack_port_rename() will not be used, and jack_port_set_name() will be used instead',
define_name = 'HAVE_JACK_PORT_RENAME', define_name = 'HAVE_JACK_PORT_RENAME',
uselib = 'JACK') uselib = 'JACK')
def build(bld): def build(bld):
obj = bld(features = 'c cxx cxxshlib') obj = bld(features = 'c cxx cxxshlib')
@ -115,4 +115,4 @@ def build(bld):
# #
if re.search ("linux", sys.platform) != None: if re.search ("linux", sys.platform) != None:
obj.uselib += [ 'ALSA' ] obj.uselib += [ 'ALSA' ]

View File

@ -71,7 +71,7 @@ def configure(conf):
else: else:
print('You are missing the libbluetooth headers needed to compile wiimote support') print('You are missing the libbluetooth headers needed to compile wiimote support')
else: else:
print('You are missing the cwiid headers needed to compile wiimote support') print('You are missing the cwiid headers needed to compile wiimote support')
autowaf.check_pkg(conf, 'libwebsockets', uselib_store='WEBSOCKETS', atleast_version='2.0.0', mandatory=False) autowaf.check_pkg(conf, 'libwebsockets', uselib_store='WEBSOCKETS', atleast_version='2.0.0', mandatory=False)
if conf.is_defined('HAVE_WEBSOCKETS'): if conf.is_defined('HAVE_WEBSOCKETS'):

View File

@ -27,7 +27,7 @@ def configure(conf):
def build(bld): def build(bld):
VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR']) VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR'])
if not bld.is_defined('HAVE_READLINE'): if not bld.is_defined('HAVE_READLINE'):
return; return;
# commandline luasession wrapper script # commandline luasession wrapper script
if bld.env['build_target'] != 'mingw': if bld.env['build_target'] != 'mingw':

View File

@ -7,37 +7,37 @@ top = '.'
out = 'build' out = 'build'
def options(ctx): def options(ctx):
pass pass
def configure(ctx): def configure(ctx):
pass pass
def build(bld): def build(bld):
obj = bld (features = 'cxx c cxxprogram') obj = bld (features = 'cxx c cxxprogram')
obj.install_path = None obj.install_path = None
obj.source = [ 'bb.cc', 'gui.cc', 'misc.cc' ] obj.source = [ 'bb.cc', 'gui.cc', 'misc.cc' ]
obj.target = 'bb' obj.target = 'bb'
obj.includes = ['.', '../libs'] obj.includes = ['.', '../libs']
obj.use = [ 'libardour', 'libevoral', ] obj.use = [ 'libardour', 'libevoral', ]
obj.uselib = 'JACK GTKMM XML' obj.uselib = 'JACK GTKMM XML'
wrapper_subst_dict = { wrapper_subst_dict = {
'INSTALL_PREFIX' : bld.env['PREFIX'], 'INSTALL_PREFIX' : bld.env['PREFIX'],
'LIBDIR' : os.path.normpath(bld.env['DLLDIR']), 'LIBDIR' : os.path.normpath(bld.env['DLLDIR']),
'DATADIR' : os.path.normpath(bld.env['DATADIR']), 'DATADIR' : os.path.normpath(bld.env['DATADIR']),
'CONFDIR' : os.path.normpath(bld.env['CONFDIR']), 'CONFDIR' : os.path.normpath(bld.env['CONFDIR']),
'LIBS' : 'build/libs', 'LIBS' : 'build/libs',
'VERSION' : str (bld.env['VERSION']), 'VERSION' : str (bld.env['VERSION']),
'EXECUTABLE' : 'build/tools/bb/bb' 'EXECUTABLE' : 'build/tools/bb/bb'
} }
def set_subst_dict(obj, dict): def set_subst_dict(obj, dict):
for i in dict: for i in dict:
setattr(obj, i, dict[i]) setattr(obj, i, dict[i])
obj = bld (features = 'subst') obj = bld (features = 'subst')
obj.source = '../../gtk2_ardour/ardev_common.sh.in' obj.source = '../../gtk2_ardour/ardev_common.sh.in'
obj.target = 'bbdev_common_waf.sh' obj.target = 'bbdev_common_waf.sh'
obj.chmod = Utils.O755 obj.chmod = Utils.O755
obj.dict = wrapper_subst_dict obj.dict = wrapper_subst_dict
set_subst_dict(obj, wrapper_subst_dict) set_subst_dict(obj, wrapper_subst_dict)

58
wscript
View File

@ -19,20 +19,20 @@ c_compiler['darwin'] = ['gcc', 'clang' ]
cxx_compiler['darwin'] = ['g++', 'clang++' ] cxx_compiler['darwin'] = ['g++', 'clang++' ]
class i18n(BuildContext): class i18n(BuildContext):
cmd = 'i18n' cmd = 'i18n'
fun = 'i18n' fun = 'i18n'
class i18n_pot(BuildContext): class i18n_pot(BuildContext):
cmd = 'i18n_pot' cmd = 'i18n_pot'
fun = 'i18n_pot' fun = 'i18n_pot'
class i18n_po(BuildContext): class i18n_po(BuildContext):
cmd = 'i18n_po' cmd = 'i18n_po'
fun = 'i18n_po' fun = 'i18n_po'
class i18n_mo(BuildContext): class i18n_mo(BuildContext):
cmd = 'i18n_mo' cmd = 'i18n_mo'
fun = 'i18n_mo' fun = 'i18n_mo'
compiler_flags_dictionaries= { compiler_flags_dictionaries= {
'gcc' : { 'gcc' : {
@ -233,10 +233,10 @@ PROGRAM_VERSION = sanitize(MAJOR)
del sanitize del sanitize
if any(arg in ('dist', 'distcheck') for arg in sys.argv[1:]): if any(arg in ('dist', 'distcheck') for arg in sys.argv[1:]):
if not 'APPNAME' in os.environ: if not 'APPNAME' in os.environ:
print ("You must define APPNAME in the environment when running ./waf dist/distcheck") print ("You must define APPNAME in the environment when running ./waf dist/distcheck")
sys.exit (1) sys.exit (1)
APPNAME = os.environ['APPNAME']; APPNAME = os.environ['APPNAME'];
# Mandatory variables # Mandatory variables
top = '.' top = '.'
@ -387,7 +387,7 @@ int main() { return 0; }''',
else: else:
compiler_name = 'clang' compiler_name = 'clang'
elif conf.env['MSVC_COMPILER']: elif conf.env['MSVC_COMPILER']:
compiler_name = 'msvc' compiler_name = 'msvc'
else: else:
if platform == 'darwin': if platform == 'darwin':
compiler_name = 'gcc-darwin' compiler_name = 'gcc-darwin'
@ -510,8 +510,8 @@ int main() { return 0; }''',
define_name = 'FPU_AVX_FMA_SUPPORT') define_name = 'FPU_AVX_FMA_SUPPORT')
if opt.use_libcpp or conf.env['build_host'] in [ 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]: if opt.use_libcpp or conf.env['build_host'] in [ 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]:
cxx_flags.append('--stdlib=libc++') cxx_flags.append('--stdlib=libc++')
linker_flags.append('--stdlib=libc++') linker_flags.append('--stdlib=libc++')
if conf.options.cxx11 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' , 'bigsur' ]: if conf.options.cxx11 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' , 'bigsur' ]:
conf.check_cxx(cxxflags=["-std=c++11"]) conf.check_cxx(cxxflags=["-std=c++11"])
@ -548,7 +548,7 @@ int main() { return 0; }''',
if not (opt.arm64 or conf.env['build_target'] == 'armhf' and conf.env['build_target'] == 'aarch64'): if not (opt.arm64 or conf.env['build_target'] == 'armhf' and conf.env['build_target'] == 'aarch64'):
compiler_flags.append ("-DARCH_X86") compiler_flags.append ("-DARCH_X86")
if platform == 'linux' and conf.env['build_target'] != 'armhf' and conf.env['build_target'] != 'aarch64': if platform == 'linux' and conf.env['build_target'] != 'armhf' and conf.env['build_target'] != 'aarch64':
@ -598,13 +598,13 @@ int main() { return 0; }''',
compiler_flags.append("-DBUILD_VECLIB_OPTIMIZATIONS"); compiler_flags.append("-DBUILD_VECLIB_OPTIMIZATIONS");
conf.env.append_value('LINKFLAGS_OSX', ['-framework', 'Accelerate']) conf.env.append_value('LINKFLAGS_OSX', ['-framework', 'Accelerate'])
elif conf.env['build_target'] == 'i686' or conf.env['build_target'] == 'x86_64': elif conf.env['build_target'] == 'i686' or conf.env['build_target'] == 'x86_64':
compiler_flags.append ("-DBUILD_SSE_OPTIMIZATIONS") compiler_flags.append ("-DBUILD_SSE_OPTIMIZATIONS")
elif conf.env['build_target'] == 'mingw': elif conf.env['build_target'] == 'mingw':
# usability of the 64 bit windows assembler depends on the compiler target, # usability of the 64 bit windows assembler depends on the compiler target,
# not the build host, which in turn can only be inferred from the name # not the build host, which in turn can only be inferred from the name
# of the compiler. # of the compiler.
if re.search ('x86_64-w64', str(conf.env['CC'])) is not None: if re.search ('x86_64-w64', str(conf.env['CC'])) is not None:
compiler_flags.append ("-DBUILD_SSE_OPTIMIZATIONS") compiler_flags.append ("-DBUILD_SSE_OPTIMIZATIONS")
if not build_host_supports_sse: if not build_host_supports_sse:
print("\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)") print("\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)")
@ -1177,8 +1177,8 @@ int main () { int x = SFC_RF64_AUTO_DOWNGRADE; return 0; }
errmsg = 'Not found, no RF64-to-WAV support') errmsg = 'Not found, no RF64-to-WAV support')
if have_rf64_riff_support: if have_rf64_riff_support:
conf.env.append_value('CXXFLAGS', "-DHAVE_RF64_RIFF") conf.env.append_value('CXXFLAGS', "-DHAVE_RF64_RIFF")
conf.env.append_value('CFLAGS', "-DHAVE_RF64_RIFF") conf.env.append_value('CFLAGS', "-DHAVE_RF64_RIFF")
if Options.options.dist_target == 'mingw': if Options.options.dist_target == 'mingw':
Options.options.fpu_optimization = True Options.options.fpu_optimization = True
@ -1303,8 +1303,8 @@ int main () { return 0; }
conf.define('LXVST_SUPPORT', 1) conf.define('LXVST_SUPPORT', 1)
conf.env['LXVST_SUPPORT'] = True conf.env['LXVST_SUPPORT'] = True
if opts.vst3: if opts.vst3:
conf.define('VST3_SUPPORT', 1) conf.define('VST3_SUPPORT', 1)
conf.env['VST3_SUPPORT'] = True conf.env['VST3_SUPPORT'] = True
conf.env['WINDOWS_KEY'] = opts.windows_key conf.env['WINDOWS_KEY'] = opts.windows_key
if opts.rt_alloc_debug: if opts.rt_alloc_debug:
conf.define('DEBUG_RT_ALLOC', 1) conf.define('DEBUG_RT_ALLOC', 1)
@ -1364,10 +1364,10 @@ int main () { return 0; }
if (Options.options.use_lld): if (Options.options.use_lld):
if re.search ("linux", sys.platform) is not None and Options.options.dist_target != 'mingw' and conf.env['BUILD_PABACKEND']: if re.search ("linux", sys.platform) is not None and Options.options.dist_target != 'mingw' and conf.env['BUILD_PABACKEND']:
conf.fatal("lld is only for Linux builds") conf.fatal("lld is only for Linux builds")
else: else:
conf.find_program ('lld') conf.find_program ('lld')
conf.env.append_value('LINKFLAGS', '-fuse-ld=lld') conf.env.append_value('LINKFLAGS', '-fuse-ld=lld')
if re.search ("linux", sys.platform) is not None and Options.options.dist_target != 'mingw' and conf.env['BUILD_PABACKEND']: if re.search ("linux", sys.platform) is not None and Options.options.dist_target != 'mingw' and conf.env['BUILD_PABACKEND']:
conf.fatal("PortAudio Backend is not for Linux") conf.fatal("PortAudio Backend is not for Linux")