From 8d77b4490c33879dde00669442b56709dc9fdf22 Mon Sep 17 00:00:00 2001 From: Seungbae Shin Date: Mon, 3 Jan 2022 20:36:04 +0900 Subject: [PATCH] meson: Fix for TV build - Support for lwipc/prelink build option - Disable bluez feature on TV - Exclude sbc checking if bluez feature is disabled Change-Id: Ib81d68a1b92d122c4a30fea15451d0a4d290d2a8 --- meson.build | 7 ++++--- packaging/pulseaudio.spec | 1 + src/daemon/meson.build | 14 +++++++++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index bbe554d..519dcfc 100644 --- a/meson.build +++ b/meson.build @@ -641,7 +641,8 @@ if get_option('prelink') cdata.set('TIZEN_TV_PROD_PRELINK', 1) endif -if get_option('lwipc') +lwipc_dep = dependency('lwipc', required : get_option('lwipc')) +if lwipc_dep.found() cdata.set('TIZEN_TV_PROD_LWIPC', 1) endif @@ -786,10 +787,10 @@ else cdata.set('HAVE_AVAHI', 0) endif -sbc_dep = dependency('sbc', version : '>= 1.0', required : false) if get_option('bluez5') - assert(dbus_dep.found(), 'BlueZ requires D-Bus support') + sbc_dep = dependency('sbc', version : '>= 1.0', required : false) assert(sbc_dep.found(), 'BlueZ requires SBC support') + assert(dbus_dep.found(), 'BlueZ requires D-Bus support') cdata.set('HAVE_SBC', 1) cdata.set('HAVE_BLUEZ', 1) cdata.set('HAVE_BLUEZ_5', 1) diff --git a/packaging/pulseaudio.spec b/packaging/pulseaudio.spec index 666313b..5efb0d7 100644 --- a/packaging/pulseaudio.spec +++ b/packaging/pulseaudio.spec @@ -200,6 +200,7 @@ mkdir -p %{_vpath_builddir} %if "%{tizen_profile_name}" == "tv" -Dprelink=true \ -Dlwipc=true \ + -Dbluez5=false \ %endif -Doss-output=disabled \ -Dudevrulesdir=%{udev_dir}/rules.d diff --git a/src/daemon/meson.build b/src/daemon/meson.build index b1948bc..274c889 100644 --- a/src/daemon/meson.build +++ b/src/daemon/meson.build @@ -22,6 +22,14 @@ if dbus_dep.found() pulseaudio_headers += 'server-lookup.h' endif +if cdata.has('TIZEN_TV_PROD_PRELINK') + extra_link_args = '-pie' + extra_c_args = '-fPIE' +else + extra_link_args = [] + extra_c_args = [] +endif + # FIXME: dependencies executable('pulseaudio', pulseaudio_sources, @@ -29,10 +37,10 @@ executable('pulseaudio', install: true, install_rpath : privlibdir, include_directories : [configinc, topinc], - link_args : ['-ffast-math'], + link_args : ['-ffast-math', extra_link_args], link_with : [libpulsecore, libpulsecommon, libpulse], - dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep, dl_dep, libintl_dep, platform_dep, platform_socket_dep], - c_args : pa_c_args, + dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep, dl_dep, libintl_dep, platform_dep, platform_socket_dep, lwipc_dep], + c_args : [pa_c_args, extra_c_args], ) if x11_dep.found() -- 2.7.4