Drop glib < 2.60 workaround after r549741

PR:		247278
This commit is contained in:
Jan Beich 2020-09-24 00:57:06 +00:00
parent f734cf2616
commit e673a0434b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=549871
8 changed files with 4 additions and 343 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= feedbackd
PORTVERSION= s20200726
PORTREVISION= 1
CATEGORIES= accessibility
MAINTAINER= jbeich@FreeBSD.org

View File

@ -1,23 +0,0 @@
Drop after devel/glib20 is updated to 2.58 or later.
../tests/test-lfb-integration.c:26:17: warning: implicit declaration of function 'g_canonicalize_filename' is invalid in C99 [-Wimplicit-function-declaration]
servicesdir = g_canonicalize_filename (relative, NULL);
^
ld: error: undefined symbol: g_canonicalize_filename
>>> referenced by test-lfb-integration.c
>>> tests/test-lfb-integration.p/test-lfb-integration.c.o:(fixture_setup)
--- tests/test-lfb-integration.c.orig 2020-07-26 11:06:35 UTC
+++ tests/test-lfb-integration.c
@@ -23,7 +23,11 @@ fixture_setup (TestFixture *fixture, gconstpointer unu
fixture->dbus = g_test_dbus_new (G_TEST_DBUS_NONE);
relative = g_test_build_filename (G_TEST_BUILT, "services", NULL);
+#if GLIB_CHECK_VERSION(2, 58, 0)
servicesdir = g_canonicalize_filename (relative, NULL);
+#else
+ servicesdir = realpath (relative, NULL);
+#endif
g_free (relative);
g_test_dbus_add_service_dir (fixture->dbus, servicesdir);

View File

@ -5,6 +5,7 @@
PORTNAME= gtk
PORTVERSION= 3.24.23
PORTREVISION= 1
CATEGORIES= x11-toolkits
MASTER_SITES= GNOME/sources/gtk+/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}
PKGNAMESUFFIX= 3

View File

