git: 11ed1fa43559 - main - devel/dconf: Unbreak tests by fixing the check for the -Wl,--version-script flag

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Thu, 18 Sep 2025 10:30:02 UTC
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=11ed1fa43559a2d74603132c612a91fbd2eba905

commit 11ed1fa43559a2d74603132c612a91fbd2eba905
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2025-09-18 09:27:53 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2025-09-18 10:29:52 +0000

    devel/dconf: Unbreak tests by fixing the check for the -Wl,--version-script flag
    
    The Meson cc.get_supported_link_arguments() call boils down to
    
    cc test.c ... -Wl,--version-script,/path/to/symbols.map
    
    which fails with
    
    ld: error: version script assignment of 'global' to symbol 'g_io_module_load' failed: symbol not defined
    
    The error feels natural to me since test.c does not indeed define these symbols.
    I have no idea how this check works on Linux.
---
 devel/dconf/Makefile                          |  2 --
 devel/dconf/files/patch-client_meson.build    | 11 +++++++++++
 devel/dconf/files/patch-gsettings_meson.build | 11 +++++++++++
 devel/dconf/files/patch-gsettings_symbol.map  | 11 +++++++++++
 4 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/devel/dconf/Makefile b/devel/dconf/Makefile
index 1456888cd9a2..9594bca467e1 100644
--- a/devel/dconf/Makefile
+++ b/devel/dconf/Makefile
@@ -27,8 +27,6 @@ LDFLAGS+=	-B${LOCALBASE}/bin
 SHEBANG_FILES=	tests/test-dconf.py
 BINARY_ALIAS=	python3=${PYTHON_VERSION}
 
-TESTING_UNSAFE=	some tests fail
-
 post-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/dconf/db
 	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/dconf/profile
diff --git a/devel/dconf/files/patch-client_meson.build b/devel/dconf/files/patch-client_meson.build
new file mode 100644
index 000000000000..168f053dbe26
--- /dev/null
+++ b/devel/dconf/files/patch-client_meson.build
@@ -0,0 +1,11 @@
+--- client/meson.build.orig	2025-09-15 15:53:57 UTC
++++ client/meson.build
+@@ -33,7 +33,7 @@ symbol_map = join_paths(meson.current_source_dir(), 's
+ ]
+ 
+ symbol_map = join_paths(meson.current_source_dir(), 'symbol.map')
+-ldflags = cc.get_supported_link_arguments('-Wl,--version-script,@0@'.format(symbol_map))
++ldflags = '-Wl,--version-script,@0@'.format(symbol_map)
+ 
+ libdconf = shared_library(
+   'dconf',
diff --git a/devel/dconf/files/patch-gsettings_meson.build b/devel/dconf/files/patch-gsettings_meson.build
new file mode 100644
index 000000000000..c556c6ec05c3
--- /dev/null
+++ b/devel/dconf/files/patch-gsettings_meson.build
@@ -0,0 +1,11 @@
+--- gsettings/meson.build.orig	2025-09-15 15:53:57 UTC
++++ gsettings/meson.build
+@@ -4,7 +4,7 @@ symbol_map = join_paths(meson.current_source_dir(), 's
+ ]
+ 
+ symbol_map = join_paths(meson.current_source_dir(), 'symbol.map')
+-ldflags = cc.get_supported_link_arguments('-Wl,--version-script,@0@'.format(symbol_map))
++ldflags = '-Wl,--version-script,@0@'.format(symbol_map)
+ 
+ libdconf_settings = shared_library(
+   'dconfsettings',
diff --git a/devel/dconf/files/patch-gsettings_symbol.map b/devel/dconf/files/patch-gsettings_symbol.map
new file mode 100644
index 000000000000..148f0b87b6af
--- /dev/null
+++ b/devel/dconf/files/patch-gsettings_symbol.map
@@ -0,0 +1,11 @@
+--- gsettings/symbol.map.orig	2025-09-15 15:53:57 UTC
++++ gsettings/symbol.map
+@@ -3,8 +3,6 @@ global:
+   g_io_module_load;
+   g_io_module_unload;
+   g_io_module_query;
+-  environ;
+-  __progname;
+ local:
+   *;
+ };