diff options
Diffstat (limited to 'app-text')
-rw-r--r-- | app-text/Manifest.gz | bin | 48368 -> 48375 bytes | |||
-rw-r--r-- | app-text/mupdf/Manifest | 3 | ||||
-rw-r--r-- | app-text/mupdf/files/mupdf-1.20.0-lcms2.patch | 69 | ||||
-rw-r--r-- | app-text/mupdf/mupdf-1.20.0.ebuild | 1 |
4 files changed, 72 insertions, 1 deletions
diff --git a/app-text/Manifest.gz b/app-text/Manifest.gz Binary files differindex ade72edc98a3..c06832671c34 100644 --- a/app-text/Manifest.gz +++ b/app-text/Manifest.gz diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest index 868eb2e77260..bad0dada30ef 100644 --- a/app-text/mupdf/Manifest +++ b/app-text/mupdf/Manifest @@ -10,6 +10,7 @@ AUX mupdf-1.18.0-fix-oob-in-pixmap.c 1123 BLAKE2B d49194b540b489ad9d3a4b5057bbe6 AUX mupdf-1.19.0-Makefile.patch 1043 BLAKE2B 7f449713700d57c0bf072661babcb5122d09be82a0b89520999618e22c7b44ae950f0e9fd653330d34078229da8bd36f8e5fd273c5110cbeaeb47347b3e4f666 SHA512 ddbc11d3bf7a1480effd57c9587b85d735c97c5215dbf9dc66bac535356f9cbc5ecc0dd1003c367d6e60d969383afdd9014a66e8fb51384632be407fe01694d4 AUX mupdf-1.19.0-cross-fixes.patch 5740 BLAKE2B dcc38e628e1c0ddde9647d06ea8c58124cb7a1fe771e88465c0516ff3d1b50b820d2110107428bd762abe85905bc7b6cc283067ece88471442e76fab2fcaf2a9 SHA512 db4093d330c8ce9c9d1bfee5b708dd423e04eb6f2d5c87f8e5779d28bdd320f15b6847a308e87d183c9b38c5396c0518b70325ea09c9e8f4a733750e4cf5ca13 AUX mupdf-1.19.0-darwin.patch 1056 BLAKE2B ae532c2d68842c3a1bb424c707a51a5ed56a72e7557e89b3830ac55bc713982065d1ec7055b84b91589c8b98a690d037c0fb6c90480fd89989e0f90cc49f9b97 SHA512 24cb6885c174bbfbe5ddc2e8f9a15c5154aa5699a19b5931d60ebb761a7587d717dbb65fba45070f963c0c3f432f8f58c00537d10b050546173a48f5c729a7c4 +AUX mupdf-1.20.0-lcms2.patch 2512 BLAKE2B b641519f069c43ef2e9efdf0e18418e663e3fa39d1fb2a0a4b759f8af0412e3a63f212961d80430de86a8ea3d8228ece07e2a04cbe08ccbe330afcbad18e3527 SHA512 d25a843286f9376f17cc73dd974835eaa7be7a0a7b26fab338ae5b3cf54588f476538c73e3053edc2367bd5856eb1af0ebbffce426f7da287784dcb0ee3fc684 DIST mupdf-1.18.0-source.tar.xz 53621544 BLAKE2B d0057f4240bd4f6b4b6d9381ae1c3871c56b97604d5c6ea6438a8bde72d4696c10a9f0e8e2ed8f43d63a04bb1d973bade8a708327c00b0d0c6802b28af697a55 SHA512 7551f18b9bac6e2dc1cf073741cbc975ce3a16dc7e37c9d5a58254c67bf2c07bb36185d6585e435d4126f3ae351f67d7432d19a986c9b47b15105ca43db0edb8 DIST mupdf-1.19.0-source.tar.xz 64077324 BLAKE2B 4c30cfc004b4f354ae349e5460327775a4dbdd689e561888c156e9e69e22b45ea1f260dfed8d2d8c017fe65a1e83cabc8ff29dad8de47a2c541f9e335bf11285 SHA512 421e8e49f83cf00bfb2c86b5425939056fe866a048cf18e4c8f5764cdee9829974eea655c944d0f3f5a9407347cceaef34030f4079aa399e798da3ff849230e7 DIST mupdf-1.19.1-source.tar.xz 64884172 BLAKE2B a0dc3783c70cee1b7eb48d1658eb48186e35a42513aa9e98f7155bb82ed771ed0c5d5032013d09d93cdca4f49deda65553fe0e1af7645893722dafa855b2c958 SHA512 d6bc5b6adb6a418de50021864f4b3a75da653fa534eeedbfe9875cb202efeb13efdec66b4d108ca8fa6b0dc76733468b214e5fdf331bebc35fc6f722203fa3f7 @@ -17,5 +18,5 @@ DIST mupdf-1.20.0-source.tar.gz 88455853 BLAKE2B 686d8b02972fc6cb7fa4541e4f0561c EBUILD mupdf-1.18.0-r4.ebuild 4358 BLAKE2B 67d3b045314556eb3e81a668015e36115e7729436a91bfebededdf316bce062bac229c64b63f0aebae7553b8a5595fa0d4db53bb7a7a9b452a087967cd04547c SHA512 90dd0ae5d0376dafbce8b19d711d92ab9debceb467578f0e529881b219e8b3166fe5ec1f0b535036300a1e4a60d9969ba21450ca54b6f7e18f8631b035b8a4b8 EBUILD mupdf-1.19.0.ebuild 4465 BLAKE2B 28283005cf1c4c688cf24544bedc20683d2e043221c74a3922e3f86b6affddbf8a0e62c8d79f8805bc5c5a508e999a57c4d212f6ec3f4b88036b512ea0251017 SHA512 ba83c50f6bca1cfcaabc7410f4fcfc842cdf8e4381ed7763af895cac78861f0f585069fd8b92d50bdc1e22baf30b56533a00b4ebfd8d0cb7515450c5f19eaf5b EBUILD mupdf-1.19.1.ebuild 4490 BLAKE2B cf556d6ba654118ccd0316fb75f2f970cb96990f254bf3c51aee44405ad2bab8bd3f5245f5d04fd4d713d8befd8a84b62632a757ae69396e5291ac6c8cb6b57b SHA512 b1ee92e6e10373980739bed7bffb1bd658d9b3830f82fcc2b3153c5296828a50b487164e686a69de31df6ea25aa6e0925b5ff5c997ec91a6cef1851a7bff76af -EBUILD mupdf-1.20.0.ebuild 4496 BLAKE2B 0b99cd132d8a63bc8dae2f63a7135e2251ce3478ea85c075014133713ad486f7c59e71d1a394635ec09ba2fec24abfdbc5539c895028dfcaf905e677a65c6859 SHA512 5cd0f2a6b4326b15318f3c183b5724980ca58a2207c6e382ffa4b2bef959cca42c9e4a39fea9cf69d59db266cec33a1a9e937ba4c5fe2ab83707c10f96e974cd +EBUILD mupdf-1.20.0.ebuild 4528 BLAKE2B 921ba1f37345c45adafdefa9b3a685dea70c46ef5c930e0dc4a76109c8a191f2d52e81a219c9fef40a5a2daacf96d3d95163142a0ac6e29955121827a066c5a2 SHA512 4908f9aadf25a2f6aa71a91876b768cc9c6492591e770a434708f731c9247e1e2c58a79c28425680b357aa36cc94e594f2a631ce9dee64cf9d39e42d7243640a MISC metadata.xml 405 BLAKE2B 8b71db6f16bfb481e524a331eac615661b267d2d2fddde3aa6c9244b75026eacada167e2ed2ad6e7611bad234b53c0b073063925ae6745832585771d5342c913 SHA512 23f707e5ed833c5901d482e0d9cedbae751434311d8c67e7b300b452faabd958eb0c12a5b1c48a3c6d4773891cf3c7426d60a85eecd4b3ceb3358f68f4c8ad87 diff --git a/app-text/mupdf/files/mupdf-1.20.0-lcms2.patch b/app-text/mupdf/files/mupdf-1.20.0-lcms2.patch new file mode 100644 index 000000000000..a5cb30e3b74c --- /dev/null +++ b/app-text/mupdf/files/mupdf-1.20.0-lcms2.patch @@ -0,0 +1,69 @@ +From d98de0bb0b627772625c1acf050ba0dd4b5ac9df Mon Sep 17 00:00:00 2001 +From: David Seifert <soap@gentoo.org> +Date: Tue, 5 Jul 2022 11:35:28 +0200 +Subject: [PATCH] Perform type punning via union without undefined behavior + +* The previous code from c3d7f491e2daebda2413fb3d2935c51df1c50ac7 + still contains undefined behavior, since it just creates + temporary pointer variables. +--- + src/cmsplugin.c | 31 +++++++++++++++---------------- + 1 file changed, 15 insertions(+), 16 deletions(-) + +This patch slightly differs from the upstream commit, because +the lcms2 version used in mupdf is slightly behind the upstream +version. + +See: https://github.com/mm2/Little-CMS/commit/d98de0bb0b627772625c1acf050ba0dd4b5ac9df.patch + +diff --git a/src/cmsplugin.c b/src/cmsplugin.c +index 556fbc28..b34e3aab 100644 +--- a/thirdparty/lcms2/src/cmsplugin.c ++++ b/thirdparty/lcms2/src/cmsplugin.c +@@ -167,17 +167,20 @@ cmsBool CMSEXPORT _cmsReadUInt32Number(cmsContext ContextID, cmsIOHANDLER* io, + + cmsBool CMSEXPORT _cmsReadFloat32Number(cmsContext ContextID, cmsIOHANDLER* io, cmsFloat32Number* n) + { +- cmsUInt32Number tmp; ++ union typeConverter { ++ cmsUInt32Number integer; ++ cmsFloat32Number floating_point; ++ } tmp; + + _cmsAssert(io != NULL); + +- if (io->Read(ContextID, io, &tmp, sizeof(cmsUInt32Number), 1) != 1) ++ if (io->Read(ContextID, io, &tmp.integer, sizeof(cmsUInt32Number), 1) != 1) + return FALSE; + + if (n != NULL) { + +- tmp = _cmsAdjustEndianess32(tmp); +- *n = *(cmsFloat32Number*)(void*)&tmp; ++ tmp.integer = _cmsAdjustEndianess32(tmp.integer); ++ *n = tmp.floating_point; + + // Safeguard which covers against absurd values + if (*n > 1E+20 || *n < -1E+20) return FALSE; +@@ -304,13 +307,14 @@ cmsBool CMSEXPORT _cmsWriteUInt32Number(cmsContext ContextID, cmsIOHANDLER* io, + + cmsBool CMSEXPORT _cmsWriteFloat32Number(cmsContext ContextID, cmsIOHANDLER* io, cmsFloat32Number n) + { +- cmsUInt32Number tmp; +- +- _cmsAssert(io != NULL); +- +- tmp = *(cmsUInt32Number*) (void*) &n; +- tmp = _cmsAdjustEndianess32(tmp); +- if (io -> Write(ContextID, io, sizeof(cmsUInt32Number), &tmp) != 1) ++ union typeConverter { ++ cmsUInt32Number integer; ++ cmsFloat32Number floating_point; ++ } tmp; ++ ++ tmp.floating_point = n; ++ tmp.integer = _cmsAdjustEndianess32(tmp.integer); ++ if (io -> Write(ContextID, io, sizeof(cmsUInt32Number), &tmp.integer) != 1) + return FALSE; + + return TRUE; diff --git a/app-text/mupdf/mupdf-1.20.0.ebuild b/app-text/mupdf/mupdf-1.20.0.ebuild index 3d7f8f3e2946..216bbfaa79e7 100644 --- a/app-text/mupdf/mupdf-1.20.0.ebuild +++ b/app-text/mupdf/mupdf-1.20.0.ebuild @@ -51,6 +51,7 @@ PATCHES=( "${FILESDIR}"/${PN}-1.15-openssl-x11.patch # General cross fixes from Debian (refreshed) "${FILESDIR}"/${PN}-1.19.0-cross-fixes.patch + "${FILESDIR}"/${P}-lcms2.patch ) src_prepare() { |