From: "Virgil Dupras" <vdupras@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/files/, app-text/mupdf/
Date: Fri, 21 Dec 2018 01:11:45 +0000 (UTC) [thread overview]
Message-ID: <1545354618.a1b87a4250380f9fbc024147fa32eb679bd76848.vdupras@gentoo> (raw)
commit: a1b87a4250380f9fbc024147fa32eb679bd76848
Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 21 01:10:18 2018 +0000
Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
CommitDate: Fri Dec 21 01:10:18 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1b87a42
app-text/mupdf: fix build errors on big endian arches
Closes: https://bugs.gentoo.org/672998
Signed-off-by: Virgil Dupras <vdupras <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
.../mupdf/files/mupdf-1.14-fix-big-endian.patch | 125 +++++++++++++++++++++
app-text/mupdf/mupdf-1.14.0-r2.ebuild | 2 +
2 files changed, 127 insertions(+)
diff --git a/app-text/mupdf/files/mupdf-1.14-fix-big-endian.patch b/app-text/mupdf/files/mupdf-1.14-fix-big-endian.patch
new file mode 100644
index 00000000000..dc472153ca6
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.14-fix-big-endian.patch
@@ -0,0 +1,125 @@
+vdupras note: exact same patch as in
+https://bugs.ghostscript.com/show_bug.cgi?id=699395 except for tweaked
+diff paths.
+From 5fb79e6ccb805b3d94c8bb8eb0990d9944ae7602 Mon Sep 17 00:00:00 2001
+Message-Id: <5fb79e6ccb805b3d94c8bb8eb0990d9944ae7602.1528041417.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>
+---
+ src/cmsmd5.c | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/src/cmsmd5.c b/src/cmsmd5.c
+index 4b8f7f9..dd0925a 100644
+--- a/thirdparty/lcms2/src/cmsmd5.c
++++ b/thirdparty/lcms2/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
+
+
+@@ -172,7 +172,7 @@ cmsHANDLE MD5alloc(cmsContext ContextID)
+
+
+ static
+-void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
++void MD5add(cmsContext ContextID, cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
+ {
+ _cmsMD5* ctx = (_cmsMD5*) Handle;
+ cmsUInt32Number t;
+@@ -196,7 +196,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
+ }
+
+ memmove(p, buf, t);
+- byteReverse(ctx->in, 16);
++ byteReverse(ContextID, ctx->in, 16);
+
+ MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
+ buf += t;
+@@ -205,7 +205,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
+
+ while (len >= 64) {
+ memmove(ctx->in, buf, 64);
+- byteReverse(ctx->in, 16);
++ byteReverse(ContextID, ctx->in, 16);
+ MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
+ buf += 64;
+ len -= 64;
+@@ -216,7 +216,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
+
+ // Destroy the object and return the checksum
+ static
+-void MD5finish(cmsProfileID* ProfileID, cmsHANDLE Handle)
++void MD5finish(cmsContext ContextID, cmsProfileID* ProfileID, cmsHANDLE Handle)
+ {
+ _cmsMD5* ctx = (_cmsMD5*) Handle;
+ cmsUInt32Number count;
+@@ -232,21 +232,21 @@ void MD5finish(cmsProfileID* ProfileID, cmsHANDLE Handle)
+ if (count < 8) {
+
+ memset(p, 0, count);
+- byteReverse(ctx->in, 16);
++ byteReverse(ContextID, ctx->in, 16);
+ MD5_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];
+
+ MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
+
+- byteReverse((cmsUInt8Number *) ctx->buf, 4);
++ byteReverse(ContextID, (cmsUInt8Number *) ctx->buf, 4);
+ memmove(ProfileID ->ID8, ctx->buf, 16);
+
+ _cmsFree(ctx ->ContextID, ctx);
+@@ -291,7 +291,7 @@ cmsBool CMSEXPORT cmsMD5computeID(cmsContext ContextID, cmsHPROFILE hProfile)
+ if (MD5 == NULL) goto Error;
+
+ // Add all bytes
+- MD5add(MD5, Mem, BytesNeeded);
++ MD5add(ContextID,MD5, Mem, BytesNeeded);
+
+ // Temp storage is no longer needed
+ _cmsFree(ContextID, Mem);
+@@ -300,7 +300,7 @@ cmsBool CMSEXPORT cmsMD5computeID(cmsContext ContextID, cmsHPROFILE hProfile)
+ memmove(Icc, &Keep, sizeof(_cmsICCPROFILE));
+
+ // And store the ID
+- MD5finish(&Icc ->ProfileID, MD5);
++ MD5finish(ContextID, &Icc ->ProfileID, MD5);
+ return TRUE;
+
+ Error:
+--
+2.18.0.rc0.294.g786209a621
+
diff --git a/app-text/mupdf/mupdf-1.14.0-r2.ebuild b/app-text/mupdf/mupdf-1.14.0-r2.ebuild
index 74cadb6f860..d6f2331ad66 100644
--- a/app-text/mupdf/mupdf-1.14.0-r2.ebuild
+++ b/app-text/mupdf/mupdf-1.14.0-r2.ebuild
@@ -45,6 +45,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.10a-add-desktop-pc-xpm-files.patch
# See bug #662352
"${FILESDIR}"/${PN}-1.14-openssl-curl-x11.patch
+ # bug #672998
+ "${FILESDIR}"/${PN}-1.14-fix-big-endian.patch
)
src_prepare() {
next reply other threads:[~2018-12-21 1:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-21 1:11 Virgil Dupras [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-08 13:20 [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/files/, app-text/mupdf/ Petr Vaněk
2023-10-15 8:48 Viorel Munteanu
2023-10-15 8:48 Viorel Munteanu
2022-12-04 14:50 Pacho Ramos
2022-06-30 12:45 Florian Schmaus
2021-02-24 16:22 Sam James
2020-10-13 23:21 Sam James
2019-11-26 14:25 Jory Pratt
2019-11-22 9:47 Mikle Kolyada
2018-10-15 14:43 Virgil Dupras
2018-10-07 17:43 Virgil Dupras
2018-08-18 21:01 Virgil Dupras
2018-07-25 1:33 Virgil Dupras
2017-06-22 23:30 Michael Weber
2017-05-13 22:46 Michael Weber
2017-05-08 13:24 Michael Weber
2017-04-28 9:33 Michael Weber
2017-02-05 17:25 Michael Weber
2016-01-08 23:48 Michael Weber
2015-08-11 10:29 Michael Weber
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=1545354618.a1b87a4250380f9fbc024147fa32eb679bd76848.vdupras@gentoo \
--to=vdupras@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