mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Updated Perl plugin Meson logic to gracefully disable the plugin (instead of failing the whole configure) when ExtUtils::Embed cflags/ldflags cannot be retrieved. This is now handled with warnings plus subdir_done().
Added explicit check: false to both run_command() calls, resolving the Meson deprecation warning about implicit boolean check behavior in future Meson versions. Changed the Perl compile/link suitability probe failure from fatal error() to non-fatal warning + plugin disable, so unsupported host Perl setups do not abort the build entirely.
This commit is contained in:
@@ -27,9 +27,10 @@ endif
|
|||||||
|
|
||||||
perl = find_program(get_option('with-perl'))
|
perl = find_program(get_option('with-perl'))
|
||||||
|
|
||||||
ret = run_command([perl, '-MExtUtils::Embed', '-e', 'ccopts'])
|
ret = run_command([perl, '-MExtUtils::Embed', '-e', 'ccopts'], check: false)
|
||||||
if ret.returncode() != 0
|
if ret.returncode() != 0
|
||||||
error('perl: Failed to get cflags')
|
warning('Perl development files not found, disabling Perl plugin')
|
||||||
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
foreach flag : ret.stdout().strip().split(' ')
|
foreach flag : ret.stdout().strip().split(' ')
|
||||||
if flag.startswith('-I') or flag.startswith('-D')
|
if flag.startswith('-I') or flag.startswith('-D')
|
||||||
@@ -37,9 +38,10 @@ foreach flag : ret.stdout().strip().split(' ')
|
|||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
ret = run_command([perl, '-MExtUtils::Embed', '-e', 'ldopts'])
|
ret = run_command([perl, '-MExtUtils::Embed', '-e', 'ldopts'], check: false)
|
||||||
if ret.returncode() != 0
|
if ret.returncode() != 0
|
||||||
error('perl: Failed to get ldflags')
|
warning('Perl development files not found, disabling Perl plugin')
|
||||||
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
perl_ldflags = []
|
perl_ldflags = []
|
||||||
perl_rpath = ''
|
perl_rpath = ''
|
||||||
@@ -73,7 +75,8 @@ int main(void) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
''', args: perl_cflags + perl_ldflags)
|
''', args: perl_cflags + perl_ldflags)
|
||||||
error('found perl not suitable for plugin')
|
warning('Found perl is not suitable for plugin, disabling Perl plugin')
|
||||||
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
perl_dep = declare_dependency(
|
perl_dep = declare_dependency(
|
||||||
|
|||||||
Reference in New Issue
Block a user