gentoo/dev-libs/libxml2/files/libxml2-2.14.2-no-git.patch
Alfred Wingate 67aa8dff37
dev-libs/libxml2: add 2.14.2
* Change to the meson build system.
* Drop deprecated lzma support as there is already going to be a lot of
  breakage. Try handle most of it at once.
* Python bindings will be removed in 2.16 so one more major release to
  keep it around.

Bug: https://bugs.gentoo.org/954318
Signed-off-by: Alfred Wingate <parona@protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/41919
Signed-off-by: Sam James <sam@gentoo.org>
2025-05-05 08:55:11 +01:00

35 lines
943 B
Diff

From 4d6eb90bfdfe347fb1c5fe3151ef9dae80d12866 Mon Sep 17 00:00:00 2001
From: Alfred Wingate <parona@protonmail.com>
Date: Sun, 4 May 2025 15:41:31 +0300
Subject: [PATCH] meson: allow building without git
Signed-off-by: Alfred Wingate <parona@protonmail.com>
---
meson.build | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index a8af753d..b0c99eef 100644
--- a/meson.build
+++ b/meson.build
@@ -17,9 +17,13 @@ v_min = v_array[1].to_int()
v_mic = v_array[2].to_int()
v_nbr = v_maj * 10000 + v_min * 100 + v_mic
v_extra = ''
-r = run_command('git', 'describe', check: false)
-if (r.returncode() == 0)
- v_extra = '-GIT' + r.stdout().strip()
+
+git = find_program('git', required: false)
+if git.found()
+ r = run_command(git, 'describe', check: false)
+ if (r.returncode() == 0)
+ v_extra = '-GIT' + r.stdout().strip()
+ endif
endif
# install paths
--
2.49.0