summaryrefslogtreecommitdiff
path: root/dev-vcs/git/files/git-2.48.1-macos-no-fsmonitor.patch
blob: f1b89e736f46fd5602741c547b05d6be2b57aa1c (plain)
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
meson.build: allow to disable fsmonitor backend for macOS

Gentoo Prefix toolchain and setup does not enable CoreServices Framework
by default, so simply allow to disable the fsmonitor backend

Signed-off-by: Fabian Groffen <grobian@gentoo.org>

--- a/meson.build
+++ b/meson.build
@@ -1117,11 +1117,13 @@
 endif
 
 fsmonitor_backend = ''
-if host_machine.system() == 'windows'
-  fsmonitor_backend = 'win32'
-elif host_machine.system() == 'darwin'
-  fsmonitor_backend = 'darwin'
-  libgit_dependencies += dependency('CoreServices')
+if get_option('fsmonitor')
+  if host_machine.system() == 'windows'
+    fsmonitor_backend = 'win32'
+  elif host_machine.system() == 'darwin'
+    fsmonitor_backend = 'darwin'
+    libgit_dependencies += dependency('CoreServices')
+  endif
 endif
 if fsmonitor_backend != ''
   libgit_c_args += '-DHAVE_FSMONITOR_DAEMON_BACKEND'
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -57,6 +57,8 @@
 # Build tweaks.
 option('macos_use_homebrew_gettext', type: 'boolean', value: true,
   description: 'Use gettext from Homebrew instead of the slightly-broken system-provided one.')
+option('fsmonitor', type: 'boolean', value: true,
+  description: 'Build fsmonitor backend on supported platforms.')
 
 # gitweb configuration.
 option('gitweb_config', type: 'string', value: 'gitweb_config.perl')