|
|
0102549 |
From 11bb8a3950acf5d61aaf78e4b7fd3c62ba997384 Mon Sep 17 00:00:00 2001
|
|
|
0102549 |
From: Antony Lee <anntzer.lee@gmail.com>
|
|
|
0102549 |
Date: Sun, 4 Apr 2021 15:35:27 +0200
|
|
|
5de3037 |
Subject: [PATCH 1/2] Fix pkg-config handling.
|
|
|
0102549 |
|
|
|
5de3037 |
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
|
0102549 |
---
|
|
|
0102549 |
setup.py | 16 ++++++++++------
|
|
|
0102549 |
1 file changed, 10 insertions(+), 6 deletions(-)
|
|
|
0102549 |
|
|
|
0102549 |
diff --git a/setup.py b/setup.py
|
|
|
0102549 |
index 1f4f4c0..b06fd18 100644
|
|
|
0102549 |
--- a/setup.py
|
|
|
0102549 |
+++ b/setup.py
|
|
|
5de3037 |
@@ -111,14 +111,18 @@ class build_ext(build_ext):
|
|
|
0102549 |
is_arch = "Arch Linux" in Path("/etc/os-release").read_text()
|
|
|
0102549 |
except OSError:
|
|
|
0102549 |
is_arch = False
|
|
|
0102549 |
- has_pkgconfig_raqm = False
|
|
|
0102549 |
- if not is_arch:
|
|
|
0102549 |
+ if is_arch:
|
|
|
0102549 |
+ has_pkgconfig_raqm = False
|
|
|
0102549 |
+ else:
|
|
|
0102549 |
try:
|
|
|
0102549 |
- has_pkgconfig_raqm = get_pkgconfig(
|
|
|
0102549 |
- f"--atleast-version={MIN_RAQM_VERSION}", "raqm")
|
|
|
0102549 |
+ get_pkgconfig(f"--atleast-version={MIN_RAQM_VERSION}", "raqm")
|
|
|
0102549 |
except (FileNotFoundError, CalledProcessError):
|
|
|
0102549 |
- pass
|
|
|
0102549 |
- if not has_pkgconfig_raqm:
|
|
|
0102549 |
+ has_pkgconfig_raqm = False
|
|
|
0102549 |
+ else:
|
|
|
0102549 |
+ has_pkgconfig_raqm = True
|
|
|
0102549 |
+ if has_pkgconfig_raqm:
|
|
|
0102549 |
+ ext.extra_compile_args += get_pkgconfig("--cflags", "raqm")
|
|
|
0102549 |
+ else:
|
|
|
0102549 |
(tmp_include_dir / "raqm-version.h").write_text("") # Touch it.
|
|
|
0102549 |
with urllib.request.urlopen(
|
|
|
0102549 |
f"https://raw.githubusercontent.com/HOST-Oman/libraqm/"
|
|
|
5de3037 |
--
|
|
|
5de3037 |
2.29.2
|
|
|
5de3037 |
|