mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Merge pull request #1377 from ailin-nemui/meson
fix yet another meson regression
(cherry picked from commit 07aa061b6d
)
This commit is contained in:
parent
c6a7f02042
commit
730c3c1a12
31
meson.build
31
meson.build
@ -55,6 +55,9 @@ want_static_dependency = get_option('static-dependency') == 'yes'
|
||||
|
||||
package_version = get_option('PACKAGE_VERSION') != '' ? get_option('PACKAGE_VERSION') : meson.project_version()
|
||||
|
||||
UNSET = '=INVALID='
|
||||
UNSET_ARR = [UNSET]
|
||||
|
||||
chat_modules = ['irc']
|
||||
|
||||
run_command('mkdir', meson.current_build_dir() / incdir)
|
||||
@ -331,8 +334,8 @@ if want_perl
|
||||
perl_rpath = ''
|
||||
|
||||
#### ccopts ####
|
||||
perl_ccopts = meson.get_cross_property('perl_ccopts', false)
|
||||
if perl_ccopts == false
|
||||
perl_ccopts = meson.get_cross_property('perl_ccopts', UNSET_ARR)
|
||||
if perl_ccopts == UNSET_ARR
|
||||
res = run_command(cross_perl, '-MExtUtils::Embed', '-e', 'ccopts')
|
||||
perl_ccopts = res.stdout().strip().split()
|
||||
endif
|
||||
@ -348,8 +351,8 @@ if want_perl
|
||||
perl_cflags += cc.get_supported_arguments('-fPIC')
|
||||
|
||||
#### ldopts ####
|
||||
perl_ldopts = meson.get_cross_property('perl_ldopts', false)
|
||||
if perl_ldopts == false
|
||||
perl_ldopts = meson.get_cross_property('perl_ldopts', UNSET_ARR)
|
||||
if perl_ldopts == UNSET_ARR
|
||||
res = run_command(cross_perl, '-MExtUtils::Embed', '-e', 'ldopts')
|
||||
perl_ldopts = res.stdout().strip().split()
|
||||
endif
|
||||
@ -365,8 +368,8 @@ if want_perl
|
||||
endif
|
||||
endforeach
|
||||
|
||||
perl_version = meson.get_cross_property('perl_version', false)
|
||||
if perl_version == false
|
||||
perl_version = meson.get_cross_property('perl_version', UNSET)
|
||||
if perl_version == UNSET
|
||||
perl_version = run_command(cross_perl, '-V::version:').stdout().split('\'')[1]
|
||||
endif
|
||||
perl_dep = declare_dependency(compile_args : perl_cflags, link_args : perl_ldflags,
|
||||
@ -389,8 +392,8 @@ int main()
|
||||
warning('error linking with perl libraries')
|
||||
endif
|
||||
else
|
||||
xsubpp_file_c = meson.get_cross_property('perl_xsubpp', false)
|
||||
if xsubpp_file_c == false
|
||||
xsubpp_file_c = meson.get_cross_property('perl_xsubpp', UNSET)
|
||||
if xsubpp_file_c == UNSET
|
||||
xsubpp_file_c = run_command(build_perl, '-MExtUtils::ParseXS', '-Eprint $INC{"ExtUtils/ParseXS.pm"} =~ s{ParseXS\\.pm$}{xsubpp}r').stdout()
|
||||
endif
|
||||
xsubpp = generator(build_perl,
|
||||
@ -418,13 +421,13 @@ int main()
|
||||
set_perl_use_lib = false
|
||||
perl_library_dir = with_perl_lib + ' default'
|
||||
if with_perl_lib in ['site', 'vendor']
|
||||
perlmoddir = meson.get_cross_property('perl_install' + with_perl_lib + 'arch', false)
|
||||
if perlmoddir == false
|
||||
perlmoddir = meson.get_cross_property('perl_install' + with_perl_lib + 'arch', UNSET)
|
||||
if perlmoddir == UNSET
|
||||
perlmoddir = run_command(cross_perl, '-V::install' + with_perl_lib + 'arch:').stdout().split('\'')[1]
|
||||
endif
|
||||
elif with_perl_lib == 'module'
|
||||
perl_archname = meson.get_cross_property('perl_archname', false)
|
||||
if perl_archname == false
|
||||
perl_archname = meson.get_cross_property('perl_archname', UNSET)
|
||||
if perl_archname == UNSET
|
||||
perl_archname = run_command(cross_perl, '-V::archname:').stdout().split('\'')[1]
|
||||
endif
|
||||
perlmoddir = perl_install_base / 'lib' / 'perl5' / perl_archname
|
||||
@ -444,8 +447,8 @@ int main()
|
||||
|
||||
perl_use_lib = get_option('prefix') / perlmoddir
|
||||
if set_perl_use_lib
|
||||
perl_inc = meson.get_cross_property('perl_inc', false)
|
||||
if perl_inc == false
|
||||
perl_inc = meson.get_cross_property('perl_inc', UNSET_ARR)
|
||||
if perl_inc == UNSET_ARR
|
||||
set_perl_use_lib = run_command(cross_perl, '-e', 'exit ! grep $_ eq $ARGV[0], grep /^\\//, @INC', perl_use_lib).returncode() != 0
|
||||
else
|
||||
set_perl_use_lib = not perl_inc.contains(perl_use_lib)
|
||||
|
Loading…
Reference in New Issue
Block a user