aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--authors.txt1
-rw-r--r--mesonbuild/mesonlib.py20
2 files changed, 12 insertions, 9 deletions
diff --git a/authors.txt b/authors.txt
index bdad5bd..0222ff6 100644
--- a/authors.txt
+++ b/authors.txt
@@ -51,3 +51,4 @@ Guillaume Poirier-Morency
Scott D Phillips
Gautier Pelloux-Prayer
Alexandre Foley
+Jouni Kosonen
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
index ca72985..067c620 100644
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -181,15 +181,17 @@ def version_compare(vstr1, vstr2):
return cmpop(varr1, varr2)
def default_libdir():
- try:
- pc = subprocess.Popen(['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
- stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
- (stdo, _) = pc.communicate()
- if pc.returncode == 0:
- archpath = stdo.decode().strip()
- return 'lib/' + archpath
- except Exception:
- pass
+ if is_debianlike():
+ try:
+ pc = subprocess.Popen(['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.DEVNULL)
+ (stdo, _) = pc.communicate()
+ if pc.returncode == 0:
+ archpath = stdo.decode().strip()
+ return 'lib/' + archpath
+ except Exception:
+ pass
if os.path.isdir('/usr/lib64') and not os.path.islink('/usr/lib64'):
return 'lib64'
return 'lib'