From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-libs/libxkbcommon/files/, x11-libs/libxkbcommon/
Date: Sat, 10 Aug 2024 20:16:32 +0000 (UTC) [thread overview]
Message-ID: <1723320940.5184dcfcc6f1e9ca6a6f21a36f1db9e6ff418ce8.sam@gentoo> (raw)
commit: 5184dcfcc6f1e9ca6a6f21a36f1db9e6ff418ce8
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 10 20:15:40 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 10 20:15:40 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5184dcfc
x11-libs/libxkbcommon: fix missing versioned symbols w/ older binutils
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/libxkbcommon-1.7.0-symbol-ver.patch | 104 +++++++++++++++++++++
...n-1.7.0.ebuild => libxkbcommon-1.7.0-r1.ebuild} | 4 +
2 files changed, 108 insertions(+)
diff --git a/x11-libs/libxkbcommon/files/libxkbcommon-1.7.0-symbol-ver.patch b/x11-libs/libxkbcommon/files/libxkbcommon-1.7.0-symbol-ver.patch
new file mode 100644
index 000000000000..6defb3563b78
--- /dev/null
+++ b/x11-libs/libxkbcommon/files/libxkbcommon-1.7.0-symbol-ver.patch
@@ -0,0 +1,104 @@
+Avoid breaking with older binutils (silently not having versioned symbols).
+
+https://github.com/xkbcommon/libxkbcommon/commit/621e31014cbc985bd99d778260ad11a5fee783da
+https://github.com/xkbcommon/libxkbcommon/commit/1d8a25d6f10ecfc638d7a889bf7d42f79c692a40
+
+From 621e31014cbc985bd99d778260ad11a5fee783da Mon Sep 17 00:00:00 2001
+From: Pierre Le Marre <dev@wismill.eu>
+Date: Tue, 16 Jul 2024 07:00:53 +0200
+Subject: [PATCH] build: Require meson >= 0.58
+
+This will enable f-strings and allow us to simplify the build file.
+---
+ meson.build | 14 ++++----------
+ 2 files changed, 5 insertions(+), 10 deletions(-)
+ create mode 100644 changes/build/+meson_bump.breaking.md
+
+--- a/meson.build
++++ b/meson.build
+@@ -7,7 +7,7 @@ project(
+ 'warning_level=2',
+ 'b_lundef=true',
+ ],
+- meson_version : '>= 0.52.0',
++ meson_version : '>= 0.58.0', # Released on May 2021
+ )
+ pkgconfig = import('pkgconfig')
+ cc = meson.get_compiler('c')
+@@ -270,9 +270,7 @@ dep_libxkbcommon = declare_dependency(
+ link_with: libxkbcommon,
+ include_directories: include_directories('include'),
+ )
+-if meson.version().version_compare('>= 0.54.0')
+- meson.override_dependency('xkbcommon', dep_libxkbcommon)
+-endif
++meson.override_dependency('xkbcommon', dep_libxkbcommon)
+ pkgconfig.generate(
+ libxkbcommon,
+ name: 'xkbcommon',
+@@ -341,9 +339,7 @@ You can disable X11 support with -Denable-x11=false.''')
+ link_with: libxkbcommon_x11,
+ include_directories: include_directories('include'),
+ )
+- if meson.version().version_compare('>= 0.54.0')
+- meson.override_dependency('xkbcommon-x11', dep_libxkbcommon_x11)
+- endif
++ meson.override_dependency('xkbcommon-x11', dep_libxkbcommon_x11)
+ pkgconfig.generate(
+ libxkbcommon_x11,
+ name: 'xkbcommon-x11',
+@@ -409,9 +405,7 @@ if get_option('enable-xkbregistry')
+ link_with: libxkbregistry,
+ include_directories: include_directories('include'),
+ )
+- if meson.version().version_compare('>= 0.54.0')
+- meson.override_dependency('xkbregistry', dep_libxkbregistry)
+- endif
++ meson.override_dependency('xkbregistry', dep_libxkbregistry)
+ endif
+
+ man_pages = []
+
+From 1d8a25d6f10ecfc638d7a889bf7d42f79c692a40 Mon Sep 17 00:00:00 2001
+From: Pierre Le Marre <dev@wismill.eu>
+Date: Fri, 12 Jul 2024 11:10:46 +0200
+Subject: [PATCH] build: Check for --undefined-version support
+
+Gate the use of `--undefined-version` in the linker because it breaks on
+older GNU `ld`: https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=58272.
+---
+ meson.build | 11 +++++++++--
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index e8451b69..d0738468 100644
+--- a/meson.build
++++ b/meson.build
+@@ -142,10 +142,17 @@ configh_data.set('_CRT_NONSTDC_NO_DEPRECATE', 1)
+ # Reduce unnecessary includes on MSVC.
+ configh_data.set('WIN32_LEAN_AND_MEAN', 1)
+
++xkbcommon_map = meson.current_source_dir() / 'xkbcommon.map'
++
+ # Supports -Wl,--version-script?
++if cc.has_link_argument('-Wl,--undefined-version')
++ extra_linker_args = ',--undefined-version'
++else
++ extra_linker_args = ''
++endif
+ have_version_script = cc.links(
+ 'int main(){}',
+- args: '-Wl,--undefined-version,--version-script=' + meson.current_source_dir()/'xkbcommon.map',
++ args: f'-Wl,--version-script=@xkbcommon_map@@extra_linker_args@',
+ name: '-Wl,--version-script',
+ )
+
+@@ -235,7 +242,7 @@ libxkbcommon_sources = [
+ libxkbcommon_link_args = []
+ libxkbcommon_link_deps = []
+ if have_version_script
+- libxkbcommon_link_args += '-Wl,--version-script=' + meson.current_source_dir()/'xkbcommon.map'
++ libxkbcommon_link_args += f'-Wl,--version-script=@xkbcommon_map@'
+ libxkbcommon_link_deps += 'xkbcommon.map'
+ elif cc.get_argument_syntax() == 'msvc'
+ libxkbcommon_def = custom_target('xkbcommon.def',
diff --git a/x11-libs/libxkbcommon/libxkbcommon-1.7.0.ebuild b/x11-libs/libxkbcommon/libxkbcommon-1.7.0-r1.ebuild
similarity index 96%
rename from x11-libs/libxkbcommon/libxkbcommon-1.7.0.ebuild
rename to x11-libs/libxkbcommon/libxkbcommon-1.7.0-r1.ebuild
index 3fe9b0eff71b..0130d3df99eb 100644
--- a/x11-libs/libxkbcommon/libxkbcommon-1.7.0.ebuild
+++ b/x11-libs/libxkbcommon/libxkbcommon-1.7.0-r1.ebuild
@@ -41,6 +41,10 @@ DEPEND="${RDEPEND}
tools? ( wayland? ( >=dev-libs/wayland-protocols-1.12 ) )
"
+PATCHES=(
+ "${FILESDIR}"/libxkbcommon-1.7.0-symbol-ver.patch
+)
+
pkg_setup() {
if use test; then
python-any-r1_pkg_setup
reply other threads:[~2024-08-10 20:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1723320940.5184dcfcc6f1e9ca6a6f21a36f1db9e6ff418ce8.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox