From 429ad2c18ef2a934b641459f3c98db0a4146c69a Mon Sep 17 00:00:00 2001 From: rim Date: Sun, 15 Sep 2019 03:40:30 +0300 Subject: [PATCH] FreeBSD build meson -Dxattr=false -Dsystemtap=true -Dinstalled_tests=true -Diconv=external -Db_lundef=false -Dpython_name=python3.6 builddir ninja -C builddir cd builddir meson test cd .. rm -rf builddir --- meson.build | 10 +++++++--- meson_options.txt | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index d52bb01bde..75311688e9 100644 --- a/meson.build +++ b/meson.build @@ -1760,7 +1760,11 @@ else found_iconv = true endif if not found_iconv and ['auto', 'external'].contains(iconv_opt) and cc.has_header_symbol('iconv.h', 'iconv_open') - libiconv = [cc.find_library('iconv')] + dirs = [] + if host_system == 'freebsd' + dirs += '/usr/local/lib' + endif + libiconv = [cc.find_library('iconv', dirs: dirs)] found_iconv = true endif @@ -1989,9 +1993,9 @@ endif glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline) -python = import('python').find_installation('python3') # used for '#!/usr/bin/env ' -python_name = 'python3' +python_name = get_option('python_name') +python = import('python').find_installation(python_name) python_version = python.language_version() python_version_req = '>=3.4' diff --git a/meson_options.txt b/meson_options.txt index 2c831e37e3..5229f5dd4c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,8 @@ +option('python_name', + type : 'string', + value : 'python3', + description : 'Python name, for FreeBSD may be python3.6') + option('runtime_libdir', type : 'string', value : '', -- GitLab