From: Eli Schwartz Date: Mon, 14 Oct 2024 02:07:10 GMT Subject: Re: [RFC PATCH v2 24/24] Introduce support for the Meson build system Message-ID: In-Reply-To: <724232b0fad2cbd5602ac1e900fd5dafff666012.1728485139.git.ps@pks.im> On 10/9/24 10:57 AM, Patrick Steinhardt wrote: > +script_environment = environment() > +foreach tool : ['cat', 'cut', 'grep', 'sed', 'sort', 'tr', 'uname'] > + program = find_program(tool) > + script_environment.prepend('PATH', fs.parent(program.full_path())) > +endforeach > + > +libgit_sources += custom_target( > + 'command-list.h', > + input: 'command-list.txt', > + output: 'command-list.h', > + command: [shell, meson.current_source_dir() + '/generate-cmdlist.sh', meson.current_source_dir(), '@OUTPUT@'], > + env: script_environment, > +) Maybe I am missing something about the necessity of this setting up of PATH? Should these programs not already be on PATH -- how does meson find them? > +zlib = dependency('zlib', default_options: ['default_library=static', 'tests=disabled']) > +if zlib.type_name() != 'internal' and not compiler.has_function('deflateBound', > + prefix: '#include ', > + dependencies: zlib, > +) > + libgit_c_args += '-DNO_DEFLATE_BOUND' > +endif Probably should have mentioned this earlier on, but. What about if zlib.version().version_compare('>=1.2.0') libgit_c_args += '-DNO_DEFLATE_BOUND' endif since that is when that function was added. -- Eli Schwartz