aboutsummaryrefslogtreecommitdiffstats
path: root/x11/gdm/files/patch-data_meson.build
blob: 19e1e5024cac594c340a9b6ef6007b22e58fa848 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
--- data/meson.build.orig	2024-09-16 13:28:26 UTC
+++ data/meson.build
@@ -13,7 +13,7 @@ foreach file : [ 'Init', 'PreSession', 'PostSession' ]
   install_data(generated_file,
     install_dir: gdmconfdir / file,
     install_mode: 'rwxr-xr-x',
-    rename: 'Default'
+    rename: 'Default.sample'
   )
 endforeach
 
@@ -26,7 +26,7 @@ configure_file(
 # gdm.conf
 configure_file(
   input: 'gdm.conf.in',
-  output: '@BASENAME@',
+  output: 'gdm.conf.sample',
   configuration: {
     'GDM_USERNAME': get_option('user'),
   },
@@ -34,10 +34,10 @@ configure_file(
 )
 configure_file(
   input: 'gdm.conf-custom.in',
-  output: gdm_custom_conf.split('/')[-1],
+  output: 'custom.conf.sample',
   copy: true,
   install_mode: 'rw-r--r--',
-  install_dir: run_command(find_program('dirname'), gdm_custom_conf).stdout().strip(),
+  install_dir: gdmconfdir,
 )
 
 # GSettings schema
@@ -163,59 +163,61 @@ endif
   service_config.set('PLYMOUTH_QUIT_SERVICE', '')
 endif
 
-systemdsystemunitdir = get_option('systemdsystemunitdir')
-if systemdsystemunitdir != 'no'
-  if get_option('systemdsystemunitdir') != ''
-    systemd_systemunitdir = get_option('systemdsystemunitdir')
-  else
-    assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd system unit dir or disable it')
-    systemd_systemunitdir = systemd_dep.get_variable(pkgconfig: 'systemdsystemunitdir')
+if host_machine.system() == 'linux'
+  systemdsystemunitdir = get_option('systemdsystemunitdir')
+  if systemdsystemunitdir != 'no'
+    if get_option('systemdsystemunitdir') != ''
+      systemd_systemunitdir = get_option('systemdsystemunitdir')
+    else
+      assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd system unit dir or disable it')
+      systemd_systemunitdir = systemd_dep.get_variable(pkgconfig: 'systemdsystemunitdir')
+    endif
   endif
-endif
 
-systemduserunitdir = get_option('systemduserunitdir')
-if systemduserunitdir != 'no'
-  if get_option('systemduserunitdir') != ''
-    systemd_userunitdir = get_option('systemduserunitdir')
-  else
-    assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd user unit dir or disable it')
-    systemd_userunitdir = systemd_dep.get_variable(pkgconfig: 'systemduserunitdir',
-                                                   pkgconfig_define: ['prefix', get_option('prefix')])
+  systemduserunitdir = get_option('systemduserunitdir')
+  if systemduserunitdir != 'no'
+    if get_option('systemduserunitdir') != ''
+      systemd_userunitdir = get_option('systemduserunitdir')
+    else
+      assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd user unit dir or disable it')
+      systemd_userunitdir = systemd_dep.get_variable(pkgconfig: 'systemduserunitdir',
+                                                     pkgconfig_define: ['prefix', get_option('prefix')])
+    endif
   endif
-endif
 
-if systemdsystemunitdir != 'no'
-  configure_file(
-    input: 'gdm.service.in',
-    output: '@BASENAME@',
-    configuration: service_config,
-    install_dir: systemd_systemunitdir,
-    format: 'cmake'
-  )
-endif
+  if systemdsystemunitdir != 'no'
+    configure_file(
+      input: 'gdm.service.in',
+      output: '@BASENAME@',
+      configuration: service_config,
+      install_dir: systemd_systemunitdir,
+      format: 'cmake'
+    )
+  endif
 
-gdm_gnome_session_wanted_targets = []
-foreach component: gdm_gnome_user_session_wanted_components
-  gdm_gnome_session_wanted_targets += 'Wants=@0@.target'.format(component)
-endforeach
+  gdm_gnome_session_wanted_targets = []
+  foreach component: gdm_gnome_user_session_wanted_components
+    gdm_gnome_session_wanted_targets += 'Wants=@0@.target'.format(component)
+  endforeach
 
-if systemduserunitdir != 'no'
-  configure_file(
-    input: 'session.conf.in',
-    output: 'session.conf',
-    configuration: {
-      'requires_component': gdm_gnome_shell_component,
-      'wants_required_components': '\n'.join(gdm_gnome_session_wanted_targets),
-    },
-    install_dir: systemd_userunitdir / 'gnome-session@gnome-login.target.d',
-  )
+  if systemduserunitdir != 'no'
+    configure_file(
+      input: 'session.conf.in',
+      output: 'session.conf',
+      configuration: {
+        'requires_component': gdm_gnome_shell_component,
+        'wants_required_components': '\n'.join(gdm_gnome_session_wanted_targets),
+      },
+      install_dir: systemd_userunitdir / 'gnome-session@gnome-login.target.d',
+    )
+  endif
 endif
 
 # XSession
 if get_option('gdm-xsession') and have_x11_support
   configure_file(
     input: 'Xsession.in',
-    output: '@BASENAME@',
+    output: 'Xsession.sample',
     configuration: {
       'libexecdir': gdm_prefix / get_option('libexecdir'),
       'XSESSION_SHELL': get_option('solaris')? '/bin/ksh' : '/bin/sh',