On Wed, Oct 11, 2017 at 06:03:45PM -0400, Lyude Paul wrote: > Now that we can actually configure all of the directories xkb uses for > finding things, we can (finally, but only with meson) finally make it so > that with the correct meson configuration the Xserver will "just work" > without any additional changes to the installation prefix after > building. > > For the people like me who have since scripted this part out of their > build process and forgotten about it, building and installing the X > server into a non-standard prefix has always required the following (or > something else that makes sure that X has a valid xkbcomp configuration) > commands be run right after doing the installation: > > # start in root of prefix you installed X to > mkdir -pv share/X11/xkb/rules > ln -s /usr/share/X11/xkb/rules/evdev share/X11/xkb/rules/ > rm -f bin/xkbcomp > ln -s /usr/bin/xkbcomp bin/ > > The one last piece of getting rid of this post-install junk is making > sure that we can control the directory that X uses for finding the > xkbcomp binary from meson so we can point it at the system provided > xkbcomp (/usr/bin/xkbcomp or similar). So, this patch adds a > configuration option for controlling this called xkb_bin_dir. > > Signed-off-by: Lyude Paul <[email protected]>
Reviewed-by: Peter Hutterer <[email protected]> Cheers, Peter > --- > include/meson.build | 2 +- > meson.build | 5 +++++ > meson_options.txt | 1 + > 3 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/include/meson.build b/include/meson.build > index 90f8de3cb..5d746eb70 100644 > --- a/include/meson.build > +++ b/include/meson.build > @@ -219,7 +219,7 @@ configure_file(output : 'version-config.h', > > xkb_data = configuration_data() > > -xkb_data.set_quoted('XKB_BIN_DIRECTORY', join_paths(get_option('prefix'), > get_option('bindir'))) > +xkb_data.set_quoted('XKB_BIN_DIRECTORY', xkb_bin_dir) > xkb_data.set_quoted('XKB_BASE_DIRECTORY', xkb_dir) > xkb_data.set_quoted('XKB_DFLT_RULES', get_option('xkb_default_rules')) > xkb_data.set_quoted('XKB_DFLT_MODEL', get_option('xkb_default_model')) > diff --git a/meson.build b/meson.build > index d71cfed5a..f9b21b36c 100644 > --- a/meson.build > +++ b/meson.build > @@ -107,6 +107,11 @@ if xkb_output_dir == '' > xkb_output_dir = join_paths(get_option('prefix'), > 'share/X11/xkb/compiled') > endif > > +xkb_bin_dir = get_option('xkb_bin_dir') > +if xkb_bin_dir == '' > + xkb_bin_dir = join_paths(get_option('prefix'), get_option('bindir')) > +endif > + > hal_option = get_option('hal') > glamor_option = get_option('glamor') > > diff --git a/meson_options.txt b/meson_options.txt > index b1ee6ccc5..1954ea7a0 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -29,6 +29,7 @@ option('ipv6', type: 'combo', choices: ['yes', 'no', > 'auto'], value: 'auto') > > option('xkb_dir', type: 'string') > option('xkb_output_dir', type: 'string') > +option('xkb_bin_dir', type: 'string') > option('xkb_default_rules', type: 'string', value: 'evdev') > option('xkb_default_model', type: 'string', value: 'pc105') > option('xkb_default_layout', type: 'string', value: 'us') > -- > 2.13.6 > > _______________________________________________ > [email protected]: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: https://lists.x.org/mailman/listinfo/xorg-devel > _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
