mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 15:56:23 +01:00
Merge branch 'wip/smcv/multiarch-triggers' into 'main'
gio: Optionally install trigger executables to architecture-specific paths See merge request GNOME/glib!2818
This commit is contained in:
commit
206be0a8a1
9
NEWS
9
NEWS
@ -30,6 +30,15 @@ Overview of changes in GLib 2.73.2, 12-07-2022
|
||||
* Use waitid() on pidfds rather than a global SIGCHLD handler (work by Philip
|
||||
Withnall) (!2408)
|
||||
|
||||
* Executables that are invoked when installing other software, typically
|
||||
from packaging system triggers, can now be installed into
|
||||
architecture-dependent locations. Unix OS distributors who install
|
||||
GLib for more than one architecture in parallel (multiarch or multilib
|
||||
installations) should consider building with -Dmultiarch=true, installing
|
||||
the bin/glib-compile-schemas and bin/gio-querymodules symbolic links in
|
||||
packages for the primary architecture, and omitting those symlinks from
|
||||
packages for secondary architectures. (work by Simon McVittie) (!2818)
|
||||
|
||||
* Bugs fixed:
|
||||
- #1434 Move tests/* into */tests/
|
||||
- #2216 Chain signal handlers for SIGCHLD
|
||||
|
@ -846,8 +846,8 @@ pkg.generate(libgio,
|
||||
'bindir=' + join_paths('${prefix}', get_option('bindir')),
|
||||
'giomoduledir=' + pkgconfig_giomodulesdir,
|
||||
'gio=' + join_paths('${bindir}', 'gio'),
|
||||
'gio_querymodules=' + join_paths('${bindir}', 'gio-querymodules'),
|
||||
'glib_compile_schemas=' + join_paths('${bindir}', 'glib-compile-schemas'),
|
||||
'gio_querymodules=@0@'.format(pkgconfig_multiarch_bindir / 'gio-querymodules'),
|
||||
'glib_compile_schemas=@0@'.format(pkgconfig_multiarch_bindir / 'glib-compile-schemas'),
|
||||
'glib_compile_resources=' + join_paths('${bindir}', 'glib-compile-resources'),
|
||||
'gdbus=' + join_paths('${bindir}', 'gdbus'),
|
||||
'gdbus_codegen=' + join_paths('${bindir}', 'gdbus-codegen'),
|
||||
@ -958,6 +958,7 @@ executable('gresource', 'gresource-tool.c',
|
||||
|
||||
gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
|
||||
install : true,
|
||||
install_dir : multiarch_bindir,
|
||||
c_args : gio_c_args,
|
||||
# intl.lib is not compatible with SAFESEH
|
||||
link_args : noseh_link_args,
|
||||
@ -966,6 +967,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu
|
||||
glib_compile_schemas = executable('glib-compile-schemas',
|
||||
['glib-compile-schemas.c'],
|
||||
install : true,
|
||||
install_dir : multiarch_bindir,
|
||||
# intl.lib is not compatible with SAFESEH
|
||||
link_args : noseh_link_args,
|
||||
dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep, gvdb_dep])
|
||||
@ -1023,6 +1025,25 @@ if enable_systemtap
|
||||
)
|
||||
endif
|
||||
|
||||
if multiarch_bindir != get_option('bindir')
|
||||
foreach exe : ['gio-querymodules', 'glib-compile-schemas']
|
||||
if meson.version().version_compare('>=0.61.0')
|
||||
install_symlink(
|
||||
exe,
|
||||
install_dir : get_option('bindir'),
|
||||
pointing_to : get_option('prefix') / multiarch_bindir / exe,
|
||||
)
|
||||
else
|
||||
warning(
|
||||
'Please use Meson >= 0.61.0 or create a symlink @1@ -> @2@ in packaging'.format(
|
||||
get_option('prefix') / get_option('bindir') / exe,
|
||||
get_option('prefix') / multiarch_bindir / exe,
|
||||
)
|
||||
)
|
||||
endif
|
||||
endforeach
|
||||
endif
|
||||
|
||||
if build_tests
|
||||
subdir('tests')
|
||||
endif
|
||||
|
14
meson.build
14
meson.build
@ -82,6 +82,20 @@ else
|
||||
glib_giomodulesdir = join_paths(glib_libdir, 'gio', 'modules')
|
||||
endif
|
||||
|
||||
if get_option('multiarch')
|
||||
# For multiarch/multilib distributions, install each architecture's
|
||||
# build of executables used in packaging triggers (like gio-querymodules)
|
||||
# to an architecture-dependent location, with a compatibility symlink
|
||||
# in the PATH.
|
||||
multiarch_bindir = get_option('libdir') / 'glib-2.0'
|
||||
pkgconfig_multiarch_bindir = '${libdir}/glib-2.0'
|
||||
else
|
||||
# For single-architecture distributions, just install them into the PATH
|
||||
# as was traditionally done.
|
||||
multiarch_bindir = get_option('bindir')
|
||||
pkgconfig_multiarch_bindir = '${bindir}'
|
||||
endif
|
||||
|
||||
glib_pkgconfigreldir = join_paths(glib_libdir, 'pkgconfig')
|
||||
|
||||
if get_option('charsetalias_dir') != ''
|
||||
|
@ -117,3 +117,8 @@ option('libelf',
|
||||
type : 'feature',
|
||||
value : 'auto',
|
||||
description : 'Enable support for listing and extracting from ELF resource files with gresource tool')
|
||||
|
||||
option('multiarch',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Install some helper executables in per-architecture locations')
|
||||
|
Loading…
Reference in New Issue
Block a user