Make spacing around colons consistent

This commit is contained in:
Ryan Lucia 2019-01-30 16:58:31 -05:00
parent 68f5843117
commit cde5778283
8 changed files with 58 additions and 58 deletions

View file

@ -8,13 +8,13 @@ install_data(
'autoload/macro-2-mkfullwitdh.lua', 'autoload/macro-2-mkfullwitdh.lua',
'autoload/select-overlaps.moon', 'autoload/select-overlaps.moon',
'autoload/strip-tags.lua', 'autoload/strip-tags.lua',
install_dir : join_paths(automation_dir, 'autoload')) install_dir: join_paths(automation_dir, 'autoload'))
install_data( install_data(
'demos/future-windy-blur.lua', 'demos/future-windy-blur.lua',
'demos/raytracer.lua', 'demos/raytracer.lua',
'demos/raytracer-test1.ass', 'demos/raytracer-test1.ass',
install_dir : join_paths(automation_dir, 'demos')) install_dir: join_paths(automation_dir, 'demos'))
install_data( install_data(
'include/cleantags.lua', 'include/cleantags.lua',
@ -27,7 +27,7 @@ install_data(
'include/unicode.lua', 'include/unicode.lua',
'include/utils-auto4.lua', 'include/utils-auto4.lua',
'include/utils.lua', 'include/utils.lua',
install_dir : join_paths(automation_dir, 'include')) install_dir: join_paths(automation_dir, 'include'))
install_data( install_data(
'include/aegisub/argcheck.moon', 'include/aegisub/argcheck.moon',
@ -37,4 +37,4 @@ install_data(
'include/aegisub/re.moon', 'include/aegisub/re.moon',
'include/aegisub/unicode.moon', 'include/aegisub/unicode.moon',
'include/aegisub/util.moon', 'include/aegisub/util.moon',
install_dir : join_paths(automation_dir, 'include', 'aegisub')) install_dir: join_paths(automation_dir, 'include', 'aegisub'))

View file

@ -5,7 +5,7 @@ else
endif endif
version_inc = include_directories('.') version_inc = include_directories('.')
version_h = custom_target('git_version.h', version_h = custom_target('git_version.h',
command : [version_sh, meson.source_root()], command: [version_sh, meson.source_root()],
build_by_default: true, build_by_default: true,
build_always_stale: true, # has internal check whether target file will be refreshed build_always_stale: true, # has internal check whether target file will be refreshed
output: ['git_version.h', 'git_version.xml']) output: ['git_version.h', 'git_version.xml'])

View file

@ -83,6 +83,6 @@ libaegisub_cpp_pch = ['lagi_pre.h']
libaegisub_inc = include_directories('include') libaegisub_inc = include_directories('include')
libaegisub = static_library('aegisub', libaegisub_src, acconf, libaegisub = static_library('aegisub', libaegisub_src, acconf,
include_directories : libaegisub_inc, include_directories: libaegisub_inc,
cpp_pch : 'include/lagi_pre.h', cpp_pch: 'include/lagi_pre.h',
dependencies : deps) dependencies: deps)

View file

@ -1,11 +1,11 @@
project('Aegisub', ['c', 'cpp'], license : 'BSD-3-Clause', project('Aegisub', ['c', 'cpp'], license: 'BSD-3-Clause',
meson_version : '>=0.47.0', meson_version: '>=0.47.0',
default_options : ['cpp_std=c++11', 'b_lto=true']) default_options: ['cpp_std=c++11', 'b_lto=true'])
subdir('build') subdir('build')
dataroot = join_paths(get_option('prefix'), get_option('datadir'), 'aegisub') dataroot = join_paths(get_option('prefix'), get_option('datadir'), 'aegisub')
add_project_arguments('-DP_DATA="@0@"'.format(dataroot), language : 'cpp') add_project_arguments('-DP_DATA="@0@"'.format(dataroot), language: 'cpp')
b_static = get_option('static') b_static = get_option('static')
conf = configuration_data() conf = configuration_data()
@ -25,20 +25,20 @@ endif
cxx = meson.get_compiler('cpp') cxx = meson.get_compiler('cpp')
cc = meson.get_compiler('c') cc = meson.get_compiler('c')
deps += cc.find_library('m', required : false) deps += cc.find_library('m', required: false)
deps += cc.find_library('dl', required : false) deps += cc.find_library('dl', required: false)
deps += cc.find_library('iconv', required : false) deps += cc.find_library('iconv', required: false)
deps += dependency('libass', version : '>=0.9.7', static: b_static) deps += dependency('libass', version: '>=0.9.7', static: b_static)
deps += dependency('boost', version : '>=1.50.0', static: b_static, deps += dependency('boost', version: '>=1.50.0', static: b_static,
modules : ['chrono', 'filesystem', 'locale', 'regex', modules: ['chrono', 'filesystem', 'locale', 'regex',
'system', 'thread']) 'system', 'thread'])
deps += dependency('icu-uc', version : '>=4.8.1.1', static: b_static) deps += dependency('icu-uc', version: '>=4.8.1.1', static: b_static)
deps += dependency('icu-i18n', version : '>=4.8.1.1', static: b_static) deps += dependency('icu-i18n', version: '>=4.8.1.1', static: b_static)
deps += dependency('zlib', static: b_static) deps += dependency('zlib', static: b_static)
dep_avail = [] dep_avail = []
foreach dep : [ foreach dep: [
# audio, in order of precedence # audio, in order of precedence
['libpulse', '', 'PulseAudio'], ['libpulse', '', 'PulseAudio'],
['alsa', '', 'ALSA'], ['alsa', '', 'ALSA'],
@ -51,8 +51,8 @@ foreach dep : [
['hunspell', '', 'Hunspell'], ['hunspell', '', 'Hunspell'],
['uchardet', '', 'uchardet'], ['uchardet', '', 'uchardet'],
] ]
d = dependency(dep[0], version : dep[1] != '' ? dep[1] : '>=0', d = dependency(dep[0], version: dep[1] != '' ? dep[1]: '>=0',
required : false, static: b_static) required: false, static: b_static)
optname = 'enable_@0@'.format(dep[0].split('-')[0]) optname = 'enable_@0@'.format(dep[0].split('-')[0])
if d.found() and get_option(optname) != 'false' if d.found() and get_option(optname) != 'false'
@ -80,7 +80,7 @@ endif
conf_platform = configuration_data() conf_platform = configuration_data()
conf_platform.set('DEFAULT_PLAYER_AUDIO', def_audio) conf_platform.set('DEFAULT_PLAYER_AUDIO', def_audio)
luajit = dependency('luajit', version : '>=2.0.0', required : get_option('system_luajit')) luajit = dependency('luajit', version: '>=2.0.0', required: get_option('system_luajit'))
if luajit.found() if luajit.found()
luajit_test = cc.run('''#include <lauxlib.h> luajit_test = cc.run('''#include <lauxlib.h>
int main(void) int main(void)
@ -90,7 +90,7 @@ int main(void)
// This is valid in lua 5.2, but a syntax error in 5.1 // This is valid in lua 5.2, but a syntax error in 5.1
const char testprogram[] = "function foo() while true do break return end end"; const char testprogram[] = "function foo() while true do break return end end";
return luaL_loadstring(L, testprogram) == LUA_ERRSYNTAX; return luaL_loadstring(L, testprogram) == LUA_ERRSYNTAX;
}''', dependencies : luajit) }''', dependencies: luajit)
if luajit_test.returncode() == 1 if luajit_test.returncode() == 1
if get_option('system_luajit') if get_option('system_luajit')
@ -114,19 +114,19 @@ else
endif endif
subdir('vendor/luabins/src') subdir('vendor/luabins/src')
deps += dependency('wxWidgets', version : '>=3.0.0', deps += dependency('wxWidgets', version: '>=3.0.0',
modules : ['std', 'stc', 'gl']) modules: ['std', 'stc', 'gl'])
dep_gl = dependency('gl', required : false) dep_gl = dependency('gl', required: false)
if not dep_gl.found() if not dep_gl.found()
if host_machine.system() == 'windows' if host_machine.system() == 'windows'
dep_gl = cc.find_library('opengl32', required : false) dep_gl = cc.find_library('opengl32', required: false)
else else
dep_gl = cc.find_library('GL', required : false) dep_gl = cc.find_library('GL', required: false)
endif endif
if not cc.has_header('GL/gl.h') if not cc.has_header('GL/gl.h')
dep_gl = dependency('', required : false) dep_gl = dependency('', required: false)
endif endif
endif endif
@ -136,7 +136,7 @@ endif
deps += dep_gl deps += dep_gl
acconf = configure_file(output : 'acconf.h', configuration : conf) acconf = configure_file(output: 'acconf.h', configuration: conf)
subdir('automation') subdir('automation')
subdir('libaegisub') subdir('libaegisub')

View file

@ -4,16 +4,16 @@ c_pkg.set('AEGISUB_COMMAND', 'aegisub')
if host_machine.system() == 'windows' if host_machine.system() == 'windows'
elif host_machine.system() == 'darwin' elif host_machine.system() == 'darwin'
else else
configure_file(input : 'desktop/aegisub.desktop.template.in', configure_file(input: 'desktop/aegisub.desktop.template.in',
output : 'aegisub.desktop', output: 'aegisub.desktop',
configuration : c_pkg, configuration: c_pkg,
install_dir : join_paths(get_option('datadir'), 'applications')) install_dir: join_paths(get_option('datadir'), 'applications'))
endif endif
foreach s : ['16x16.png', '22x22.png', '24x24.png', '32x32.png', foreach s: ['16x16.png', '22x22.png', '24x24.png', '32x32.png',
'48x48.png', '64x64.png', 'scalable.svg'] '48x48.png', '64x64.png', 'scalable.svg']
dir = s.split('.')[0] dir = s.split('.')[0]
ext = s.split('.')[1] ext = s.split('.')[1]
install_data(join_paths('desktop', dir, 'aegisub.' + ext), install_data(join_paths('desktop', dir, 'aegisub.' + ext),
install_dir : join_paths(get_option('datadir'), 'icons', 'hicolor', dir, 'apps')) install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', dir, 'apps'))
endforeach endforeach

View file

@ -31,4 +31,4 @@ langs = [
'zh_TW', 'zh_TW',
] ]
i18n.gettext('aegisub', languages : langs) i18n.gettext('aegisub', languages: langs)

View file

@ -2,27 +2,27 @@ respack = find_program('../../tools/respack.py')
resrc = [ resrc = [
custom_target('bitmap.{cpp,h}', custom_target('bitmap.{cpp,h}',
command : [respack, '@INPUT@', '@OUTPUT@'], command: [respack, '@INPUT@', '@OUTPUT@'],
input : files('../bitmaps/manifest.respack'), input: files('../bitmaps/manifest.respack'),
output : ['bitmap.cpp', 'bitmap.h']) output: ['bitmap.cpp', 'bitmap.h'])
] ]
conf_platform_json = configure_file(input: 'default_config_platform.json.in', conf_platform_json = configure_file(input: 'default_config_platform.json.in',
output : '@BASENAME@', output: '@BASENAME@',
configuration : conf_platform) configuration: conf_platform)
if host_machine.system() == 'darwin' if host_machine.system() == 'darwin'
resrc += custom_target('default_config.{cpp,h}', resrc += custom_target('default_config.{cpp,h}',
command : [respack, '@INPUT0@', '@OUTPUT@'], command: [respack, '@INPUT0@', '@OUTPUT@'],
input : [files('manifest_osx.respack'), conf_platform_json], input: [files('manifest_osx.respack'), conf_platform_json],
output : ['default_config.cpp', 'default_config.h']) output: ['default_config.cpp', 'default_config.h'])
else else
resrc += custom_target('default_config.{cpp,h}', resrc += custom_target('default_config.{cpp,h}',
command : [respack, '@INPUT0@', '@OUTPUT@'], command: [respack, '@INPUT0@', '@OUTPUT@'],
input : [files('manifest.respack'), conf_platform_json], input: [files('manifest.respack'), conf_platform_json],
output : ['default_config.cpp', 'default_config.h']) output: ['default_config.cpp', 'default_config.h'])
endif endif
libresrc_inc = include_directories('.') libresrc_inc = include_directories('.')
libresrc = static_library('resrc', 'libresrc.cpp', resrc, dependencies : deps) libresrc = static_library('resrc', 'libresrc.cpp', resrc, dependencies: deps)

View file

@ -189,15 +189,15 @@ opt_src = [
['Hunspell', 'spellchecker_hunspell.cpp'], ['Hunspell', 'spellchecker_hunspell.cpp'],
] ]
foreach opt : opt_src foreach opt: opt_src
if dep_avail.contains(opt[0]) if dep_avail.contains(opt[0])
aegisub_src += opt[1] aegisub_src += opt[1]
endif endif
endforeach endforeach
aegisub = executable('aegisub', aegisub_src, version_h, acconf, aegisub = executable('aegisub', aegisub_src, version_h, acconf,
link_with : [libresrc, libluabins, libaegisub], link_with: [libresrc, libluabins, libaegisub],
include_directories : [libaegisub_inc, libresrc_inc, version_inc], include_directories: [libaegisub_inc, libresrc_inc, version_inc],
cpp_pch : 'include/agi_pre.h', cpp_pch: 'include/agi_pre.h',
install : true, install: true,
dependencies : deps) dependencies: deps)