Fix build on s390x
This commit is contained in:
parent
040a1155d2
commit
4423f297f9
65
0002-Change-GUINT_FROM_LE-to-GUINT16_FROM_LE.patch
Normal file
65
0002-Change-GUINT_FROM_LE-to-GUINT16_FROM_LE.patch
Normal file
@ -0,0 +1,65 @@
|
||||
From d79ad6d2c89cadb83eeb14321c862e4b4691fb97 Mon Sep 17 00:00:00 2001
|
||||
From: Jerry James <loganjerry@gmail.com>
|
||||
Date: Wed, 23 Aug 2023 12:07:54 -0600
|
||||
Subject: [PATCH] Change GUINT_FROM_LE to GUINT16_FROM_LE
|
||||
|
||||
Signed-off-by: Jerry James <loganjerry@gmail.com>
|
||||
---
|
||||
libmsi/string.c | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/libmsi/string.c b/libmsi/string.c
|
||||
index 988d6eb..0b20c0b 100644
|
||||
--- a/libmsi/string.c
|
||||
+++ b/libmsi/string.c
|
||||
@@ -495,14 +495,14 @@ string_table *msi_load_string_table( GsfInfile *stg, unsigned *bytes_per_strref
|
||||
if( r != LIBMSI_RESULT_SUCCESS)
|
||||
goto end;
|
||||
|
||||
- if ( (poolsize > 4) && (GUINT_FROM_LE(pool[1]) & 0x8000) )
|
||||
+ if ( (poolsize > 4) && (GUINT16_FROM_LE(pool[1]) & 0x8000) )
|
||||
*bytes_per_strref = LONG_STR_BYTES;
|
||||
else
|
||||
*bytes_per_strref = sizeof(uint16_t);
|
||||
|
||||
count = poolsize/4;
|
||||
if( poolsize > 4 )
|
||||
- codepage = GUINT_FROM_LE(pool[0]) | ( (GUINT_FROM_LE(pool[1]) & ~0x8000) << 16 );
|
||||
+ codepage = GUINT16_FROM_LE(pool[0]) | ( (GUINT16_FROM_LE(pool[1]) & ~0x8000) << 16 );
|
||||
else
|
||||
codepage = CP_ACP;
|
||||
|
||||
@@ -516,10 +516,10 @@ string_table *msi_load_string_table( GsfInfile *stg, unsigned *bytes_per_strref
|
||||
while ( i<count )
|
||||
{
|
||||
/* the string reference count is always the second word */
|
||||
- refs = GUINT_FROM_LE(pool[i*2+1]);
|
||||
+ refs = GUINT16_FROM_LE(pool[i*2+1]);
|
||||
|
||||
/* empty entries have two zeros, still have a string id */
|
||||
- if (GUINT_FROM_LE(pool[i*2]) == 0 && refs == 0)
|
||||
+ if (GUINT16_FROM_LE(pool[i*2]) == 0 && refs == 0)
|
||||
{
|
||||
i++;
|
||||
n++;
|
||||
@@ -531,14 +531,14 @@ string_table *msi_load_string_table( GsfInfile *stg, unsigned *bytes_per_strref
|
||||
* and the high word of the length is inserted in the null string's
|
||||
* reference count field.
|
||||
*/
|
||||
- if (GUINT_FROM_LE(pool[i*2]) == 0)
|
||||
+ if (GUINT16_FROM_LE(pool[i*2]) == 0)
|
||||
{
|
||||
- len = (GUINT_FROM_LE(pool[i*2+3]) << 16) + GUINT_FROM_LE(pool[i*2+2]);
|
||||
+ len = (GUINT16_FROM_LE(pool[i*2+3]) << 16) + GUINT16_FROM_LE(pool[i*2+2]);
|
||||
i += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
- len = GUINT_FROM_LE(pool[i*2]);
|
||||
+ len = GUINT16_FROM_LE(pool[i*2]);
|
||||
i += 1;
|
||||
}
|
||||
|
||||
--
|
||||
2.41.0
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
Name: msitools
|
||||
Version: 0.102
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Windows Installer tools
|
||||
|
||||
License: GPL-2.0-or-later
|
||||
@ -20,6 +20,8 @@ URL: http://ftp.gnome.org/pub/GNOME/sources/%{name}
|
||||
Source0: http://ftp.gnome.org/pub/GNOME/sources/%{name}/%{version}/%{name}-%{version}%{?_version_suffix}.tar.xz
|
||||
# https://gitlab.gnome.org/GNOME/msitools/-/issues/55
|
||||
Patch0: 0001-Update-data-wixl.patch
|
||||
# https://gitlab.gnome.org/GNOME/msitools/-/merge_requests/66
|
||||
Patch1: 0002-Change-GUINT_FROM_LE-to-GUINT16_FROM_LE.patch
|
||||
|
||||
Requires: libgsf >= 1.14.24-2
|
||||
|
||||
@ -206,9 +208,6 @@ BuildRequires: mingw64-wavpack
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1924216
|
||||
ExcludeArch: s390x
|
||||
|
||||
%description
|
||||
msitools is a collection of utilities to inspect and create Windows
|
||||
Installer files. It is useful in a cross-compilation environment such
|
||||
@ -277,6 +276,9 @@ The libmsi1-devel package includes the header files for libmsi.
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Sep 14 2023 Jerry James <loganjerry@gmail.com> - 0.102-3
|
||||
- Fix build on s390x
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.102-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user