libdir = join_paths(prefix, get_option('libdir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
mandir = join_paths(prefix, get_option('mandir'))
-datadir = join_paths(prefix, get_option('datadir'))
+#datadir = join_paths(prefix, get_option('datadir'))
+#FIXME: meson.build:1:0: ERROR: The value of the 'datadir' option is '/hal/share' which must be a subdir of the prefix '/usr'.
+datadir = get_option('hal-datadir')
localedir = join_paths(prefix, get_option('localedir'))
localstatedir = join_paths(prefix, get_option('localstatedir'))
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
pkgconfigdir = join_paths(libdir, 'pkgconfig')
pulselibexecdir = join_paths(libexecdir, 'pulse')
-pulsesysconfdir = join_paths(sysconfdir, 'pulse')
+#pulsesysconfdir = join_paths(sysconfdir, 'pulse')
+pulsesysconfdir = join_paths(get_option('hal-sysconfdir'), 'pulse')
modlibexecdir = get_option('modlibexecdir')
if modlibexecdir == ''
endif
systemduserunitdir = get_option('systemduserunitdir')
+systemdsystemunitdir = get_option('systemdsystemunitdir')
# the default value is set below
udevrulesdir = get_option('udevrulesdir')
database_dep = dependency('', required: false)
endif
+# TIZEN BUILD OPTION
+vconf_dep = dependency('vconf')
+if vconf_dep.found()
+ cdata.set('HAVE_VCONF', 1)
+endif
+
+dlog_dep = dependency('dlog', required : get_option('dlog'))
+if dlog_dep.found()
+ cdata.set('TIZEN_DLOG', 1)
+endif
+
+if get_option('buffer-attribute')
+ cdata.set('TIZEN_BUFFER_ATTR', 1)
+endif
+
+if get_option('udev-usb-only')
+ cdata.set('TIZEN_UDEV_USB_ONLY', 1)
+endif
+
+if get_option('pcm-dump')
+ cdata.set('TIZEN_PCM_DUMP', 1)
+endif
+
+if get_option('udev-usb-only')
+ cdata.set('TIZEN_UDEV_USB_ONLY', 1)
+endif
+
+if get_option('pa-ready')
+ cdata.set('TIZEN_PA_READY', 1)
+endif
+
+if get_option('pa-simple-extensions')
+ cdata.set('TIZEN_PA_SIMPLE_EXT', 1)
+endif
+
+if get_option('empty-pop')
+ cdata.set('TIZEN_EMPTY_POP', 1)
+endif
+
+if get_option('volume-ramp')
+ cdata.set('TIZEN_VOLUME_RAMP', 1)
+endif
+
+if get_option('individual-volume-ratio')
+ cdata.set('TIZEN_INDIVIDUAL_VOLUME_RATIO', 1)
+endif
+
+if get_option('filter-group')
+ cdata.set('TIZEN_FILTER_GROUP', 1)
+endif
+
+if get_option('prelink')
+ cdata.set('TIZEN_TV_PROD_PRELINK', 1)
+endif
+
+if get_option('lwipc')
+ cdata.set('TIZEN_TV_PROD_LWIPC', 1)
+endif
+
+enable_security = false
+cynara_client_dep = dependency('cynara-client', required : get_option('security'))
+cynara_creds_socket_dep = dependency('cynara-creds-socket', required : get_option('security'))
+cynara_session_dep = dependency('cynara-session', required : get_option('security'))
+if cynara_client_dep.found() and cynara_creds_socket_dep.found() and cynara_session_dep.found()
+ cdata.set('TIZEN_SECURITY', 1)
+ enable_security = true
+endif
+
+# TIZEN BUILD OPTION end
+
if get_option('ipv6')
cdata.set('HAVE_IPV6', 1)
endif
if systemd_dep.found() and systemduserunitdir == ''
systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir')
endif
+if systemd_dep.found() and systemdsystemunitdir == ''
+ systemdsystemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
+endif
x11_dep = dependency('x11-xcb', required : get_option('x11'))
if x11_dep.found()
# Module dependencies
-if cc.has_header('sys/soundcard.h')
+# OSS support : import from 15.0
+if cc.has_header('sys/soundcard.h', required: get_option('oss-output'))
+ # OSS output via daemon module-detect
cdata.set('HAVE_OSS_OUTPUT', 1)
+ # OSS wrapper
cdata.set('HAVE_OSS_WRAPPER', 1)
cdata.set('PULSEDSP_LOCATION', pulsedsp_location)
endif
cdata.set('HAVE_LIRC', 1)
endif
-openssl_dep = dependency('openssl', version : '>= 0.9', required : get_option('openssl'))
+openssl_dep = dependency('openssl1.1', version : '>= 0.9', required : get_option('openssl'))
if openssl_dep.found()
cdata.set('HAVE_OPENSSL', 1)
endif
# get_configtool_variable() work with it, so we have no way to get this flag right,
# unless we do all the work ourselves. See current work in glib, also meson #553.
pc_cdata.set('PTHREAD_LIBS', '-pthread')
+pc_cdata.set('PA_DEFAULT_CONFIG_DIR', cdata.get_unquoted('PA_DEFAULT_CONFIG_DIR'))
pc_files = [
'libpulse.pc',
'libpulse-simple.pc',
+ 'pulsecore.pc',
]
if glib_dep.found()
# 'Enable per-user EsounD socket: @0@'.format(${ENABLE_PER_USER_ESOUND_SOCKET}),
# 'Force preopen: @0@'.format(${FORCE_PREOPEN}),
# 'Preopened modules: @0@'.format(${PREOPEN_MODS}),
+ '',
+ 'Tizen options:',
+ ' dlog: @0@'.format(dlog_dep.found()),
+ ' buffer-attribute: @0@'.format(get_option('buffer-attribute')),
+ ' pcm-dump: @0@'.format(get_option('pcm-dump')),
+ ' security: @0@'.format(enable_security),
+ ' udev-usb-only: @0@'.format(get_option('udev-usb-only')),
+ ' pa-ready: @0@'.format(get_option('pa-ready')),
+ ' pa-simple-extensions: @0@'.format(get_option('pa-simple-extensions')),
+ ' empty-pop: @0@'.format(get_option('empty-pop')),
+ ' volume-ramp: @0@'.format(get_option('volume-ramp')),
+ ' individual-volume-ratio: @0@'.format(get_option('individual-volume-ratio')),
+ ' prelink (for TV): @0@'.format(get_option('prelink')),
+ ' lwipc (for TV): @0@'.format(get_option('lwipc')),
]
message('\n '.join(summary))
+option('dlog',
+ type : 'boolean', value : true,
+ description : 'dlog')
+option('buffer-attribute',
+ type : 'boolean', value : true,
+ description : 'buffer attribute')
+option('pcm-dump',
+ type : 'boolean', value : false,
+ description : 'pcm dump')
+option('security',
+ type : 'boolean', value : true,
+ description : 'security')
+option('udev-usb-only',
+ type : 'boolean', value : true,
+ description : 'udev usb only')
+option('pa-ready',
+ type : 'boolean', value : true,
+ description : 'pa ready')
+option('pa-simple-extensions',
+ type : 'boolean', value : true,
+ description : 'pa simple extensions')
+option('empty-pop',
+ type : 'boolean', value : true,
+ description : 'empty pop')
+option('volume-ramp',
+ type : 'boolean', value : true,
+ description : 'volume ramp')
+option('individual-volume-ratio',
+ type : 'boolean', value : true,
+ description : 'individual volume ratio')
+option('filter-group',
+ type : 'boolean', value : true,
+ description : 'filter group')
+option('prelink',
+ type : 'boolean', value : false,
+ description : 'prelink')
+option('lwipc',
+ type : 'boolean', value : false,
+ description : 'lwipc')
+option('hal-datadir',
+ type : 'string',
+ description : 'Directory for HAL data files')
+option('hal-sysconfdir',
+ type : 'string',
+ description : 'Directory for HAL sysconf files')
option('gcov',
type : 'boolean', value : false,
description : 'Enable optional gcov coverage analysis')
type : 'string', value : 'pulse-access',
description : 'Group which is allowed access to a system-wide PulseAudio daemon (pulse-access)')
option('database',
- type : 'combo', value : 'tdb',
+ type : 'combo',
choices : [ 'gdbm', 'tdb', 'simple' ],
description : 'Database backend')
option('legacy-database-entry-format',
option('systemduserunitdir',
type : 'string',
description : 'Directory for systemd user service files')
+option('systemdsystemunitdir',
+ type : 'string',
+ description : 'Directory for systemd system service files')
option('udevrulesdir',
type : 'string',
description : 'Directory for udev rules (defaults to /lib/udev/rules.d)')
type : 'feature', value : 'auto',
description : 'Optional GLib 2 support')
option('gsettings',
- type : 'feature', value : 'auto',
+ type : 'feature',
description : 'Optional GSettings support')
option('gtk',
type : 'feature', value : 'auto',
option('orc',
type : 'feature', value : 'auto',
description : 'Optimized Inner Loop Runtime Compiler')
+option('oss-output',
+ type : 'feature', value : 'auto',
+ description : 'Optional OSS output support')
option('samplerate',
type : 'feature', value : 'disabled',
description : 'Optional libsamplerate support (DEPRECATED)')
%define udev_dir %{_prefix}/lib/udev
+%global _vpath_builddir build
Name: pulseaudio
Summary: Improved Linux sound server
BuildRequires: libtool
BuildRequires: intltool
BuildRequires: fdupes
+BuildRequires: meson >= 0.50.0
BuildRequires: pkgconfig(speexdsp)
BuildRequires: pkgconfig(sndfile)
BuildRequires: pkgconfig(alsa)
%endif
export LD_AS_NEEDED=0
-NOCONFIGURE=yes ./bootstrap.sh
-%configure --prefix=%{_prefix} \
- --datadir=%{_hal_datadir} \
- --disable-static \
- --enable-alsa \
- --disable-ipv6 \
- --disable-oss-output \
- --disable-oss-wrapper \
- --disable-esound \
- --disable-per-user-esound-socket \
- --disable-x11 \
- --disable-hal-compat \
- --disable-lirc \
- --disable-avahi \
- --disable-jack \
- --without-fftw \
- --disable-systemd-login \
- --disable-gconf \
- --disable-gsettings \
- --with-udev-rules-dir=%{udev_dir}/rules.d \
- --with-system-user=pulse \
- --with-system-group=pulse \
- --with-access-group=pulse-access \
- --enable-dlog \
- --enable-buffer-attr \
- --disable-pcm-dump \
- --enable-security \
- --enable-udev-with-usb-only \
- --enable-paready \
- --enable-pa-simple-ext \
- --enable-empty-pop \
-%{?asan: --disable-neon-opt } \
- --enable-filter-group \
- --enable-volume-ramp \
- --enable-individual-volume-ratio \
-%if "%{tizen_profile_name}" == "tv"
- --enable-prelink \
- --enable-lwipc \
+
+mkdir -p %{_vpath_builddir}
+%meson --auto-feature=auto \
+ -Dhal-datadir=%{_hal_datadir} \
+ -Dhal-sysconfdir=%{_hal_sysconfdir} \
+ -Dtests=false \
+ -Ddatabase=simple \
+ -Dbluez5-native-headset=false \
+ -Dgsettings=disabled \
+ -Dhal-compat=false \
+ -Dipv6=false \
+ %if "%{tizen_profile_name}" == "tv"
+ -Dprelink=true \
+ -Dlwipc=true \
%endif
- hal_sysconfdir=%{_hal_sysconfdir}
+ -Doss-output=disabled \
+ -Dudevrulesdir=%{udev_dir}/rules.d
-%__make %{?_smp_mflags} V=0
+%meson_build
%install
-%make_install
+%meson_install
%find_lang %{name}
rm -rf %{buildroot}%{_sysconfdir}/xdg/autostart/pulseaudio-kde.desktop
rm -rf %{buildroot}%{_bindir}/start-pulseaudio-kde
rm -rf %{buildroot}%{_bindir}/start-pulseaudio-x11
-rm -rf %{buildroot}%{_libdir}/pulse-%{version}/modules/module-device-manager.so
+rm -rf %{buildroot}%{_libdir}/pulse-%{version}/modules/module-device-manager.so
+rm -rf %{buildroot}%{_libdir}/pulse-%{version}/modules/module-systemd-login.so
mkdir -p %{buildroot}%{_includedir}/pulsecore/filter
cp %{buildroot}%{_includedir}/pulsecore/lfe-filter.h %{buildroot}%{_includedir}/pulsecore/filter
install_dir: systemduserunitdir,
)
endif
+
+if systemd_dep.found()
+ sd_system_service_conf = configuration_data()
+ sd_system_service_conf.set('PA_BINARY', cdata.get_unquoted('PA_BINARY'))
+
+ sd_system_service_file = configure_file(
+ input : 'systemd/system/pulseaudio.service.in',
+ output : 'pulseaudio.service',
+ configuration : sd_system_service_conf,
+ install : true,
+ install_dir : systemdsystemunitdir,
+ )
+endif
install_dir : privlibdir,
dependencies : [
libm_dep, thread_dep, dl_dep, shm_dep, iconv_dep, sndfile_dep, dbus_dep,
- x11_dep, libsystemd_dep, glib_dep, gtk_dep, asyncns_dep
+ x11_dep, libsystemd_dep, glib_dep, gtk_dep, asyncns_dep, dlog_dep
],
implicit_include_directories : false)
[ 'module-switch-on-connect', 'module-switch-on-connect.c' ],
[ 'module-switch-on-port-available', 'module-switch-on-port-available.c' ],
[ 'module-tunnel-sink', 'module-tunnel.c', [], [], [x11_dep] ],
- [ 'module-tunnel-sink-new', 'module-tunnel-sink-new.c' ],
+ [ 'module-tunnel-sink-new', 'module-tunnel-sink-new.c', [], [], [vconf_dep] ],
[ 'module-tunnel-source', 'module-tunnel.c', [], [], [x11_dep] ],
- [ 'module-tunnel-source-new', 'module-tunnel-source-new.c' ],
+ [ 'module-tunnel-source-new', 'module-tunnel-source-new.c', [], [], [vconf_dep] ],
[ 'module-virtual-sink', 'module-virtual-sink.c' ],
[ 'module-virtual-source', 'module-virtual-source.c' ],
[ 'module-virtual-surround-sink', 'module-virtual-surround-sink.c' ],
]
endif
-if cc.has_header('sys/soundcard.h')
+if cdata.has('HAVE_OSS_OUTPUT')
subdir('oss')
all_modules += [
[ 'module-oss', 'oss/module-oss.c', [], [], [], liboss_util ],
]
endif
+if enable_security
+ libpulsecore_sources += ['cynara.c']
+ libpulsecore_headers += ['cynara.h']
+endif
+
if samplerate_dep.found()
libpulsecore_sources += ['resampler/libsamplerate.c']
endif
install_rpath : privlibdir,
install_dir : privlibdir,
link_with : libpulsecore_simd_lib,
- dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, libatomic_ops_dep, orc_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep],
+ dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, libatomic_ops_dep, orc_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep, cynara_client_dep, cynara_creds_socket_dep, cynara_session_dep],
implicit_include_directories : false)
libpulsecore_dep = declare_dependency(link_with: libpulsecore)
+install_data(
+ libpulsecore_headers,
+ install_dir : join_paths(includedir, 'pulsecore')
+)
+
# Internal libraries for modules
# TODO: understand 'c_args' and 'dependencies' better, maybe we can remove some
)
endif
-if cc.has_header('sys/soundcard.h')
+if cdata.has('HAVE_OSS_WRAPPER')
libpulsecommon_sources = [
'padsp.c',
]