Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108367464
D31702.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D31702.diff
View Options
diff --git a/devel/glib20/Makefile b/devel/glib20/Makefile
--- a/devel/glib20/Makefile
+++ b/devel/glib20/Makefile
@@ -2,6 +2,7 @@
PORTNAME= glib
DISTVERSION= 2.70.0
+PORTREVISION= 1
PORTEPOCH= 2
CATEGORIES= devel
MASTER_SITES= GNOME
@@ -36,7 +37,7 @@
_LIBVERSION= 0.7000.0
PLIST_SUB= LIBVERSION=${_LIBVERSION}
-OPTIONS_DEFINE= DEBUG FAM_ALTBACKEND MANPAGES NLS
+OPTIONS_DEFINE= DEBUG FAM_ALTBACKEND MANPAGES NLS TEST
OPTIONS_DEFAULT= MANPAGES
OPTIONS_SUB= yes
@@ -47,6 +48,9 @@
MANPAGES_USE= GNOME=libxslt:build
MANPAGES_MESON_TRUE= man
+TEST_DEPENDS= dbus-daemon:devel/dbus
+TEST_MESON_TRUE= tests
+
.include <bsd.port.pre.mk>
# doesn't build yet
diff --git a/devel/glib20/files/patch-gio_tests_meson.build b/devel/glib20/files/patch-gio_tests_meson.build
new file mode 100644
--- /dev/null
+++ b/devel/glib20/files/patch-gio_tests_meson.build
@@ -0,0 +1,61 @@
+--- gio/tests/meson.build.orig 2021-06-10 18:57:57 UTC
++++ gio/tests/meson.build
+@@ -49,7 +49,6 @@ gio_tests = {
+ 'buffered-output-stream' : {},
+ 'cancellable' : {},
+ 'contexts' : {},
+- 'contenttype' : {},
+ 'converter-stream' : {},
+ 'credentials' : {},
+ 'data-input-stream' : {},
+@@ -94,7 +93,6 @@ gio_tests = {
+ 'tls-interaction' : {'extra_sources' : ['gtesttlsbackend.c']},
+ 'tls-database' : {'extra_sources' : ['gtesttlsbackend.c']},
+ 'tls-bindings' : {'extra_sources' : ['gtesttlsbackend.c']},
+- 'gdbus-address-get-session' : {},
+ 'win32-appinfo' : {},
+ }
+
+@@ -151,10 +149,6 @@ endif
+ if host_machine.system() != 'windows'
+ gio_tests += {
+ 'file' : {},
+- 'gdbus-peer' : {
+- 'dependencies' : [libgdbus_example_objectmanager_dep],
+- 'install_rpath' : installed_tests_execdir
+- },
+ 'gdbus-peer-object-manager' : {},
+ 'live-g-file' : {},
+ 'socket-address' : {},
+@@ -190,31 +184,14 @@ if host_machine.system() != 'windows'
+ }
+ endif
+
+- # Uninstalled because of the check-for-executable logic in DesktopAppInfo
+- # unable to find the installed executable
+- if not glib_have_cocoa
+- gio_tests += {
+- 'appinfo' : {
+- 'install' : false,
+- },
+- 'desktop-app-info' : {
+- 'install' : false,
+- },
+- }
+- endif
+-
+ test_extra_programs += {
+ 'basic-application' : {},
+ 'dbus-launch' : {},
+- 'appinfo-test' : {},
+ }
+
+ if not glib_have_cocoa
+ test_extra_programs += {
+ 'apps' : {},
+- }
+- gio_tests += {
+- 'mimeapps' : {},
+ }
+ endif
+
diff --git a/devel/glib20/files/patch-glib_glib-unix.c b/devel/glib20/files/patch-glib_glib-unix.c
new file mode 100644
--- /dev/null
+++ b/devel/glib20/files/patch-glib_glib-unix.c
@@ -0,0 +1,63 @@
+--- glib/glib-unix.c.orig 2021-09-17 10:17:56 UTC
++++ glib/glib-unix.c
+@@ -463,7 +463,6 @@ g_unix_get_passwd_entry (const gchar *user_name,
+ } *buffer = NULL;
+ gsize string_buffer_size = 0;
+ GError *local_error = NULL;
+- int errsv = 0;
+
+ g_return_val_if_fail (user_name != NULL, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+@@ -493,10 +492,8 @@ g_unix_get_passwd_entry (const gchar *user_name,
+ */
+ buffer = g_malloc0 (sizeof (*buffer) + string_buffer_size + 6);
+
+- errno = 0;
+ retval = getpwnam_r (user_name, &buffer->pwd, buffer->string_buffer,
+ string_buffer_size, &passwd_file_entry);
+- errsv = errno;
+
+ /* Bail out if: the lookup was successful, or if the user id can't be
+ * found (should be pretty rare case actually), or if the buffer should be
+@@ -508,19 +505,19 @@ g_unix_get_passwd_entry (const gchar *user_name,
+ break;
+ }
+ else if (retval == 0 ||
+- errsv == ENOENT || errsv == ESRCH ||
+- errsv == EBADF || errsv == EPERM)
++ retval == ENOENT || retval == ESRCH ||
++ retval == EBADF || retval == EPERM)
+ {
+ /* Username not found. */
+- g_unix_set_error_from_errno (&local_error, errsv);
++ g_unix_set_error_from_errno (&local_error, retval);
+ break;
+ }
+- else if (errsv == ERANGE)
++ else if (retval == ERANGE)
+ {
+ /* Can’t allocate enough string buffer space. */
+ if (string_buffer_size > 32 * 1024)
+ {
+- g_unix_set_error_from_errno (&local_error, errsv);
++ g_unix_set_error_from_errno (&local_error, retval);
+ break;
+ }
+
+@@ -529,7 +526,7 @@ g_unix_get_passwd_entry (const gchar *user_name,
+ }
+ else
+ {
+- g_unix_set_error_from_errno (&local_error, errsv);
++ g_unix_set_error_from_errno (&local_error, retval);
+ break;
+ }
+ }
+@@ -543,7 +540,6 @@ g_unix_get_passwd_entry (const gchar *user_name,
+ {
+ g_clear_pointer (&buffer, g_free);
+ g_propagate_error (error, g_steal_pointer (&local_error));
+- errno = errsv;
+ }
+
+ return (struct passwd *) g_steal_pointer (&buffer);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 25, 5:15 AM (20 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16125842
Default Alt Text
D31702.diff (4 KB)
Attached To
Mode
D31702: devel/glib20: Add option for test suite / unit tests
Attached
Detach File
Event Timeline
Log In to Comment