mirror of
https://github.com/frida/releng.git
synced 2026-11-07 09:36:02 -10:00
env: Reject pkg-config ignoring PKG_CONFIG_LIBDIR
The pkgconf-pypi shim silently does nothing when it is set, which made Meson fall back to building all dependencies from source.
This commit is contained in:
1 parent
33c17e8b6f
commit
07e5aa86ee
1 file changed
+10
@@ -335,9 +335,19 @@ def find_usable_system_pkg_config() -> Optional[str]:
|
||||
is_strawberry_perl_stub = "Pure-Perl" in helptext
|
||||
if is_strawberry_perl_stub:
|
||||
return None
|
||||
if not responds_when_libdir_is_set(binary):
|
||||
return None
|
||||
return binary
|
||||
|
||||
|
||||
def responds_when_libdir_is_set(pkg_config: str) -> bool:
|
||||
version = subprocess.run([pkg_config, "--version"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
env={**os.environ, "PKG_CONFIG_LIBDIR": os.devnull}).stdout
|
||||
return version.strip() != ""
|
||||
|
||||
|
||||
def make_pkg_config_wrapper(pkg_config: List[str], pkg_config_path: List[str], pkg_config_libdir: Optional[str] = None) -> str:
|
||||
lines = [
|
||||
"import os",
|
||||
|
||||
Reference in new issue
Block a user