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
This commit is contained in:
Baptiste Daroussin 2025-03-21 09:56:15 +01:00
parent e8f555f1cd
commit 496919e487
2 changed files with 12 additions and 0 deletions

View file

@ -1,5 +1,6 @@
PORTNAME= libxkbcommon
PORTVERSION= 1.8.1
PORTREVISION= 1
CATEGORIES= x11
MAINTAINER= x11@FreeBSD.org

View file

@ -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',
)