mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
build fixes when using install-glib and on openbsd
This commit is contained in:
parent
316c8157a5
commit
244ebaaa2e
55
meson.build
55
meson.build
@ -147,6 +147,7 @@ if not socket_found
|
|||||||
error('socket not found')
|
error('socket not found')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
built_src = []
|
||||||
glib_internal = false
|
glib_internal = false
|
||||||
message('*** If you don\'t have GLib, you can run meson ... -Dinstall-glib=yes')
|
message('*** If you don\'t have GLib, you can run meson ... -Dinstall-glib=yes')
|
||||||
message('*** to download and build it automatically')
|
message('*** to download and build it automatically')
|
||||||
@ -162,15 +163,64 @@ if not glib_dep.found()
|
|||||||
glib_internal = true
|
glib_internal = true
|
||||||
meson_cmd = find_program('meson')
|
meson_cmd = find_program('meson')
|
||||||
ninja = find_program('ninja')
|
ninja = find_program('ninja')
|
||||||
|
|
||||||
glib_internal_download_t = custom_target('glib-internal-download',
|
glib_internal_download_t = custom_target('glib-internal-download',
|
||||||
command : [ meson_cmd, 'subprojects', 'download', 'glib', '--sourcedir', meson.current_source_dir() ],
|
command : [ meson_cmd, 'subprojects', 'download', 'glib', '--sourcedir', meson.current_source_dir() ],
|
||||||
console : true,
|
console : true,
|
||||||
output : ['glib-internal-download'],
|
output : ['glib-internal-download'],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
glib_internal_dependencies = [
|
||||||
|
dependency('threads'),
|
||||||
|
]
|
||||||
|
glib_internal_configure_args = []
|
||||||
|
|
||||||
|
glib_internal_usr_local = false
|
||||||
|
if not cc.has_function('iconv_open')
|
||||||
|
prov_lib = cc.find_library('iconv', required : false)
|
||||||
|
if not prov_lib.found()
|
||||||
|
prov_lib = cc.find_library('iconv', dirs : '/usr/local/lib')
|
||||||
|
glib_internal_usr_local = true
|
||||||
|
endif
|
||||||
|
if cc.has_function('libiconv_open', dependencies : prov_lib)
|
||||||
|
glib_internal_configure_args += '-Diconv=gnu'
|
||||||
|
else
|
||||||
|
glib_internal_configure_args += '-Diconv=native'
|
||||||
|
endif
|
||||||
|
glib_internal_dependencies += prov_lib
|
||||||
|
endif
|
||||||
|
|
||||||
|
if not cc.has_function('ngettext')
|
||||||
|
prov_lib = cc.find_library('intl', required : false)
|
||||||
|
if not prov_lib.found()
|
||||||
|
prov_lib = cc.find_library('intl', dirs : '/usr/local/lib')
|
||||||
|
glib_internal_usr_local = true
|
||||||
|
endif
|
||||||
|
glib_internal_dependencies += prov_lib
|
||||||
|
endif
|
||||||
|
|
||||||
|
if glib_internal_usr_local
|
||||||
|
glib_internal_configure_args += ['-Dc_args=-I/usr/local/include', '-Dc_link_args=-L/usr/local/lib']
|
||||||
|
endif
|
||||||
|
|
||||||
|
if not cc.has_function('getxattr') or not cc.has_header('sys/xattr.h')
|
||||||
|
if cc.has_header_symbol('attr/xattr.h', 'getxattr')
|
||||||
|
prov_lib = cc.find_library('xattr', required : false)
|
||||||
|
else
|
||||||
|
prov_lib = dependency('', required : false)
|
||||||
|
endif
|
||||||
|
if prov_lib.found()
|
||||||
|
glib_internal_dependencies += prov_lib
|
||||||
|
else
|
||||||
|
glib_internal_configure_args += '-Dxattr=false'
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
glib_internal_configure_t = custom_target('glib-internal-configure',
|
glib_internal_configure_t = custom_target('glib-internal-configure',
|
||||||
command : [ meson_cmd, 'setup', '--prefix=/irssi-glib-internal',
|
command : [ meson_cmd, 'setup', '--prefix=/irssi-glib-internal',
|
||||||
'--buildtype=' + get_option('buildtype'),
|
'--buildtype=' + get_option('buildtype'),
|
||||||
'-Dlibmount=false', '-Dselinux=false', '-Ddefault_library=static', '-Dinternal_pcre=true',
|
'-Dlibmount=false', '-Dselinux=false', '-Ddefault_library=static', '-Dinternal_pcre=true',
|
||||||
|
glib_internal_configure_args,
|
||||||
(meson.current_build_dir() / 'build-subprojects' / 'glib'),
|
(meson.current_build_dir() / 'build-subprojects' / 'glib'),
|
||||||
(meson.current_source_dir() / 'subprojects' / glib_internal_version) ],
|
(meson.current_source_dir() / 'subprojects' / glib_internal_version) ],
|
||||||
console : true,
|
console : true,
|
||||||
@ -184,9 +234,7 @@ if not glib_dep.found()
|
|||||||
output : ['glib-internal-build'],
|
output : ['glib-internal-build'],
|
||||||
depends : glib_internal_configure_t,)
|
depends : glib_internal_configure_t,)
|
||||||
glib_dep = declare_dependency(
|
glib_dep = declare_dependency(
|
||||||
dependencies : [
|
dependencies : glib_internal_dependencies,
|
||||||
dependency('threads'),
|
|
||||||
],
|
|
||||||
sources : glib_internal_build_t,
|
sources : glib_internal_build_t,
|
||||||
compile_args : [
|
compile_args : [
|
||||||
'-I' + (meson.current_source_dir() / 'subprojects' / glib_internal_version / 'glib'),
|
'-I' + (meson.current_source_dir() / 'subprojects' / glib_internal_version / 'glib'),
|
||||||
@ -195,6 +243,7 @@ if not glib_dep.found()
|
|||||||
],
|
],
|
||||||
link_args : [ meson.current_build_dir() / 'build-subprojects' / 'glib' / 'glib' / 'libglib-2.0.a' ],
|
link_args : [ meson.current_build_dir() / 'build-subprojects' / 'glib' / 'glib' / 'libglib-2.0.a' ],
|
||||||
)
|
)
|
||||||
|
built_src += glib_internal_build_t
|
||||||
libdl_dep = []
|
libdl_dep = []
|
||||||
prov_lib = cc.find_library('dl', required : false)
|
prov_lib = cc.find_library('dl', required : false)
|
||||||
if prov_lib.found() and cc.has_function('dlopen', dependencies : prov_lib)
|
if prov_lib.found() and cc.has_function('dlopen', dependencies : prov_lib)
|
||||||
|
@ -23,7 +23,7 @@ shared_module('perl_core',
|
|||||||
) + [
|
) + [
|
||||||
irssi_core_pl_h,
|
irssi_core_pl_h,
|
||||||
perl_signals_list_h,
|
perl_signals_list_h,
|
||||||
],
|
] + built_src,
|
||||||
c_args : [
|
c_args : [
|
||||||
def_scriptdir,
|
def_scriptdir,
|
||||||
def_perl_use_lib,
|
def_perl_use_lib,
|
||||||
|
Loading…
Reference in New Issue
Block a user