commit:     a6239a3ffb532529f45878e887df49319afb759e
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 23 12:19:23 2025 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Feb 23 12:19:58 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6239a3f

dev-vcs/git-2.48.1: fix build on Darwin

Disable homebrew tweaks/assumptions.

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

 .../git/files/git-2.48.1-macos-no-fsmonitor.patch  | 39 ++++++++++++++++++++++
 dev-vcs/git/git-2.48.1.ebuild                      |  4 +++
 dev-vcs/git/git-9999-r3.ebuild                     |  1 +
 3 files changed, 44 insertions(+)

diff --git a/dev-vcs/git/files/git-2.48.1-macos-no-fsmonitor.patch 
b/dev-vcs/git/files/git-2.48.1-macos-no-fsmonitor.patch
new file mode 100644
index 000000000000..f1b89e736f46
--- /dev/null
+++ b/dev-vcs/git/files/git-2.48.1-macos-no-fsmonitor.patch
@@ -0,0 +1,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 <[email protected]>
+
+--- 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')

diff --git a/dev-vcs/git/git-2.48.1.ebuild b/dev-vcs/git/git-2.48.1.ebuild
index 12b9dd2011c3..99cdc1b16654 100644
--- a/dev-vcs/git/git-2.48.1.ebuild
+++ b/dev-vcs/git/git-2.48.1.ebuild
@@ -150,6 +150,7 @@ RESTRICT="!test? ( test )"
 PATCHES=(
        "${FILESDIR}"/${PN}-2.48.0-doc-deps.patch
        "${FILESDIR}"/${PN}-2.48.1-parallel-build.patch
+       "${FILESDIR}"/${PN}-2.48.1-macos-no-fsmonitor.patch
 )
 
 pkg_setup() {
@@ -205,9 +206,12 @@ src_configure() {
                $(meson_feature perl)
                $(meson_feature perforce python)
                $(meson_use test tests)
+               -Dmacos_use_homebrew_gettext=false
                -Dperl_cpan_fallback=false
        )
 
+       [[ ${CHOST} == *-darwin* ]] && emesonargs+=( -Dfsmonitor=false )
+
        # For non-live, we use a downloaded docs tarball instead.
        if [[ ${PV} == *9999 ]] || use doc ; then
                emesonargs+=(

diff --git a/dev-vcs/git/git-9999-r3.ebuild b/dev-vcs/git/git-9999-r3.ebuild
index f90f10f55f15..b9d2fdd44259 100644
--- a/dev-vcs/git/git-9999-r3.ebuild
+++ b/dev-vcs/git/git-9999-r3.ebuild
@@ -204,6 +204,7 @@ src_configure() {
                $(meson_feature perl)
                $(meson_feature perforce python)
                $(meson_use test tests)
+               -Dmacos_use_homebrew_gettext=false
                -Dperl_cpan_fallback=false
        )
 

Reply via email to