From 09231eaead5b957db8251ac1ec65e241dbd105ce Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Thu, 11 Jul 2019 00:52:50 +0200 Subject: [PATCH] meson: Fix build of padsp - Rename "pulsedspdir" to the same "padsplibdir" that Autotools uses. - Add a new option "pulsedsp-location" that is only used for padsp.in, just like Autotools' --with-pulsedsp-location. - Use 'set' instead of 'set_quoted' to avoid PULSEDSP_LOCATION getting quoted twice. --- meson.build | 15 ++++++++++----- meson_options.txt | 10 ++++++++-- src/utils/meson.build | 2 +- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index dcfb8fab0..47f26bfe3 100644 --- a/meson.build +++ b/meson.build @@ -50,7 +50,7 @@ datadir = join_paths(prefix, get_option('datadir')) localedir = join_paths(prefix, get_option('localedir')) localstatedir = join_paths(prefix, get_option('localstatedir')) sysconfdir = join_paths(prefix, get_option('sysconfdir')) -privlibdir = join_paths(get_option('libdir'), 'pulseaudio') +privlibdir = join_paths(libdir, 'pulseaudio') alsadatadir = join_paths(datadir, 'pulseaudio', 'alsa-mixer') pkgconfigdir = join_paths(libdir, 'pkgconfig') @@ -62,9 +62,14 @@ if modlibexecdir == '' modlibexecdir = join_paths(libdir, 'pulse-' + pa_version_major_minor, 'modules') endif -pulsedspdir = get_option('pulsedspdir') -if pulsedspdir == '' - pulsedspdir = join_paths(libdir, 'pulseaudio') +padsplibdir = get_option('padsplibdir') +if padsplibdir == '' + padsplibdir = privlibdir +endif + +pulsedsp_location = get_option('pulsedsp-location') +if pulsedsp_location == '' + pulsedsp_location = join_paths(prefix, padsplibdir) endif systemduserunitdir = get_option('systemduserunitdir') @@ -419,7 +424,7 @@ endif if cc.has_header('sys/soundcard.h') cdata.set('HAVE_OSS_OUTPUT', 1) cdata.set('HAVE_OSS_WRAPPER', 1) - cdata.set_quoted('PULSEDSP_LOCATION', pulsedspdir) + cdata.set('PULSEDSP_LOCATION', pulsedsp_location) endif if get_option('hal-compat') diff --git a/meson_options.txt b/meson_options.txt index 54c1ee598..e54caf5cf 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -30,9 +30,15 @@ option('running-from-build-tree', # Paths -option('pulsedspdir', +option('padsplibdir', type : 'string', - description : 'Specify location where OSS wrapper will be installed') + description : 'Specify location where OSS wrapper library will be installed') +# This one gets inserted into a shell double-quoted string, so needs to be escaped (\$LIB). Meson +# removes a layer of escapes when parsing the description string, so we need to double the +# backslashes for "meson configure" to display the right text. +option('pulsedsp-location', + type : 'string', + description : 'Specify location where OSS wrapper library will be loaded from; can use \\$LIB') option('modlibexecdir', type : 'string', description : 'Specify location where modules will be installed') diff --git a/src/utils/meson.build b/src/utils/meson.build index fd407f42d..388a0c433 100644 --- a/src/utils/meson.build +++ b/src/utils/meson.build @@ -85,7 +85,7 @@ if cc.has_header('sys/soundcard.h') libpulsedsp = shared_library('pulsedsp', libpulsecommon_sources, install: true, - install_dir : pulsedspdir, + install_dir : padsplibdir, include_directories : [configinc, topinc], link_with : [libpulsecommon, libpulse], link_args : ['-ldl'],