meson: Fix for TV build 31/268831/4
authorSeungbae Shin <seungbae.shin@samsung.com>
Mon, 3 Jan 2022 11:36:04 +0000 (20:36 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Mon, 24 Jan 2022 03:45:32 +0000 (03:45 +0000)
- Support for lwipc/prelink build option
- Disable bluez feature on TV
- Exclude sbc checking if bluez feature is disabled

Change-Id: Ib81d68a1b92d122c4a30fea15451d0a4d290d2a8

meson.build
packaging/pulseaudio.spec
src/daemon/meson.build

index bbe554d..519dcfc 100644 (file)
@@ -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)
index 666313b..5efb0d7 100644 (file)
@@ -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
index b1948bc..274c889 100644 (file)
@@ -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()