build: use tabs for meson files

cute-signatures
Rasmus Thomsen 2020-10-01 17:56:12 +02:00 committed by Timo Teräs
parent 1bbdc8eb37
commit 1b168696aa
2 changed files with 133 additions and 133 deletions

View File

@ -1,9 +1,9 @@
project( project(
'apk-tools', 'apk-tools',
['c'], ['c'],
default_options : ['c_std=gnu99'], default_options : ['c_std=gnu99'],
version: '2.10.5', version: '2.10.5',
meson_version: '>=0.51' meson_version: '>=0.51'
) )
pkgc = import('pkgconfig') pkgc = import('pkgconfig')
@ -15,13 +15,13 @@ lua_dep = dependency('lua' + get_option('lua_version'), required: get_option('lu
scdoc_dep = dependency('scdoc', version: '>=1.10', required: get_option('docs')) scdoc_dep = dependency('scdoc', version: '>=1.10', required: get_option('docs'))
shared_deps = [ shared_deps = [
dependency('zlib'), dependency('zlib'),
dependency('openssl'), dependency('openssl'),
] ]
static_deps = [ static_deps = [
dependency('openssl', static: true), dependency('openssl', static: true),
dependency('zlib', static: true), dependency('zlib', static: true),
] ]
add_project_arguments('-D_GNU_SOURCE', language: 'c') add_project_arguments('-D_GNU_SOURCE', language: 'c')

View File

@ -1,165 +1,165 @@
libapk_src = [ libapk_src = [
'atom.c', 'atom.c',
'blob.c', 'blob.c',
'commit.c', 'commit.c',
'common.c', 'common.c',
'database.c', 'database.c',
'hash.c', 'hash.c',
'io.c', 'io.c',
'io_archive.c', 'io_archive.c',
'io_url.c', 'io_url.c',
'io_gunzip.c', 'io_gunzip.c',
'package.c', 'package.c',
'print.c', 'print.c',
'solver.c', 'solver.c',
'version.c', 'version.c',
] ]
libapk_headers = [ libapk_headers = [
'apk_applet.h', 'apk_applet.h',
'apk_atom.h', 'apk_atom.h',
'apk_archive.h', 'apk_archive.h',
'apk_blob.h', 'apk_blob.h',
'apk_database.h', 'apk_database.h',
'apk_defines.h', 'apk_defines.h',
'apk_hash.h', 'apk_hash.h',
'apk_io.h', 'apk_io.h',
'apk_openssl.h', 'apk_openssl.h',
'apk_package.h', 'apk_package.h',
'apk_print.h', 'apk_print.h',
'apk_provider_data.h', 'apk_provider_data.h',
'apk_solver_data.h', 'apk_solver_data.h',
'apk_solver.h', 'apk_solver.h',
'apk_version.h', 'apk_version.h',
] ]
apk_src = [ apk_src = [
'apk.c', 'apk.c',
'app_add.c', 'app_add.c',
'app_audit.c', 'app_audit.c',
'app_cache.c', 'app_cache.c',
'app_del.c', 'app_del.c',
'app_dot.c', 'app_dot.c',
'app_fetch.c', 'app_fetch.c',
'app_fix.c', 'app_fix.c',
'app_index.c', 'app_index.c',
'app_info.c', 'app_info.c',
'app_list.c', 'app_list.c',
'app_manifest.c', 'app_manifest.c',
'app_policy.c', 'app_policy.c',
'app_update.c', 'app_update.c',
'app_upgrade.c', 'app_upgrade.c',
'app_search.c', 'app_search.c',
'app_stats.c', 'app_stats.c',
'app_verify.c', 'app_verify.c',
'app_version.c', 'app_version.c',
'help.c', 'help.c',
] ]
if lua_bin.found() if lua_bin.found()
genhelp_script = find_program('genhelp.lua') genhelp_script = find_program('genhelp.lua')
generated_help = custom_target( generated_help = custom_target(
'help.h', 'help.h',
capture: true, capture: true,
output: 'help.h', output: 'help.h',
input: man_files, input: man_files,
command: [genhelp_script, '@INPUT@'], command: [genhelp_script, '@INPUT@'],
) )
else else
generated_help = custom_target( generated_help = custom_target(
'help.h', 'help.h',
capture: true, capture: true,
output: 'help.h', output: 'help.h',
command: ['echo', '#define NO_HELP'], command: ['echo', '#define NO_HELP'],
) )
endif endif
apk_src += [ generated_help ] apk_src += [ generated_help ]
apk_cargs = [ apk_cargs = [
'-DAPK_VERSION="' + meson.project_version() + '"', '-DAPK_VERSION="' + meson.project_version() + '"',
'-D_ATFILE_SOURCE', '-D_ATFILE_SOURCE',
] ]
libapk_shared = shared_library( libapk_shared = shared_library(
'apk', 'apk',
libapk_src, libapk_src,
version: meson.project_version(), version: meson.project_version(),
install: not subproject, install: not subproject,
dependencies: [ dependencies: [
libfetch_dep, libfetch_dep,
shared_deps, shared_deps,
], ],
c_args: apk_cargs, c_args: apk_cargs,
) )
libapk_static = static_library( libapk_static = static_library(
'apk', 'apk',
libapk_src, libapk_src,
install: not subproject, install: not subproject,
dependencies: [ dependencies: [
libfetch_dep, libfetch_dep,
static_deps, static_deps,
], ],
c_args: [apk_cargs, '-DOPENSSL_NO_ENGINE'], c_args: [apk_cargs, '-DOPENSSL_NO_ENGINE'],
) )
libapk_dep = declare_dependency( libapk_dep = declare_dependency(
link_with: libapk_shared, link_with: libapk_shared,
) )
if not subproject if not subproject
pkgc.generate( pkgc.generate(
libapk_shared, libapk_shared,
name: 'apk', name: 'apk',
version: meson.project_version(), version: meson.project_version(),
) )
install_headers( install_headers(
libapk_headers, libapk_headers,
subdir: 'apk', subdir: 'apk',
) )
endif endif
if(lua_dep.found()) if(lua_dep.found())
luaapk_src = [ luaapk_src = [
'lua-apk.c', 'lua-apk.c',
] ]
libluaapk = library( libluaapk = library(
'luaapk', 'luaapk',
luaapk_src, luaapk_src,
dependencies: [lua_dep, libapk_dep], dependencies: [lua_dep, libapk_dep],
install: true, install: true,
install_dir: lua_dep.get_pkgconfig_variable('libdir'), install_dir: lua_dep.get_pkgconfig_variable('libdir'),
c_args: apk_cargs, c_args: apk_cargs,
) )
endif endif
apk_exe = executable( apk_exe = executable(
'apk', 'apk',
apk_src, apk_src,
install: not subproject, install: not subproject,
dependencies: [ dependencies: [
libapk_dep, libapk_dep,
shared_deps, shared_deps,
libfetch_dep.partial_dependency(includes: true), libfetch_dep.partial_dependency(includes: true),
], ],
c_args: apk_cargs, c_args: apk_cargs,
) )
if get_option('static_apk') if get_option('static_apk')
apk_static_exe = executable( apk_static_exe = executable(
'apk.static', 'apk.static',
apk_src, apk_src,
install: not subproject, install: not subproject,
dependencies: [ dependencies: [
static_deps, static_deps,
libfetch_dep.partial_dependency(includes: true), libfetch_dep.partial_dependency(includes: true),
], ],
link_with: libapk_static, link_with: libapk_static,
c_args: [apk_cargs, '-DOPENSSL_NO_ENGINE'], c_args: [apk_cargs, '-DOPENSSL_NO_ENGINE'],
link_args: '-static', link_args: '-static',
) )
endif endif