repo/gentoo:master commit in: x11-misc/xosview/files/, x11-misc/xosview/

Andreas K. Hüttel <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1786797246.84530ea350fbcef7eb4fdbaa7c3c351af4a5764a.dilfridge@gentoo>
commit:     84530ea350fbcef7eb4fdbaa7c3c351af4a5764a
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 15 12:33:09 2026 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 12:34:06 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84530ea3

x11-misc/xosview: Fix build with LTO

Bug: https://github.com/hills/xosview/issues/27
Closes: https://bugs.gentoo.org/941118
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 x11-misc/xosview/files/xosview-1.24-lto.patch | 33 +++++++++++++++++++++++++++
 x11-misc/xosview/xosview-1.24-r1.ebuild       |  6 ++++-
 2 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/x11-misc/xosview/files/xosview-1.24-lto.patch b/x11-misc/xosview/files/xosview-1.24-lto.patch
new file mode 100644
index 000000000000..e3a4c1bd3269
--- /dev/null
+++ b/x11-misc/xosview/files/xosview-1.24-lto.patch
@@ -0,0 +1,33 @@
+From 2c8f279e9bd837a9c931d3b013247dab8a627061 Mon Sep 17 00:00:00 2001
+From: Mark Hills <[email protected]>
+Date: Tue, 13 Jan 2026 21:05:54 +0000
+Subject: [PATCH] Consistent types required for building with LTO
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Gentoo user reported [1] this bug "During LTO compatibility testing" [2].
+I don't have access to the platform to verify this fixes the bug they
+are seeing.
+
+[1] https://github.com/hills/xosview/issues/27
+[2] https://bugs.gentoo.org/941118
+
+Reported-by: Andreas K. Hüttel <[email protected]>
+---
+ Xrm.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Xrm.cc b/Xrm.cc
+index 9795add..cae7811 100644
+--- a/Xrm.cc
++++ b/Xrm.cc
+@@ -14,7 +14,7 @@
+ #include <iostream>
+ #include "stringutils.h"
+ 
+-extern char *defaultXResourceString;
++extern const char *defaultXResourceString;
+ 
+ 
+ bool Xrm::_initialized = false;

diff --git a/x11-misc/xosview/xosview-1.24-r1.ebuild b/x11-misc/xosview/xosview-1.24-r1.ebuild
index 7f6405a1383e..b9c407f5aaab 100644
--- a/x11-misc/xosview/xosview-1.24-r1.ebuild
+++ b/x11-misc/xosview/xosview-1.24-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -24,6 +24,10 @@ DEPEND="${COMMON_DEPS}
 
 DOCS=( CHANGES README.linux TODO )
 
+PATCHES=(
+	"${FILESDIR}/${P}-lto.patch"
+)
+
 src_prepare() {
 	default
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.