Sun, 21 Nov 2021 23:56:35 -0600
Bump minimum requirements to match GTK4
While technically, libpurple doesn't need to match Pidgin, we probably aren't going to bother with the differences right now. Since Pidgin is moving to GTK4, we don't need to require secondary dependencies that are older than what GTK4 needs.
Testing Done:
Compile only.
Reviewed at https://reviews.imfreedom.org/r/1138/
| libpurple/glibcompat.h | file | annotate | diff | comparison | revisions | |
| meson.build | file | annotate | diff | comparison | revisions |
--- a/libpurple/glibcompat.h Mon Nov 15 04:04:31 2021 -0600 +++ b/libpurple/glibcompat.h Sun Nov 21 23:56:35 2021 -0600 @@ -49,62 +49,6 @@ # define g_stat purple_g_stat #endif -#if !GLIB_CHECK_VERSION(2, 58, 0) -#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f)) - -static inline GTimeZone * -g_time_zone_new_offset(gint32 seconds) { - GTimeZone *tz = NULL; - gchar *identifier = NULL; - - /* Seemingly, we should be using @seconds directly to set the - * #TransitionInfo.gmt_offset to avoid all this string building and - * parsing. However, we always need to set the #GTimeZone.name to a - * constructed string anyway, so we might as well reuse its code. - */ - identifier = g_strdup_printf("%c%02u:%02u:%02u", - (seconds >= 0) ? '+' : '-', - (ABS (seconds) / 60) / 60, - (ABS (seconds) / 60) % 60, - ABS (seconds) % 60); - tz = g_time_zone_new(identifier); - g_free(identifier); - - g_assert(g_time_zone_get_offset(tz, 0) == seconds); - - return tz; -} - -#endif /* !GLIB_CHECK_VERSION(2, 58, 0) */ - -#if !GLIB_CHECK_VERSION(2, 62, 0) -static inline gchar * -g_date_time_format_iso8601(GDateTime *datetime) { - GString *outstr = NULL; - gchar *main_date = NULL; - gint64 offset; - - /* Main date and time. */ - main_date = g_date_time_format(datetime, "%Y-%m-%dT%H:%M:%S"); - outstr = g_string_new(main_date); - g_free(main_date); - - /* Timezone. Format it as `%:::z` unless the offset is zero, in which case - * we can simply use `Z`. */ - offset = g_date_time_get_utc_offset(datetime); - - if (offset == 0) { - g_string_append_c(outstr, 'Z'); - } else { - gchar *time_zone = g_date_time_format(datetime, "%:::z"); - g_string_append(outstr, time_zone); - g_free(time_zone); - } - - return g_string_free(outstr, FALSE); -} -#endif /* GLIB_CHECK_VERSION(2, 62, 0) */ - /* Backport the static inline version of g_memdup2 if we don't have g_memdup2. * see https://mail.gnome.org/archives/desktop-devel-list/2021-February/msg00000.html * for more information.
--- a/meson.build Mon Nov 15 04:04:31 2021 -0600 +++ b/meson.build Sun Nov 21 23:56:35 2021 -0600 @@ -223,17 +223,17 @@ endif # ####################################################################### -# # Check for GLib 2.64 (required) +# # Check for GLib (required) # ####################################################################### -glib = dependency('glib-2.0', version : '>= 2.64.0') +glib = dependency('glib-2.0', version : '>= 2.66.0') gio = dependency('gio-2.0') gobject = dependency('gobject-2.0') gthread = dependency('gthread-2.0') gnome = import('gnome') add_project_arguments( - '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_64', - '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_64', + '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66', + '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_66', language : 'c',) ####################################################################### @@ -241,7 +241,7 @@ ####################################################################### if get_option('introspection') - enable_introspection = dependency('gobject-introspection-1.0', version : '>= 1.30.0').found() + enable_introspection = dependency('gobject-introspection-1.0', version : '>= 1.39.0').found() else enable_introspection = false endif