[Mesa-dev] [PATCH v2] meson: Don't confuse the install and search paths for dri drivers
Eric Engestrom
eric at engestrom.ch
Thu Jan 18 23:02:46 UTC 2018
On Thursday, 2018-01-18 17:09:33 +0000, Dylan Baker wrote:
> Currently there is not a separate option for setting the search path of
> DRI drivers in meson, like there is in scons and autotools. This is an
> oversight and needs to be fixed. This adds an extra option
> `dri-search-path`, which will default to the value of
> `dri-drivers-path`, like autotools does.
>
> v2: - Split input list before joining.
>
> Reported-by: Ilia Mirkin <imirkin at alum.mit.edu>
> Signed-off-by: Dylan Baker <dylan.c.baker at intel.com>
> ---
> meson.build | 6 ++++++
> meson_options.txt | 8 +++++++-
> src/egl/meson.build | 2 +-
> src/gbm/meson.build | 2 +-
> src/glx/meson.build | 3 ++-
> 5 files changed, 17 insertions(+), 4 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index f3179c38062..8bab43681e9 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -57,6 +57,12 @@ dri_drivers_path = get_option('dri-drivers-path')
> if dri_drivers_path == ''
> dri_drivers_path = join_paths(get_option('libdir'), 'dri')
> endif
> +_search = get_option('dri-search-path')
> +if _search != ''
> + dri_search_path = ';'.join(_search.split(','))
s/;/:/
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
> +else
> + dri_search_path = dri_drivers_path
> +endif
>
> with_gles1 = get_option('gles1')
> with_gles2 = get_option('gles2')
> diff --git a/meson_options.txt b/meson_options.txt
> index 894378985fd..e541659733f 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -41,7 +41,13 @@ option(
> 'dri-drivers-path',
> type : 'string',
> value : '',
> - description : 'Location of dri drivers. Default: $libdir/dri.'
> + description : 'Location to install dri drivers. Default: $libdir/dri.'
> +)
> +option(
> + 'dri-search-path',
> + type : 'string',
> + value : '',
> + description : 'Locations to search for dri drivers, passed as comma separated list. Default: dri-drivers-path.'
> )
> option(
> 'gallium-drivers',
> diff --git a/src/egl/meson.build b/src/egl/meson.build
> index df6e8b49dac..6cd04567b0d 100644
> --- a/src/egl/meson.build
> +++ b/src/egl/meson.build
> @@ -160,7 +160,7 @@ libegl = shared_library(
> c_args : [
> c_vis_args,
> c_args_for_egl,
> - '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_driver_dir),
> + '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_search_path),
> '-D_EGL_BUILT_IN_DRIVER_DRI2',
> '-D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_ at 0@'.format(egl_native_platform.to_upper()),
> ],
> diff --git a/src/gbm/meson.build b/src/gbm/meson.build
> index 14b9e960360..2f5d1c6ddd7 100644
> --- a/src/gbm/meson.build
> +++ b/src/gbm/meson.build
> @@ -38,7 +38,7 @@ incs_gbm = [
> if with_dri2
> files_gbm += files('backends/dri/gbm_dri.c', 'backends/dri/gbm_driint.h')
> deps_gbm += dep_libdrm # TODO: pthread-stubs
> - args_gbm += '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_driver_dir)
> + args_gbm += '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_search_path)
> endif
> if with_platform_wayland
> deps_gbm += dep_wayland_server
> diff --git a/src/glx/meson.build b/src/glx/meson.build
> index 04cd647ee49..508e7583ee5 100644
> --- a/src/glx/meson.build
> +++ b/src/glx/meson.build
> @@ -128,7 +128,8 @@ else
> endif
>
> gl_lib_cargs = [
> - '-D_REENTRANT', '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_driver_dir),
> + '-D_REENTRANT',
> + '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_search_path),
> ]
>
> if dep_xxf86vm != [] and dep_xxf86vm.found()
> --
> 2.15.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list