diff options
Diffstat (limited to 'src/meson.build')
-rw-r--r-- | src/meson.build | 52 |
1 files changed, 45 insertions, 7 deletions
diff --git a/src/meson.build b/src/meson.build index 98b2461..c1aae55 100644 --- a/src/meson.build +++ b/src/meson.build @@ -12,17 +12,23 @@ libapk_src = [ 'commit.c', 'common.c', 'context.c', + 'crypto.c', 'crypto_openssl.c', + 'ctype.c', 'database.c', + 'extract_v2.c', + 'extract_v3.c', + 'fs_fsys.c', + 'fs_uvol.c', 'hash.c', 'io.c', - 'io_archive.c', - 'io_url.c', + 'io_url_libfetch.c', 'io_gunzip.c', 'package.c', 'pathbuilder.c', 'print.c', 'solver.c', + 'tar.c', 'trust.c', 'version.c', ] @@ -30,20 +36,23 @@ libapk_src = [ libapk_headers = [ 'apk_applet.h', 'apk_atom.h', - 'apk_archive.h', 'apk_blob.h', 'apk_crypto.h', + 'apk_crypto_openssl.h', + 'apk_ctype.h', 'apk_database.h', 'apk_defines.h', + 'apk_extract.h', + 'apk_fs.h', 'apk_hash.h', 'apk_io.h', - 'apk_openssl.h', 'apk_package.h', 'apk_pathbuilder.h', 'apk_print.h', 'apk_provider_data.h', 'apk_solver_data.h', 'apk_solver.h', + 'apk_tar.h', 'apk_version.h', ] @@ -80,13 +89,18 @@ apk_src = [ if lua_bin.found() genhelp_script = files('genhelp.lua') + genhelp_args = [lua_bin, genhelp_script, '@INPUT@'] + + if not get_option('compressed-help') + genhelp_args += ['--no-zlib'] + endif generated_help = custom_target( 'help.h', capture: true, output: 'help.h', input: man_files, - command: [lua_bin, genhelp_script, '@INPUT@'], + command: genhelp_args, ) else generated_help = custom_target( @@ -104,6 +118,21 @@ apk_cargs = [ '-D_ATFILE_SOURCE', ] +apk_arch_prefix = get_option('arch_prefix') +if apk_arch_prefix != '' + apk_cargs += ['-DAPK_ARCH_PREFIX="@0@"'.format(apk_arch_prefix)] +endif + +apk_uvol_db_target = get_option('uvol_db_target').strip('/') +if apk_uvol_db_target != '' + apk_cargs += ['-DAPK_UVOL_DB_TARGET="@0@"'.format(apk_uvol_db_target)] +endif + +if get_option('zstd') + libapk_src += [ 'io_zstd.c' ] + apk_cargs += [ '-DHAVE_ZSTD' ] +endif + libapk_shared = shared_library( 'apk', libapk_src, @@ -111,6 +140,7 @@ libapk_shared = shared_library( install: not subproject, dependencies: [ libfetch_dep, + libportability_dep, shared_deps, ], c_args: apk_cargs, @@ -122,6 +152,7 @@ libapk_static = static_library( install: not subproject, dependencies: [ libfetch_dep, + libportability_dep, static_deps, ], c_args: [apk_cargs, '-DOPENSSL_NO_ENGINE'], @@ -152,9 +183,14 @@ if(lua_dep.found()) libluaapk = library( 'luaapk', luaapk_src, - dependencies: [lua_dep, libapk_dep], + dependencies: [ + lua_dep, + libapk_dep, + shared_deps, + libportability_dep.partial_dependency(includes: true), + ], install: true, - install_dir: lua_dep.get_pkgconfig_variable('libdir'), + install_dir: lua_dep.get_variable(pkgconfig: 'libdir'), c_args: apk_cargs, ) endif @@ -167,6 +203,7 @@ apk_exe = executable( libapk_dep, shared_deps, libfetch_dep.partial_dependency(includes: true), + libportability_dep.partial_dependency(includes: true), ], c_args: apk_cargs, ) @@ -179,6 +216,7 @@ if get_option('static_apk') dependencies: [ static_deps, libfetch_dep.partial_dependency(includes: true), + libportability_dep.partial_dependency(includes: true), ], link_with: libapk_static, c_args: [apk_cargs, '-DOPENSSL_NO_ENGINE'], |