Skip to content

Commit

Permalink
Add patch for glib-compile-resources not found
Browse files Browse the repository at this point in the history
  • Loading branch information
danyeaw authored and pbor committed Oct 2, 2023
1 parent 1eeddb0 commit 38b547b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
32 changes: 32 additions & 0 deletions gvsbuild/patches/meson/0001-find-tool-pkgconfig-variable.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From ea6f3546310ebd4a6ad7517993bb6d8a4241c7c2 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Sat, 30 Sep 2023 15:03:36 +0200
Subject: [PATCH] find_tool: don't assume the pkgconfig variable is a valid
command

ExternalProgram currently assumes that if a command is passed it exists
and can be used as is. In case we extract the path from pkgconfig the
path might not exist, on Windows it might be missing the ".exe" suffix.

By passing the variables as a name ExternalProgram will validate that
the command exists at configure time and will fail if not, and it will
try to fixup the command by appending .exe etc.

Fixes #12271
---
mesonbuild/modules/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py
index eef67a1c7431..a1aa2334495a 100644
--- a/mesonbuild/modules/__init__.py
+++ b/mesonbuild/modules/__init__.py
@@ -112,7 +112,7 @@ def find_tool(self, name: str, depname: str, varname: str, required: bool = True
if dep.found() and dep.type_name == 'pkgconfig':
value = dep.get_variable(pkgconfig=varname)
if value:
- return ExternalProgram(name, [value])
+ return ExternalProgram(value)

# Normal program lookup
return self.find_program(name, required=required, wanted=wanted)
1 change: 1 addition & 0 deletions gvsbuild/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def __init__(self):
hash="1caa0ef6082e311bdca9836e7907f548b8c3f041a42ed41f0ff916b83ac7dddd",
dir_part="meson-{version}",
exe_name="meson.py",
patches=["0001-find-tool-pkgconfig-variable.patch"],
)

def unpack(self):
Expand Down

0 comments on commit 38b547b

Please sign in to comment.