@ -1,220 +0,0 @@
--- configure 2020-06-07 20:13:09.165799417 +0000
+++ configure 2020-06-07 20:12:54.318912986 +0000
@@ -3308,7 +3308,7 @@ GLIB_VERSION_CFLAGS="-DGLIB_MIN_REQUIRED_VERSION=GLIB_
-GLIB_REQUIRED_VERSION=2.57.2
+GLIB_REQUIRED_VERSION=2.56.3
PANGO_REQUIRED_VERSION=1.41.0
ATK_REQUIRED_VERSION=2.15.1
CAIRO_REQUIRED_VERSION=1.14.0
@@ -23543,12 +23543,12 @@ if test -n "$BASE_DEPENDENCIES_CFLAGS"; then
pkg_cv_BASE_DEPENDENCIES_CFLAGS="$BASE_DEPENDENCIES_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_BASE_DEPENDENCIES_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>/dev/null`
+ pkg_cv_BASE_DEPENDENCIES_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -23560,12 +23560,12 @@ if test -n "$BASE_DEPENDENCIES_LIBS"; then
pkg_cv_BASE_DEPENDENCIES_LIBS="$BASE_DEPENDENCIES_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_BASE_DEPENDENCIES_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>/dev/null`
+ pkg_cv_BASE_DEPENDENCIES_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -23586,14 +23586,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- BASE_DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>&1`
+ BASE_DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>&1`
else
- BASE_DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>&1`
+ BASE_DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$BASE_DEPENDENCIES_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (glib-2.0 >= 2.57.2 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0) were not met:
+ as_fn_error $? "Package requirements (glib-2.0 >= 2.56.3 atk >= 2.15.1 pango >= 1.41.0 fribidi >= 0.19.7 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0) were not met:
$BASE_DEPENDENCIES_PKG_ERRORS
@@ -24385,7 +24385,7 @@ else
fi
- min_glib_version=2.57.2
+ min_glib_version=2.56.3
pkg_config_args="glib-2.0 >= $min_glib_version"
for module in . gobject gmodule-no-export
do
@@ -24879,7 +24879,7 @@ rm -f core conftest.err conftest.$ac_objext \
GLIB_MKENUMS=""
GLIB_COMPILE_RESOURCES=""
as_fn_error $? "
-*** GLIB 2.57.2 or better is required. The latest version of
+*** GLIB 2.56.3 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/." "$LINENO" 5
fi
rm -f conf.glibtest
@@ -26825,12 +26825,12 @@ if test "$os_win32" != "yes"; then
have_gio_unix=yes
fi
if test "$have_gio_unix" = "yes"; then
- GDK_GIO_PACKAGE="gio-unix-2.0 >= 2.57.2"
+ GDK_GIO_PACKAGE="gio-unix-2.0 >= 2.56.3"
$as_echo "#define HAVE_GIO_UNIX 1" >>confdefs.h
else
- GDK_GIO_PACKAGE="gio-2.0 >= 2.57.2"
+ GDK_GIO_PACKAGE="gio-2.0 >= 2.56.3"
fi
# Check for Pango flags
@@ -27134,13 +27134,13 @@ $as_echo "yes" >&6; }
fi
-GTK_PACKAGES="atk >= 2.15.1 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0 gio-2.0 >= 2.57.2"
+GTK_PACKAGES="atk >= 2.15.1 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0 gio-2.0 >= 2.56.3"
GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES epoxy >= 1.4 fribidi >= 0.19.7"
if test "x$enable_x11_backend" = xyes -o "x$enable_wayland_backend" = xyes; then
GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2"
fi
if test "$have_gio_unix" = "yes"; then
- GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES gio-unix-2.0 >= 2.57.2"
+ GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES gio-unix-2.0 >= 2.56.3"
fi
GTK_EXTRA_LIBS=
diff --git gtk/gtkmountoperation.c gtk/gtkmountoperation.c
index 43b039e40e..8ca5c55413 100644
--- gtk/gtkmountoperation.c
+++ gtk/gtkmountoperation.c
@@ -121,10 +121,14 @@ struct _GtkMountOperationPrivate {
GtkWidget *username_entry;
GtkWidget *domain_entry;
GtkWidget *password_entry;
+#if GLIB_CHECK_VERSION(2, 57, 2)
GtkWidget *pim_entry;
+#endif
GtkWidget *anonymous_toggle;
+#if GLIB_CHECK_VERSION(2, 57, 2)
GtkWidget *tcrypt_hidden_toggle;
GtkWidget *tcrypt_system_toggle;
+#endif
GList *user_widgets;
GAskPasswordFlags ask_flags;
@@ -351,6 +355,7 @@ pw_dialog_got_response (GtkDialog *dialog,
g_mount_operation_set_password (op, text);
}
+#if GLIB_CHECK_VERSION(2, 57, 2)
if (priv->pim_entry)
{
text = gtk_entry_get_text (GTK_ENTRY (priv->pim_entry));
@@ -371,6 +376,7 @@ pw_dialog_got_response (GtkDialog *dialog,
if (priv->tcrypt_system_toggle && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->tcrypt_system_toggle)))
g_mount_operation_set_is_tcrypt_system_volume (op, TRUE);
+#endif
if (priv->ask_flags & G_ASK_PASSWORD_SAVING_SUPPORTED)
g_mount_operation_set_password_save (op, priv->password_save);
@@ -399,6 +405,7 @@ entry_has_input (GtkWidget *entry_widget)
return text != NULL && text[0] != '\0';
}
+#if GLIB_CHECK_VERSION(2, 57, 2)
static gboolean
pim_entry_is_valid (GtkWidget *entry_widget)
{
@@ -421,6 +428,7 @@ pim_entry_is_valid (GtkWidget *entry_widget)
else
return TRUE;
}
+#endif
static gboolean
pw_dialog_input_is_valid (GtkMountOperation *operation)
@@ -435,8 +443,12 @@ pw_dialog_input_is_valid (GtkMountOperation *operation
* definitively needs a password.
*/
is_valid = entry_has_input (priv->username_entry) &&
+#if GLIB_CHECK_VERSION(2, 57, 2)
entry_has_input (priv->domain_entry) &&
pim_entry_is_valid (priv->pim_entry);
+#else
+ entry_has_input (priv->domain_entry);
+#endif
return is_valid;
}
@@ -705,6 +717,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
priv->domain_entry = table_add_entry (operation, rows++, _("_Domain"),
default_domain, operation);
+#if GLIB_CHECK_VERSION(2, 57, 2)
priv->pim_entry = NULL;
if (priv->ask_flags & G_ASK_PASSWORD_TCRYPT)
{
@@ -729,6 +742,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
priv->pim_entry = table_add_entry (operation, rows++, _("_PIM"), NULL, operation);
}
+#endif
priv->password_entry = NULL;
if (priv->ask_flags & G_ASK_PASSWORD_NEED_PASSWORD)
@@ -846,12 +860,14 @@ call_password_proxy_cb (GObject *source,
g_mount_operation_set_password (op, g_variant_get_string (value, NULL));
else if (strcmp (key, "password_save") == 0)
g_mount_operation_set_password_save (op, g_variant_get_uint32 (value));
+#if GLIB_CHECK_VERSION(2, 57, 2)
else if (strcmp (key, "hidden_volume") == 0)
g_mount_operation_set_is_tcrypt_hidden_volume (op, g_variant_get_boolean (value));
else if (strcmp (key, "system_volume") == 0)
g_mount_operation_set_is_tcrypt_system_volume (op, g_variant_get_boolean (value));
else if (strcmp (key, "pim") == 0)
g_mount_operation_set_pim (op, g_variant_get_uint32 (value));
+#endif
}
out:
diff --git meson.build meson.build
index 415a66c732..9081b03381 100644
--- meson.build
+++ meson.build
@@ -8,8 +8,8 @@ project('gtk+-3.0', 'c',
license: 'LGPLv2.1+')
glib_major_req = 2
-glib_minor_req = 57
-glib_micro_req = 2
+glib_minor_req = 56
+glib_micro_req = 3
if glib_minor_req.is_odd()
glib_min_required = 'GLIB_VERSION_@0@_@1@'.format(glib_major_req, glib_minor_req - 1)

View File

@ -3,6 +3,7 @@
PORTNAME= phosh
DISTVERSIONPREFIX= v
DISTVERSION= 0.4.4
PORTREVISION= 1
CATEGORIES= x11
MAINTAINER= jbeich@FreeBSD.org

View File

@ -1,48 +0,0 @@
Drop after devel/glib20 is updated to 2.58 or later.
meson.build:107:0: ERROR: Invalid version of dependency, need 'gio-2.0' ['>=2.58'] found '2.56.3'.
../tools/dump-app-list.c:25:29: warning: implicit declaration of function 'G_SOURCE_FUNC' is invalid in C99 [-Wimplicit-function-declaration]
g_timeout_add_seconds (2, G_SOURCE_FUNC (g_main_loop_quit), loop);
^
ld: error: undefined symbol: G_SOURCE_FUNC
>>> referenced by dump-app-list.c
>>> tools/dump-app-list.p/dump-app-list.c.o:(main)
--- meson.build.orig 2020-08-03 08:10:28 UTC
+++ meson.build
@@ -27,7 +27,7 @@ configure_file(
configuration: config_h,
)
-glib_ver = 'GLIB_VERSION_2_58'
+glib_ver = 'GLIB_VERSION_2_56'
add_project_arguments([
'-DHAVE_CONFIG_H',
@@ -104,9 +104,9 @@ gnome = import('gnome')
i18n = import('i18n')
gcr_dep = dependency('gcr-3', version: '>= 3.7.5')
-gio_dep = dependency('gio-2.0', version: '>=2.58')
-gio_unix_dep = dependency('gio-unix-2.0', version: '>=2.58')
-glib_dep = dependency('glib-2.0', version: '>=2.58')
+gio_dep = dependency('gio-2.0', version: '>=2.56')
+gio_unix_dep = dependency('gio-unix-2.0', version: '>=2.56')
+glib_dep = dependency('glib-2.0', version: '>=2.56')
gnome_desktop_dep = dependency('gnome-desktop-3.0', version: '>=3.26')
gobject_dep = dependency('gobject-2.0', version: '>=2.50.0')
gtk_dep = dependency('gtk+-3.0', version: '>=3.22')
--- tools/dump-app-list.c.orig 2020-08-03 08:10:28 UTC
+++ tools/dump-app-list.c
@@ -10,6 +10,10 @@
#include <app-list-model.h>
+#if !GLIB_CHECK_VERSION(2, 58, 0)
+#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
+#endif
+
int
main (int argc, char **argv)
{

View File

@ -3,6 +3,7 @@
PORTNAME= wofi
DISTVERSIONPREFIX= v
DISTVERSION= 1.2.2
PORTREVISION= 1
CATEGORIES= x11
#MASTER_SITES= https://hg.sr.ht/~scoopta/${PORTNAME}/archive/${DISTVERSIONFULL}${EXTRACT_SUFX}?dummy=/
MASTER_SITES+= LOCAL/jbeich # https://todo.sr.ht/~sircmpwn/hg.sr.ht/33

View File

@ -1,52 +0,0 @@
Partially revert https://hg.sr.ht/~scoopta/wofi/rev/6343e02e2478 until
devel/glib20 is updated to 2.60 or later.
ld: error: undefined symbol: g_app_info_launch_uris_async
>>> referenced by drun.c
>>> wofi@exe/modes_drun.c.o:(wofi_drun_exec)
ld: error: undefined symbol: g_app_info_launch_uris_finish
>>> referenced by drun.c
>>> wofi@exe/modes_drun.c.o:(launch_done)
--- modes/drun.c.orig 2020-07-28 23:18:44 UTC
+++ modes/drun.c
@@ -19,6 +19,7 @@
#include <libgen.h>
#include <sys/stat.h>
+#include <errno.h>
#include <map.h>
#include <utils.h>
@@ -373,6 +374,7 @@ struct widget* wofi_drun_get_widget(void) {
return NULL;
}
+#if GLIB_CHECK_VERSION(2, 60, 0)
static void launch_done(GObject* obj, GAsyncResult* result, gpointer data) {
GError* err = NULL;
if(g_app_info_launch_uris_finish(G_APP_INFO(obj), result, &err)) {
@@ -387,6 +389,7 @@ static void launch_done(GObject* obj, GAsyncResult* re
}
exit(1);
}
+#endif
static void set_dri_prime(GDesktopAppInfo* info) {
bool dri_prime = g_desktop_app_info_get_boolean(info, "PrefersNonDefaultGPU");
@@ -404,7 +407,14 @@ void wofi_drun_exec(const gchar* cmd) {
exit(0);
} else {
set_dri_prime(info);
+#if GLIB_CHECK_VERSION(2, 60, 0)
g_app_info_launch_uris_async(G_APP_INFO(info), NULL, NULL, NULL, launch_done, (gchar*) cmd);
+#else
+ const char* exec = g_app_info_get_executable(G_APP_INFO(info));
+ execlp(exec, exec, NULL);
+ fprintf(stderr, "%s cannot be executed\n", exec);
+ exit(errno);
+#endif
}
} else if(strrchr(cmd, ' ') != NULL) {
char* space = strrchr(cmd, ' ');