diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2021-02-10 17:56:33 +0100 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2021-02-10 17:56:33 +0100 |
commit | 97c40a947cea7dd6aa95de74e1f3b89d58ab1e3c (patch) | |
tree | 66b8fbb37f8bf3770c161f50d3269a5405559b13 | |
parent | 1da09ac5bb5099e9a43cad9b8e98022f27c533c3 (diff) | |
download | gnome-session-97c40a947cea7dd6aa95de74e1f3b89d58ab1e3c.tar.gz |
Revert "meson: Do not use a post_install workaround to install wayland-session"
Looks like that using a file-to-be-generated doesn't work as expected,
so reverting previous patch.
Sorry for the troubles.
This reverts commit 1da09ac5bb5099e9a43cad9b8e98022f27c533c3.
-rw-r--r-- | data/meson.build | 18 | ||||
-rw-r--r-- | meson_post_install.py | 9 |
2 files changed, 19 insertions, 8 deletions
diff --git a/data/meson.build b/data/meson.build index d3d00fc1..e02b80d3 100644 --- a/data/meson.build +++ b/data/meson.build @@ -47,6 +47,16 @@ foreach name: desktops ) install_dir = join_paths(session_datadir, 'xsessions') + # FIXME: The same target can not be copied into two directories. + # There is a workaround in meson_post_install.py until proper solution arises: + # https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0 + if name == desktop_plain + #install_dir: [ + # join_paths(session_datadir, 'xsessions'), + # join_paths(session_datadir, 'wayland-sessions') + #] + endif + desktop_target = i18n.merge_file( desktop, type: 'desktop', @@ -56,14 +66,6 @@ foreach name: desktops install: true, install_dir: install_dir ) - - if name == desktop_plain - # We can't install the same target in two locations, however at install - # phase we've already generated the file (happening during configuration) - # so we can be confident in installing the built file directly. - install_data(files(meson.current_build_dir() / desktop), - install_dir: session_datadir / 'wayland-sessions') - endif endforeach sessions = [ diff --git a/meson_post_install.py b/meson_post_install.py index 912ebfaa..e2e352cc 100644 --- a/meson_post_install.py +++ b/meson_post_install.py @@ -15,3 +15,12 @@ if not os.environ.get('DESTDIR'): print('Compile gsettings schemas...') subprocess.call(['glib-compile-schemas', schemadir]) +# FIXME: this is due to unable to copy a generated target file: +# https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0 +dst_dir = os.path.join(install_root, 'wayland-sessions') +if not os.path.exists(dst_dir): + os.makedirs(dst_dir) + +src = os.path.join(install_root, 'xsessions', 'gnome.desktop') +dst = os.path.join(dst_dir, 'gnome.desktop') +shutil.copyfile(src, dst) |