File: meson-Check-for-repository-with-python-not-git-executable.patch

package info (click to toggle)
babl 1%3A0.1.118-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,432 kB
  • sloc: ansic: 47,361; python: 180; ruby: 90; sh: 55; makefile: 24
file content (34 lines) | stat: -rw-r--r-- 1,062 bytes parent folder | download
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
From: Bruno Lopes <brunvonlope@outlook.com>
Date: Thu, 11 Dec 2025 10:48:39 -0300
Subject: meson: Check for repository with python (not git executable)

Closes: #114

As per line 415 of the Meson file, git is not a mandatory dep.

(cherry picked from commit 4efc8b827e008417c4995a93ae3310697318cfab)

Origin: upstream, after 0.1.118
---
 meson.build | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/meson.build b/meson.build
index 8206d36..387ed62 100644
--- a/meson.build
+++ b/meson.build
@@ -497,11 +497,9 @@ configure_file(
 # updated. If git is not available, don't do anything if git-version.h
 # already exists because then we are probably working with a tarball
 # in which case the git-version.h we ship is correct.
-is_git_repository = run_command(
-    git_bin,
-    'rev-parse',
-    '--is-inside-work-tree',
-    check: false,
+is_git_repository = run_command(python, '-c',
+  'import sys,os; sys.exit(0 if os.path.exists(".git") else 1)',
+  check: false
 ).returncode() == 0
 
 has_version_h = run_command(python, '-c',