summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2021-02-10 16:26:13 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2021-02-10 16:36:20 +0100
commit1da09ac5bb5099e9a43cad9b8e98022f27c533c3 (patch)
treed058f131246dd9f3e9a0ed121279702e36da39b0
parent6fc65050dc5b71773ff1a0cb44339a7c0dc2adee (diff)
downloadgnome-session-1da09ac5bb5099e9a43cad9b8e98022f27c533c3.tar.gz
meson: Do not use a post_install workaround to install wayland-session
-rw-r--r--data/meson.build18
-rw-r--r--meson_post_install.py9
2 files changed, 8 insertions, 19 deletions
diff --git a/data/meson.build b/data/meson.build
index e02b80d3..d3d00fc1 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -47,16 +47,6 @@ 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',
@@ -66,6 +56,14 @@ 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 e2e352cc..912ebfaa 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -15,12 +15,3 @@ 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)