remove obsolete patch

The patch was necessary for earlier versions. When the culprit in lcms
was partially reverted this triggered me rewriting the patch instead of
dropping it: the amended parameters in that call-chain were not needed
any more since commit c9f2256 in lcms2mt. So drop the patch.
epel9
Michael J Gruber 4 years ago
parent 6af4815afa
commit 44f3b8465a

@ -1,118 +0,0 @@
From 070c4d03de2a75f387aab0107314b503834e60fa Mon Sep 17 00:00:00 2001
Message-Id: <070c4d03de2a75f387aab0107314b503834e60fa.1601760275.git.mjg@fedoraproject.org>
From: Michael J Gruber <mjg@fedoraproject.org>
Date: Sun, 3 Jun 2018 17:55:46 +0200
Subject: [PATCH] fix build on big endian
0dc1153 ("Spread of context into all procedures and removal from
structures", 2017-04-26) missed a few spots that are relevant on big
endian only.
Add the missing ContextIDs in the call chain so that the build succeeds
again.
Signed-off-by: Michael J Gruber <mjg@fedoraproject.org>
---
include/lcms2mt_plugin.h | 2 +-
src/cmsmd5.c | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/include/lcms2mt_plugin.h b/include/lcms2mt_plugin.h
index fad1724..f480858 100644
--- a/include/lcms2mt_plugin.h
+++ b/include/lcms2mt_plugin.h
@@ -97,7 +97,7 @@ CMSAPI void CMSEXPORT _cmsMAT3eval(cmsContext ContextID, cmsVEC3*
// MD5 low level -------------------------------------------------------------------------------------
CMSAPI cmsHANDLE CMSEXPORT cmsMD5alloc(cmsContext ContextID);
-CMSAPI void CMSEXPORT cmsMD5add(cmsHANDLE Handle, const cmsUInt8Number* buf, cmsUInt32Number len);
+CMSAPI void CMSEXPORT cmsMD5add(cmsContext ContextID, cmsHANDLE Handle, const cmsUInt8Number* buf, cmsUInt32Number len);
CMSAPI void CMSEXPORT cmsMD5finish(cmsContext ContextID, cmsProfileID* ProfileID, cmsHANDLE Handle);
// Error logging -------------------------------------------------------------------------------------
diff --git a/src/cmsmd5.c b/src/cmsmd5.c
index 6104304..11f65d1 100644
--- a/src/cmsmd5.c
+++ b/src/cmsmd5.c
@@ -29,7 +29,7 @@
#ifdef CMS_USE_BIG_ENDIAN
static
-void byteReverse(cmsUInt8Number * buf, cmsUInt32Number longs)
+void byteReverse(cmsContext ContextID, cmsUInt8Number * buf, cmsUInt32Number longs)
{
do {
@@ -42,7 +42,7 @@ void byteReverse(cmsUInt8Number * buf, cmsUInt32Number longs)
}
#else
-#define byteReverse(buf, len)
+#define byteReverse(ContextID, buf, len)
#endif
@@ -166,7 +166,7 @@ cmsHANDLE CMSEXPORT cmsMD5alloc(cmsContext ContextID)
return (cmsHANDLE) ctx;
}
-void CMSEXPORT cmsMD5add(cmsHANDLE Handle, const cmsUInt8Number* buf, cmsUInt32Number len)
+void CMSEXPORT cmsMD5add(cmsContext ContextID, cmsHANDLE Handle, const cmsUInt8Number* buf, cmsUInt32Number len)
{
_cmsMD5* ctx = (_cmsMD5*) Handle;
cmsUInt32Number t;
@@ -190,7 +190,7 @@ void CMSEXPORT cmsMD5add(cmsHANDLE Handle, const cmsUInt8Number* buf, cmsUInt32N
}
memmove(p, buf, t);
- byteReverse(ctx->in, 16);
+ byteReverse(ContextID, ctx->in, 16);
cmsMD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
buf += t;
@@ -199,7 +199,7 @@ void CMSEXPORT cmsMD5add(cmsHANDLE Handle, const cmsUInt8Number* buf, cmsUInt32N
while (len >= 64) {
memmove(ctx->in, buf, 64);
- byteReverse(ctx->in, 16);
+ byteReverse(ContextID, ctx->in, 16);
cmsMD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
buf += 64;
len -= 64;
@@ -225,21 +225,21 @@ void CMSEXPORT cmsMD5finish(cmsContext ContextID, cmsProfileID* ProfileID, cmsH
if (count < 8) {
memset(p, 0, count);
- byteReverse(ctx->in, 16);
+ byteReverse(ContextID, ctx->in, 16);
cmsMD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
memset(ctx->in, 0, 56);
} else {
memset(p, 0, count - 8);
}
- byteReverse(ctx->in, 14);
+ byteReverse(ContextID, ctx->in, 14);
((cmsUInt32Number *) ctx->in)[14] = ctx->bits[0];
((cmsUInt32Number *) ctx->in)[15] = ctx->bits[1];
cmsMD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
- byteReverse((cmsUInt8Number *) ctx->buf, 4);
+ byteReverse(ContextID, (cmsUInt8Number *) ctx->buf, 4);
memmove(ProfileID ->ID8, ctx->buf, 16);
_cmsFree(ContextID, ctx);
@@ -284,7 +284,7 @@ cmsBool CMSEXPORT cmsMD5computeID(cmsContext ContextID, cmsHPROFILE hProfile)
if (MD5 == NULL) goto Error;
// Add all bytes
- cmsMD5add(MD5, Mem, BytesNeeded);
+ cmsMD5add(ContextID, MD5, Mem, BytesNeeded);
// Temp storage is no longer needed
_cmsFree(ContextID, Mem);
--
2.28.0.945.gedc4c61efd

@ -5,7 +5,7 @@
Name: mupdf
Version: 1.18.0
Release: 3%{?dist}
Release: 4%{?dist}
Summary: A lightweight PDF viewer and toolkit
License: AGPLv3+
URL: http://mupdf.com/
@ -30,7 +30,6 @@ Provides: bundled(freeglut-devel) = 3.0.0
# muPDF needs the muJS sources for the build even if we build against the system
# version so bundling them is the safer choice.
Provides: bundled(mujs-devel) = 1.0.9
Patch0: 0001-fix-build-on-big-endian.patch
Patch1: 0001-support-PyMuPDF.patch
%description
@ -63,7 +62,6 @@ for d in $(ls thirdparty | grep -v -e freeglut -e lcms2 -e mujs)
do
rm -rf thirdparty/$d
done
%patch0 -p1 -d thirdparty/lcms2
%patch1 -p1
echo > user.make "\
USE_SYSTEM_FREETYPE := yes
@ -112,6 +110,10 @@ cd %{buildroot}/%{_bindir} && ln -s %{name}-x11 %{name}
%{_libdir}/lib%{name}*.a
%changelog
* Tue Jan 26 2021 Michael J Gruber <mjg@fedoraproject.org> - 1.18.0-4
- (original date: Thu Oct 29 2020)
- remove obsolete patch
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save