From a63e1d98ed894678d07d8288f849a05a7a1cd82b Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Sep 04 2023 16:42:18 +0000 Subject: rebase to 1.23.2 (rhbz#2233551) - Support CropBox, TrimBox, BleedBox, and ArtBox in PDF tools and viewers. - PhotoShop PSD image support. - mutool poster: Option to split in RTL direction. - mutool run: changed many methods to match Java and new WASM library. --- diff --git a/.gitignore b/.gitignore index 10492bb..43b54df 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ /mupdf-1.22.0-source.tar.gz /mupdf-1.22.1-source.tar.gz /mupdf-1.22.2-source.tar.gz +/mupdf-1.23.2-source.tar.gz diff --git a/mupdf-1.21.1-fix-png_write_band.patch b/mupdf-1.21.1-fix-png_write_band.patch deleted file mode 100644 index 65f49b5..0000000 --- a/mupdf-1.21.1-fix-png_write_band.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Mamoru TASAKA -Date: Sun, 18 Dec 2022 00:22:04 +0000 (+0900) -Subject: Bug 706227: png_write_band: initialize stream before calling deflateBound -X-Git-Url: http://git.ghostscript.com/?p=mupdf.git;a=commitdiff_plain;h=a76b4ed0d3a2c7e52bba2d6c10b44d11d5ade2fe - -Bug 706227: png_write_band: initialize stream before calling deflateBound - -zlib deflateBound manual says when calling this function, -stream should have been initialized via a call to deflateInit_() -or deflateInit2_(), so change so. - -Note that without this fix, "mutool draw -F png" segfaults on s390x, -perhaps on big endian, uninitialized bytes of a value (which is -not wholly initialized) is read, on the other hand, on little endian -initialized bytes of the value is read, so it happens not to cause -segfault. - -Fixes https://bugs.ghostscript.com/show_bug.cgi?id=706227 ---- - -diff --git a/source/fitz/output-png.c b/source/fitz/output-png.c -index 17279f913..979c75eeb 100644 ---- a/source/fitz/output-png.c -+++ b/source/fitz/output-png.c -@@ -236,6 +236,12 @@ png_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_st - if (usize > SIZE_MAX / band_height) - fz_throw(ctx, FZ_ERROR_GENERIC, "png data too large."); - usize *= band_height; -+ writer->stream.opaque = ctx; -+ writer->stream.zalloc = fz_zlib_alloc; -+ writer->stream.zfree = fz_zlib_free; -+ err = deflateInit(&writer->stream, Z_DEFAULT_COMPRESSION); -+ if (err != Z_OK) -+ fz_throw(ctx, FZ_ERROR_GENERIC, "compression error %d", err); - writer->usize = usize; - /* Now figure out how large a buffer we need to compress into. - * deflateBound always expands a bit, and it's limited by being -@@ -245,12 +251,6 @@ png_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_st - writer->csize = UINT32_MAX; - writer->udata = Memento_label(fz_malloc(ctx, writer->usize), "png_write_udata"); - writer->cdata = Memento_label(fz_malloc(ctx, writer->csize), "png_write_cdata"); -- writer->stream.opaque = ctx; -- writer->stream.zalloc = fz_zlib_alloc; -- writer->stream.zfree = fz_zlib_free; -- err = deflateInit(&writer->stream, Z_DEFAULT_COMPRESSION); -- if (err != Z_OK) -- fz_throw(ctx, FZ_ERROR_GENERIC, "compression error %d", err); - } - - dp = writer->udata; diff --git a/mupdf.spec b/mupdf.spec index 5ac6d79..e774f0f 100644 --- a/mupdf.spec +++ b/mupdf.spec @@ -4,7 +4,7 @@ %global jbig2dec_version 0.19 Name: mupdf -Version: 1.22.2 +Version: 1.23.2 # upstream prerelease versions tags need to be translated to Fedorian %global upversion %{version} Release: %autorelease @@ -33,7 +33,7 @@ Provides: bundled(freeglut-devel) = 3.0.0^11.g13ae6aa # version so bundling them is the safer choice. Provides: bundled(mujs-devel) = 1.3.3 # muPDF builds only against in-tree extract which is versioned along with ghostpdl. -Provides: bundled(extract) = 10.01.0 +Provides: bundled(extract) = 10.01.2 %description MuPDF is a lightweight PDF viewer and toolkit written in portable C. diff --git a/sources b/sources index 9e3633f..3209f95 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mupdf-1.22.2-source.tar.gz) = 1f2e1c8caab49fcc1fe9d3f2bc994d36c77166a8f424311fb8dd8cfdc18b279d85f2cec52966cdce84a0488465b50eadf9f26f22dda06cb9de6127096458b3b9 +SHA512 (mupdf-1.23.2-source.tar.gz) = 99a159f215d3c1a3096b4451669bfc2c03eed8d0ab9ae7641336138a0af96bfc51fc2c485ff2f366f842ed212decb569b7db42f71740c4aaec6a202431a9896b