public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libXISF] epel10: Fix build on s390x
@ 2026-11-01 8:09 Mattia Verga
0 siblings, 0 replies; only message in thread
From: Mattia Verga @ 2026-11-01 8:09 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/libXISF
Branch : epel10
Commit : 9c3041beba061e4147107ab1f1eb24ed1d38130c
Author : Mattia Verga <mattia.verga@proton.me>
Date : 2026-11-01T08:59:13+01:00
Stats : +54/-3 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/libXISF/c/9c3041beba061e4147107ab1f1eb24ed1d38130c?branch=epel10
Log:
Fix build on s390x
---
diff --git a/053c794.patch b/053c794.patch
new file mode 100644
index 0000000..f88f77b
--- /dev/null
+++ b/053c794.patch
@@ -0,0 +1,47 @@
+From 053c794ce9f464aa478e64de664fa1d9048d5e5b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Du=C5=A1an=20Poizl?= <nou.spiro@gmail.com>
+Date: Sat, 31 Oct 2026 21:00:18 +0100
+Subject: [PATCH] Read and write header size as little endian
+
+---
+ libxisf.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libxisf.cpp b/libxisf.cpp
+index d64b142..59a0a5a 100644
+--- a/libxisf.cpp
++++ b/libxisf.cpp
+@@ -904,6 +904,8 @@ void XISFReaderPrivate::readXISFHeader()
+ {
+ uint32_t headerLen[2] = {0};
+ _io->read((char*)&headerLen, sizeof(headerLen));
++ headerLen[0] = le32toh(headerLen[0]);
++ headerLen[1] = le32toh(headerLen[1]);
+
+ ByteArray xisfHeader(headerLen[0]);
+ _io->read(xisfHeader.data(), headerLen[0]);
+@@ -1249,6 +1251,7 @@ void XISFWriterPrivate::writeHeader()
+ }
+
+ uint32_t headerSize = header.size() - sizeof(signature);
++ headerSize = htole32(headerSize);
+ header.replace(8, sizeof(uint32_t), (const char*)&headerSize, sizeof(uint32_t));
+
+ _xisfHeader = ByteArray(header.c_str(), header.size());
+@@ -1605,6 +1608,7 @@ void XISFModifyPrivate::save(std::ostream &io)
+ }
+
+ uint32_t headerSize = header.size() - sizeof(signature);
++ headerSize = htole32(headerSize);
+ header.replace(8, sizeof(uint32_t), (const char*)&headerSize, sizeof(uint32_t));
+
+ io.write(header.c_str(), header.size());
+@@ -1753,6 +1757,8 @@ void XISFModifyPrivate::readXISFHeader()
+
+ uint32_t headerLen[2] = {0};
+ _io->read((char*)&headerLen, sizeof(headerLen));
++ headerLen[0] = le32toh(headerLen[0]);
++ headerLen[1] = le32toh(headerLen[1]);
+
+ ByteArray xisfHeader(headerLen[0]);
+ _io->read(xisfHeader.data(), headerLen[0]);
diff --git a/libXISF.spec b/libXISF.spec
index 88dfac0..a7ac740 100644
--- a/libXISF.spec
+++ b/libXISF.spec
@@ -2,8 +2,6 @@
# all packages requiring libXISF are now disabled on i686
ExcludeArch: %{ix86}
-%global sover 0.2.14
-
Name: libXISF
Version: 0.2.15
Release: %autorelease
@@ -12,6 +10,9 @@ License: GPL-3.0-or-later
URL: https://gitea.nouspiro.space/nou/libXISF
Source0: %{url}/archive/v%{version}.tar.gz
+# Backport upstream patch to fix s390x build
+Patch: 053c794.patch
+
BuildRequires: cmake >= 3.14
BuildRequires: gcc
BuildRequires: gcc-c++
@@ -39,6 +40,9 @@ developing applications that use %{name}.
%prep
%autosetup -p1 -n libxisf
+# Fix project version, upstream missed to update it
+sed -i 's/libXISF VERSION 0.2.14/libXISF VERSION 0.2.15/g' ./CMakeLists.txt
+
# remove bundled libraries
for d in "lz4" "pugixml" "zlib"
do
@@ -65,7 +69,7 @@ done
%license LICENSE
%doc README.md
%{_libdir}/%{name}.so.0
-%{_libdir}/%{name}.so.%{sover}
+%{_libdir}/%{name}.so.%{version}
%files devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-01 8:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-01 8:09 [rpms/libXISF] epel10: Fix build on s390x Mattia Verga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox