mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
build: fix some various build options
This commit is contained in:
@ -26,9 +26,12 @@ libsysprof_profile_private_sources = [
|
||||
'sysprof-perf-event-stream.c',
|
||||
'sysprof-journald-source.c',
|
||||
'sysprof-podman.c',
|
||||
'sysprof-polkit.c',
|
||||
]
|
||||
|
||||
if polkit_dep.found()
|
||||
libsysprof_profile_private_sources += ['sysprof-polkit.c']
|
||||
endif
|
||||
|
||||
libsysprof_profile_public_headers = [
|
||||
'sysprof-profile.h',
|
||||
|
||||
@ -65,8 +68,8 @@ libsysprof_profile_deps = [
|
||||
required: host_machine.system() != 'windows'),
|
||||
dependency('json-glib-1.0'),
|
||||
dependency('libdex-1', version: dex_req_version),
|
||||
dependency('polkit-gobject-1', version: polkit_req_version),
|
||||
libsystemd_dep,
|
||||
polkit_dep,
|
||||
|
||||
liblinereader_static_dep,
|
||||
libsysprof_analyze_dep,
|
||||
|
||||
@ -21,7 +21,10 @@
|
||||
#include "config.h"
|
||||
|
||||
#include "sysprof-instrument-private.h"
|
||||
#include "sysprof-polkit-private.h"
|
||||
|
||||
#if HAVE_POLKIT
|
||||
# include "sysprof-polkit-private.h"
|
||||
#endif
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (SysprofInstrument, sysprof_instrument, G_TYPE_OBJECT)
|
||||
|
||||
@ -193,6 +196,7 @@ _sysprof_instruments_acquire_policy (GPtrArray *instruments,
|
||||
*/
|
||||
if ((required_policy = _sysprof_instruments_list_required_policy (instruments)))
|
||||
{
|
||||
#if HAVE_POLKIT
|
||||
for (guint i = 0; required_policy[i]; i++)
|
||||
{
|
||||
if (!dex_await_boolean (_sysprof_polkit_authorize (connection,
|
||||
@ -201,6 +205,7 @@ _sysprof_instruments_acquire_policy (GPtrArray *instruments,
|
||||
TRUE), &error))
|
||||
return dex_future_new_for_error (g_steal_pointer (&error));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return dex_future_new_for_boolean (TRUE);
|
||||
|
||||
@ -27,7 +27,6 @@
|
||||
|
||||
#include "sysprof-diagnostic-private.h"
|
||||
#include "sysprof-instrument-private.h"
|
||||
#include "sysprof-polkit-private.h"
|
||||
#include "sysprof-recording-private.h"
|
||||
|
||||
typedef enum _SysprofRecordingCommand
|
||||
|
||||
@ -26,7 +26,8 @@ sysprofd_deps = [
|
||||
dependency('glib-2.0', version: glib_req_version),
|
||||
dependency('gio-2.0', version: glib_req_version),
|
||||
dependency('gio-unix-2.0', version: glib_req_version),
|
||||
dependency('polkit-gobject-1', version: polkit_req_version),
|
||||
polkit_dep,
|
||||
|
||||
libsysprof_capture_dep,
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user