meson: Make gzip and tar optional

They are only used for some tests.  The tests are already set to skip
as appropriate if they are not available.

Discussion: https://www.postgresql.org/message-id/flat/ZQzp_VMJcerM1Cs_%40paquier.xyz
This commit is contained in:
Peter Eisentraut 2023-12-21 08:40:32 +01:00
parent 9aa374dcfb
commit 9ca6e7b941
5 changed files with 9 additions and 9 deletions

View File

@ -24,7 +24,7 @@ tests += {
'tests': [ 'tests': [
't/001_basic.pl', 't/001_basic.pl',
], ],
'env': {'GZIP_PROGRAM': gzip.path(), 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.path() : '',
'TAR': tar.path()}, 'TAR': tar.found() ? tar.path() : '' },
}, },
} }

View File

@ -333,8 +333,8 @@ flex = find_program(get_option('FLEX'), native: true, version: '>= 2.5.35')
bison = find_program(get_option('BISON'), native: true, version: '>= 2.3') bison = find_program(get_option('BISON'), native: true, version: '>= 2.3')
sed = find_program(get_option('SED'), 'sed', native: true, required: false) sed = find_program(get_option('SED'), 'sed', native: true, required: false)
prove = find_program(get_option('PROVE'), native: true, required: false) prove = find_program(get_option('PROVE'), native: true, required: false)
tar = find_program(get_option('TAR'), native: true) tar = find_program(get_option('TAR'), native: true, required: false)
gzip = find_program(get_option('GZIP'), native: true) gzip = find_program(get_option('GZIP'), native: true, required: false)
program_lz4 = find_program(get_option('LZ4'), native: true, required: false) program_lz4 = find_program(get_option('LZ4'), native: true, required: false)
openssl = find_program(get_option('OPENSSL'), native: true, required: false) openssl = find_program(get_option('OPENSSL'), native: true, required: false)
program_zstd = find_program(get_option('ZSTD'), native: true, required: false) program_zstd = find_program(get_option('ZSTD'), native: true, required: false)

View File

@ -80,8 +80,8 @@ tests += {
'sd': meson.current_source_dir(), 'sd': meson.current_source_dir(),
'bd': meson.current_build_dir(), 'bd': meson.current_build_dir(),
'tap': { 'tap': {
'env': {'GZIP_PROGRAM': gzip.path(), 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.path() : '',
'TAR': tar.path(), 'TAR': tar.found() ? tar.path() : '',
'LZ4': program_lz4.found() ? program_lz4.path() : '', 'LZ4': program_lz4.found() ? program_lz4.path() : '',
}, },
'tests': [ 'tests': [

View File

@ -90,7 +90,7 @@ tests += {
'bd': meson.current_build_dir(), 'bd': meson.current_build_dir(),
'tap': { 'tap': {
'env': { 'env': {
'GZIP_PROGRAM': gzip.path(), 'GZIP_PROGRAM': gzip.found() ? gzip.path() : '',
'LZ4': program_lz4.found() ? program_lz4.path() : '', 'LZ4': program_lz4.found() ? program_lz4.path() : '',
'ZSTD': program_zstd.found() ? program_zstd.path() : '', 'ZSTD': program_zstd.found() ? program_zstd.path() : '',
'with_icu': icu.found() ? 'yes' : 'no', 'with_icu': icu.found() ? 'yes' : 'no',

View File

@ -22,8 +22,8 @@ tests += {
'sd': meson.current_source_dir(), 'sd': meson.current_source_dir(),
'bd': meson.current_build_dir(), 'bd': meson.current_build_dir(),
'tap': { 'tap': {
'env': {'GZIP_PROGRAM': gzip.path(), 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.path() : '',
'TAR': tar.path(), 'TAR': tar.found() ? tar.path() : '',
'LZ4': program_lz4.found() ? program_lz4.path() : '', 'LZ4': program_lz4.found() ? program_lz4.path() : '',
'ZSTD': program_zstd.found() ? program_zstd.path() : ''}, 'ZSTD': program_zstd.found() ? program_zstd.path() : ''},
'tests': [ 'tests': [