Re: [RFC PATCH v2 24/24] Introduce support for the Meson build system
- From
Eli Schwartz <eschwartz@gentoo.org>
- Date
- Oct 14, 2024, 02:07 UTC
- Message-ID
- <e4c99594-08a1-4b5d-b862-bf51efae410e@gentoo.org>
- In-Reply-To
- <724232b0fad2cbd5602ac1e900fd5dafff666012.1728485139.git.ps@pks.im>
On 10/9/24 10:57 AM, Patrick Steinhardt wrote:
Show 13 quoted lines
> +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?
Show 7 quoted lines
> +zlib = dependency('zlib', default_options: ['default_library=static', 'tests=disabled'])
> +if zlib.type_name() != 'internal' and not compiler.has_function('deflateBound',
> + prefix: '#include <zlib.h>',
> + dependencies: zlib,
> +)
> + libgit_c_args += '-DNO_DEFLATE_BOUND'
> +endifProbably should have mentioned this earlier on, but.
What about
if zlib.version().version_compare('>=1.2.0')
libgit_c_args += '-DNO_DEFLATE_BOUND'
endifsince that is when that function was added.
-- Eli Schwartz