Added Debian multilib support.

pull/43/head
Jussi Pakkanen 10 years ago
parent 87ea869f02
commit 22c23ee1fb
  1. 2
      meson.py
  2. 6
      mesonlib.py

@ -42,7 +42,7 @@ else:
parser.add_option('--prefix', default=def_prefix, dest='prefix',
help='the installation prefix (default: %default)')
parser.add_option('--libdir', default='lib', dest='libdir',
parser.add_option('--libdir', default=mesonlib.default_libdir(), dest='libdir',
help='the installation subdir of libraries (default: %default)')
parser.add_option('--bindir', default='bin', dest='bindir',
help='the installation subdir of executables (default: %default)')

@ -86,3 +86,9 @@ def version_compare(vstr1, vstr2):
varr1 = [int(x) for x in vstr1.split('.')]
varr2 = [int(x) for x in vstr2.split('.')]
return cmpop(varr1, varr2)
def default_libdir():
if os.path.isfile('/etc/debian_version'):
archpath = subprocess.check_output(['dpkg-architecture', '-qDEB_HOST_MULTIARCH']).decode().strip()
return 'lib/' + archpath
return 'lib'

Loading…
Cancel
Save