forked from PsychoticNinja/irssi
Merge pull request #1377 from ailin-nemui/meson
fix yet another meson regression (cherry picked from commit 07aa061b6d51a7c246047053e734a2fba8e31a83)
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()
|
package_version = get_option('PACKAGE_VERSION') != '' ? get_option('PACKAGE_VERSION') : meson.project_version()
|
||||||
|
|
||||||
|
UNSET = '=INVALID='
|
||||||
|
UNSET_ARR = [UNSET]
|
||||||
|
|
||||||
chat_modules = ['irc']
|
chat_modules = ['irc']
|
||||||
|
|
||||||
run_command('mkdir', meson.current_build_dir() / incdir)
|
run_command('mkdir', meson.current_build_dir() / incdir)
|
||||||
@ -331,8 +334,8 @@ if want_perl
|
|||||||
perl_rpath = ''
|
perl_rpath = ''
|
||||||
|
|
||||||
#### ccopts ####
|
#### ccopts ####
|
||||||
perl_ccopts = meson.get_cross_property('perl_ccopts', false)
|
perl_ccopts = meson.get_cross_property('perl_ccopts', UNSET_ARR)
|
||||||
if perl_ccopts == false
|
if perl_ccopts == UNSET_ARR
|
||||||
res = run_command(cross_perl, '-MExtUtils::Embed', '-e', 'ccopts')
|
res = run_command(cross_perl, '-MExtUtils::Embed', '-e', 'ccopts')
|
||||||
perl_ccopts = res.stdout().strip().split()
|
perl_ccopts = res.stdout().strip().split()
|
||||||
endif
|
endif
|
||||||
@ -348,8 +351,8 @@ if want_perl
|
|||||||
perl_cflags += cc.get_supported_arguments('-fPIC')
|
perl_cflags += cc.get_supported_arguments('-fPIC')
|
||||||
|
|
||||||
#### ldopts ####
|
#### ldopts ####
|
||||||
perl_ldopts = meson.get_cross_property('perl_ldopts', false)
|
perl_ldopts = meson.get_cross_property('perl_ldopts', UNSET_ARR)
|
||||||
if perl_ldopts == false
|
if perl_ldopts == UNSET_ARR
|
||||||
res = run_command(cross_perl, '-MExtUtils::Embed', '-e', 'ldopts')
|
res = run_command(cross_perl, '-MExtUtils::Embed', '-e', 'ldopts')
|
||||||
perl_ldopts = res.stdout().strip().split()
|
perl_ldopts = res.stdout().strip().split()
|
||||||
endif
|
endif
|
||||||
@ -365,8 +368,8 @@ if want_perl
|
|||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
perl_version = meson.get_cross_property('perl_version', false)
|
perl_version = meson.get_cross_property('perl_version', UNSET)
|
||||||
if perl_version == false
|
if perl_version == UNSET
|
||||||
perl_version = run_command(cross_perl, '-V::version:').stdout().split('\'')[1]
|
perl_version = run_command(cross_perl, '-V::version:').stdout().split('\'')[1]
|
||||||
endif
|
endif
|
||||||
perl_dep = declare_dependency(compile_args : perl_cflags, link_args : perl_ldflags,
|
perl_dep = declare_dependency(compile_args : perl_cflags, link_args : perl_ldflags,
|
||||||
@ -389,8 +392,8 @@ int main()
|
|||||||
warning('error linking with perl libraries')
|
warning('error linking with perl libraries')
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
xsubpp_file_c = meson.get_cross_property('perl_xsubpp', false)
|
xsubpp_file_c = meson.get_cross_property('perl_xsubpp', UNSET)
|
||||||
if xsubpp_file_c == false
|
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()
|
xsubpp_file_c = run_command(build_perl, '-MExtUtils::ParseXS', '-Eprint $INC{"ExtUtils/ParseXS.pm"} =~ s{ParseXS\\.pm$}{xsubpp}r').stdout()
|
||||||
endif
|
endif
|
||||||
xsubpp = generator(build_perl,
|
xsubpp = generator(build_perl,
|
||||||
@ -418,13 +421,13 @@ int main()
|
|||||||
set_perl_use_lib = false
|
set_perl_use_lib = false
|
||||||
perl_library_dir = with_perl_lib + ' default'
|
perl_library_dir = with_perl_lib + ' default'
|
||||||
if with_perl_lib in ['site', 'vendor']
|
if with_perl_lib in ['site', 'vendor']
|
||||||
perlmoddir = meson.get_cross_property('perl_install' + with_perl_lib + 'arch', false)
|
perlmoddir = meson.get_cross_property('perl_install' + with_perl_lib + 'arch', UNSET)
|
||||||
if perlmoddir == false
|
if perlmoddir == UNSET
|
||||||
perlmoddir = run_command(cross_perl, '-V::install' + with_perl_lib + 'arch:').stdout().split('\'')[1]
|
perlmoddir = run_command(cross_perl, '-V::install' + with_perl_lib + 'arch:').stdout().split('\'')[1]
|
||||||
endif
|
endif
|
||||||
elif with_perl_lib == 'module'
|
elif with_perl_lib == 'module'
|
||||||
perl_archname = meson.get_cross_property('perl_archname', false)
|
perl_archname = meson.get_cross_property('perl_archname', UNSET)
|
||||||
if perl_archname == false
|
if perl_archname == UNSET
|
||||||
perl_archname = run_command(cross_perl, '-V::archname:').stdout().split('\'')[1]
|
perl_archname = run_command(cross_perl, '-V::archname:').stdout().split('\'')[1]
|
||||||
endif
|
endif
|
||||||
perlmoddir = perl_install_base / 'lib' / 'perl5' / perl_archname
|
perlmoddir = perl_install_base / 'lib' / 'perl5' / perl_archname
|
||||||
@ -444,8 +447,8 @@ int main()
|
|||||||
|
|
||||||
perl_use_lib = get_option('prefix') / perlmoddir
|
perl_use_lib = get_option('prefix') / perlmoddir
|
||||||
if set_perl_use_lib
|
if set_perl_use_lib
|
||||||
perl_inc = meson.get_cross_property('perl_inc', false)
|
perl_inc = meson.get_cross_property('perl_inc', UNSET_ARR)
|
||||||
if perl_inc == false
|
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
|
set_perl_use_lib = run_command(cross_perl, '-e', 'exit ! grep $_ eq $ARGV[0], grep /^\\//, @INC', perl_use_lib).returncode() != 0
|
||||||
else
|
else
|
||||||
set_perl_use_lib = not perl_inc.contains(perl_use_lib)
|
set_perl_use_lib = not perl_inc.contains(perl_use_lib)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user