git: 496919e487ea - main - x11/libxkbcommon: fix issue with version-script and recently linker
Date: Fri, 21 Mar 2025 10:19:39 UTC
The branch main has been updated by bapt:
URL: https://cgit.FreeBSD.org/ports/commit/?id=496919e487ea8101c0dbf387626de17c23ba0dc2
commit 496919e487ea8101c0dbf387626de17c23ba0dc2
Author: Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2025-03-21 08:56:15 +0000
Commit: Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2025-03-21 10:19:35 +0000
x11/libxkbcommon: fix issue with version-script and recently linker
The test used in the meson file is valid on linux but invalid on FreeBSD
it tested while building a binary instead of a DSO.
Adding -shared to the argument of the tests makes it pass properly
Note: that this is invisible on current due to a change in the base which
is probably a bug and under investigation
PR: 285325
Reported by: many
---
x11/libxkbcommon/Makefile | 1 +
x11/libxkbcommon/files/patch-meson.build | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/x11/libxkbcommon/Makefile b/x11/libxkbcommon/Makefile
index 32f1662d4802..90377035b8ff 100644
--- a/x11/libxkbcommon/Makefile
+++ b/x11/libxkbcommon/Makefile
@@ -1,5 +1,6 @@
PORTNAME= libxkbcommon
PORTVERSION= 1.8.1
+PORTREVISION= 1
CATEGORIES= x11
MAINTAINER= x11@FreeBSD.org
diff --git a/x11/libxkbcommon/files/patch-meson.build b/x11/libxkbcommon/files/patch-meson.build
new file mode 100644
index 000000000000..ac0c651dc44f
--- /dev/null
+++ b/x11/libxkbcommon/files/patch-meson.build
@@ -0,0 +1,11 @@
+--- meson.build.orig 2025-03-11 23:24:11 UTC
++++ meson.build
+@@ -168,7 +168,7 @@ have_version_script = cc.links(
+ meson_test_map = meson.current_source_dir() / 'test/meson_test.map'
+ have_version_script = cc.links(
+ 'int main() { return 0; }',
+- args: f'-Wl,--version-script=@meson_test_map@',
++ args: ['-shared', f'-Wl,--version-script=@meson_test_map@'],
+ name: '-Wl,--version-script',
+ )
+