Skip to content

Commit

Permalink
Merged dpkg-architecture fix for Gentoo.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpakkane committed Oct 22, 2016
2 parents 1e3e22c + 3a385ba commit 885a3c7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions authors.txt
Expand Up @@ -51,3 +51,4 @@ Guillaume Poirier-Morency
Scott D Phillips
Gautier Pelloux-Prayer
Alexandre Foley
Jouni Kosonen
20 changes: 11 additions & 9 deletions mesonbuild/mesonlib.py
Expand Up @@ -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'
Expand Down

0 comments on commit 885a3c7

Please sign in to comment.