From 87d64b4632bd4ede0a21b81be1277538a4f4ed92 Mon Sep 17 00:00:00 2001 From: Niclas Zeising Date: Fri, 1 Feb 2019 16:21:52 +0100 Subject: [PATCH] Fix default_libdir() on FreeBSD Fix defaul_libdir() on FreeBSD. The current behaviour of using usr/lib64 if that exists is wrong on FreeBSD. The default should be to always use usr/lib, even if usr/lib64 exists as a folder in the file system. Fix this by checking if we're running on FreeBSD and then always return 'lib' in default_libdir(). --- mesonbuild/mesonlib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index ee3366fd3..05b87e492 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -655,6 +655,8 @@ def default_libdir(): return 'lib/' + archpath except Exception: pass + if is_freebsd(): + return 'lib' if os.path.isdir('/usr/lib64') and not os.path.islink('/usr/lib64'): return 'lib64' return 'lib'