Merge branch 'misc-cleanups' into 'master'

build: Cleanups and use g_memdup2 when building with newer glib

See merge request GNOME/libnotify!22
This commit is contained in:
Marco Trevisan 2022-04-21 23:50:08 +00:00
commit 8a8c86cdc6
3 changed files with 8 additions and 3 deletions

View File

@ -69,8 +69,9 @@ pkgconfig.generate(libnotify_lib,
)
introspection = get_option('introspection')
if not introspection.disabled()
find_program('g-ir-scanner', required: introspection.enabled())
g_ir_scanner = find_program('g-ir-scanner', required: introspection.enabled())
if g_ir_scanner.found() and not introspection.disabled()
gnome.generate_gir(libnotify_lib,
sources: headers + sources + enum_types,
namespace: 'Notify',

View File

@ -1056,7 +1056,11 @@ notify_notification_set_hint_byte_array (NotifyNotification *notification,
g_return_if_fail (value != NULL || len == 0);
#ifdef GLIB_VERSION_2_68
value_dup = g_memdup2 (value, len);
#else
value_dup = g_memdup (value, len);
#endif
notify_notification_set_hint (notification, key,
g_variant_new_from_data (G_VARIANT_TYPE ("ay"),
value_dup,

View File

@ -66,7 +66,7 @@ if get_option('man')
'@INPUT@',
]
testrun = run_command(xsltproc, '--nonet', stylesheet)
testrun = run_command(xsltproc, '--nonet', stylesheet, check: false)
if testrun.returncode() != 0
error('DocBook stylesheet for generating man pages not found, you need to install docbook-xsl-ns or similar package.')