pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/print/mupdf
Module Name: pkgsrc
Committed By: yhardy
Date: Tue Mar 3 21:49:01 UTC 2026
Modified Files:
pkgsrc/print/mupdf: Makefile PLIST distinfo
pkgsrc/print/mupdf/patches: patch-Makelists patch-Makerules
patch-source_fitz_load-jpx.c
patch-source_helpers_pkcs7_pkcs7-openssl.c
Added Files:
pkgsrc/print/mupdf/patches: patch-source_fitz_stext-search.c
Log Message:
print/mupdf: update to mupdf-1.27.2
Patches updated:
patches/patch-Makelists:
"Fix compiling with a pre-c++20 compiler" has been addressed
by upstream in a similar way, by testing whether USE_ZXINGCPP
is set.
patches/patch-source_fitz_stext-search.c:
Since we don't use the thirdparty libraries from MuPDF, MuPDF
needs include/mujs/regexp.h from lang/mujs. Please see the
post-install target in lang/mujs/Makefile.
List of changes in MuPDF 1.27
New and updated documentation! Build local HTML and Markdown
versions from source with sphinx.
New (experimental) search API that supports matching results
across pages and regular expressions.
Build system:
Optimize thirdparty dependency submodules to reduce size of git
clone and release tarballs.
Allow conditional compilation for html, xps, svg, extract modules.
Visual Studio project added an arm64 configuration.
WASM bindings folded back into main git repository.
Makefile added new "install-tools" target.
General:
More robust document type recognition.
Many new classes and functions to both WASM and mutool run
Javascript bindings.
Changes to mutool run to bring it into sync with WASM library
-- if you stick to ES5 syntax, scripts can run in both
environments.
Improve dehyphenation behavior in structured text extraction.
Several optimizations when encountering JPEG2000 images in
PDF files.
Fixed many bugs with OCG handling (more improvements to come in
a future release).
HTML and EPUB:
Hyphenation!
Set HTML lang attribute and CSS style hyphens:auto to enable.
CSS non-static positioning:
position: absolute and relative
inset/top/right/bottom/left
HTML tables:
colgroup and col
rowspan and colspan
width, height, valign, and border-collapse
Legacy HTML attributes:
width, height, valign, align, bgcolor, border, hidden
CSS border-style: double, dotted, dashed, outset, inset, ridge,
groove
CSS tree-structural pseudo-selectors (:root, :empty,
:first-child, :nth-child, etc)
CSS :link pseudo-class
Improved BiDi support with direction:rtl CSS property and
dir=rtl HTML attribute
Recognize all CSS named colors!
Improved fallback font detection.
EPUB 3 table of contents.
PDF Forms & Annotations:
Respect AcroForm/NeedAppearances flag -- widgets may look
different if this flag is set!
Changed Text (aka Note) annotation sizing and positioning to
conform better with the PDF reference.
Respect NoZoom and NoRotate flags.
Fixed bug with some checkboxes not toggling as they should.
Tools & Programs:
mutool:
Handle output to stdout more reliably in all tools.
mutool run:
allow import statements for mupdf and fs modules
script compatibility tweaks with node
process.argv
process.exit
mutool clean:
vectorize text (turn text objects into paths) with -v flag
mutool draw:
behavior tweaked to be more consistent across output formats
mutool poster:
improve behavior when pages have been rotated
mutool merge:
preserve external (only) links when merging documents
mutool extract:
extract embedded files and attachments
mutool grep:
new tool to search for text in documents
mupdf-gl:
confirm before opening potentially dangerous external links.
mupdf-x11:
refuse to open potentially dangerous external links.
API changes:
Use fz_quad in fz_warp_pixmap, fz_autowarp_pixmap, and fz_detect_document.
API news:
- special redaction mode PDF_TEXT_REMOVE_INVISIBLE to strip only
invisible text.
- pdf_check_document (PDFDocument.check in JS and Java) function
to scan the file for errors.
- pdf_set_page_tree_cache to allow faster first-page loads at the
cost of slower loading of all other pages.
- fz_stext_page_details -- stext can now represent text from
multiple pages.
To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 pkgsrc/print/mupdf/Makefile
cvs rdiff -u -r1.30 -r1.31 pkgsrc/print/mupdf/PLIST
cvs rdiff -u -r1.81 -r1.82 pkgsrc/print/mupdf/distinfo
cvs rdiff -u -r1.4 -r1.5 pkgsrc/print/mupdf/patches/patch-Makelists
cvs rdiff -u -r1.2 -r1.3 pkgsrc/print/mupdf/patches/patch-Makerules
cvs rdiff -u -r1.10 -r1.11 \
pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c
cvs rdiff -u -r0 -r1.1 \
pkgsrc/print/mupdf/patches/patch-source_fitz_stext-search.c
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/print/mupdf/patches/patch-source_helpers_pkcs7_pkcs7-openssl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/print/mupdf/Makefile
diff -u pkgsrc/print/mupdf/Makefile:1.138 pkgsrc/print/mupdf/Makefile:1.139
--- pkgsrc/print/mupdf/Makefile:1.138 Fri Feb 6 10:05:44 2026
+++ pkgsrc/print/mupdf/Makefile Tue Mar 3 21:49:01 2026
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.138 2026/02/06 10:05:44 wiz Exp $
+# $NetBSD: Makefile,v 1.139 2026/03/03 21:49:01 yhardy Exp $
-DISTNAME= mupdf-1.26.8-source
+DISTNAME= mupdf-1.27.2-source
PKGNAME= ${DISTNAME:S/-source//}
-PKGREVISION= 4
CATEGORIES= print
-MASTER_SITES= https://mupdf.com/downloads/archive/
+MASTER_SITES= https://casper.mupdf.com/downloads/archive/
MAINTAINER= leot%NetBSD.org@localhost
HOMEPAGE= https://mupdf.com/
@@ -62,6 +61,7 @@ SUBST_SED.indext= -e 's,index_t,mu_index
# files with proper colors.
post-extract:
${RUN}${RM} -fr \
+ ${WRKSRC}/thirdparty/brotli \
${WRKSRC}/thirdparty/curl \
${WRKSRC}/thirdparty/freeglut \
${WRKSRC}/thirdparty/freetype \
@@ -73,7 +73,9 @@ post-extract:
${WRKSRC}/thirdparty/mujs \
${WRKSRC}/thirdparty/openjpeg \
${WRKSRC}/thirdparty/tesseract \
- ${WRKSRC}/thirdparty/zlib
+ ${WRKSRC}/thirdparty/zint \
+ ${WRKSRC}/thirdparty/zlib \
+ ${WRKSRC}/thirdparty/zxing-cpp
post-build:
${RUN}${SED} -e "s,@PREFIX@,${PREFIX}," -e "s,@VERSION@,${PKGVERSION_NOREV}," \
@@ -90,6 +92,7 @@ post-install:
.endfor
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../archivers/brotli/buildlink3.mk"
BUILDLINK_API_DEPENDS.zlib+= zlib>=1.2.7
.include "../../devel/zlib/buildlink3.mk"
.include "../../fonts/harfbuzz/buildlink3.mk"
@@ -102,6 +105,7 @@ BUILDLINK_API_DEPENDS.zlib+= zlib>=1.2.7
#.include "../../graphics/lcms2/buildlink3.mk"
.include "../../graphics/openjpeg/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
+# XXX: mupdf needs mujs/regexp.h installed
.include "../../lang/mujs/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.include "../../www/gumbo-parser/buildlink3.mk"
Index: pkgsrc/print/mupdf/PLIST
diff -u pkgsrc/print/mupdf/PLIST:1.30 pkgsrc/print/mupdf/PLIST:1.31
--- pkgsrc/print/mupdf/PLIST:1.30 Fri Aug 29 09:54:49 2025
+++ pkgsrc/print/mupdf/PLIST Tue Mar 3 21:49:01 2026
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.30 2025/08/29 09:54:49 leot Exp $
+@comment $NetBSD: PLIST,v 1.31 2026/03/03 21:49:01 yhardy Exp $
bin/mupdf
${PLIST.opengl}bin/mupdf-gl
${PLIST.curl}bin/mupdf-x11-curl
@@ -30,6 +30,7 @@ include/mupdf/fitz/glyph.h
include/mupdf/fitz/hash.h
include/mupdf/fitz/heap-imp.h
include/mupdf/fitz/heap.h
+include/mupdf/fitz/hyphen.h
include/mupdf/fitz/image.h
include/mupdf/fitz/json.h
include/mupdf/fitz/link.h
@@ -112,6 +113,7 @@ share/doc/mupdf/examples/pdf-merge.js
share/doc/mupdf/examples/pdf-portfolio.js
share/doc/mupdf/examples/pdf-trace.js
share/doc/mupdf/examples/reconvert-cmyk.js
+share/doc/mupdf/examples/searchtest.c
share/doc/mupdf/examples/storytest.c
share/doc/mupdf/examples/storytest.js
share/doc/mupdf/examples/trace-device.js
Index: pkgsrc/print/mupdf/distinfo
diff -u pkgsrc/print/mupdf/distinfo:1.81 pkgsrc/print/mupdf/distinfo:1.82
--- pkgsrc/print/mupdf/distinfo:1.81 Thu Dec 18 17:45:58 2025
+++ pkgsrc/print/mupdf/distinfo Tue Mar 3 21:49:01 2026
@@ -1,15 +1,16 @@
-$NetBSD: distinfo,v 1.81 2025/12/18 17:45:58 nia Exp $
+$NetBSD: distinfo,v 1.82 2026/03/03 21:49:01 yhardy Exp $
-BLAKE2s (mupdf-1.26.8-source.tar.gz) = 29c0571122d93a77b615f969de6f18fb0dc6edc26b0999ec18ad29dac048484b
-SHA512 (mupdf-1.26.8-source.tar.gz) = 6a1eb21da1ba507bcab179e9616a6ceaa1385c92e860770696324c959209259e8a10812f2c87e59c8e3dd3470398eba6ab512a3651a1bc3cd7d35465bfdb8017
-Size (mupdf-1.26.8-source.tar.gz) = 64528449 bytes
+BLAKE2s (mupdf-1.27.2-source.tar.gz) = a27135ba9494534cb56657cf603e5d07116a46693727ae5d31fcb496acdaf165
+SHA512 (mupdf-1.27.2-source.tar.gz) = 68c92007aac775d22dca151a7ae2d4e77755dbc0c8a6faeec8048aa3537de4e1b5a98d999e090460298f294d7aed62e3aa144817d78655435d9498b159ccd0dc
+Size (mupdf-1.27.2-source.tar.gz) = 66968384 bytes
SHA1 (patch-Makefile) = 9f15d6b0c9a122993e71728adb8b77945c79152b
-SHA1 (patch-Makelists) = a59cbe0c2e39a22b95d6462c9ec9f825b12b0d61
-SHA1 (patch-Makerules) = 5caa3319b121201952b0562201cee7bf0f0ea55f
+SHA1 (patch-Makelists) = b271a1774474e0dffbaad59f207c8095892bc7f8
+SHA1 (patch-Makerules) = 02539dbd67ba6674e85bf1dcdefe228abc8ee679
SHA1 (patch-docs_man_mupdf.1) = c2a2c1ad283428168a714adb634aa50cdd6a4aba
SHA1 (patch-platform_gl_gl-app.h) = 1e915249010acd3ff1343f0607e785d06577fe78
SHA1 (patch-platform_x11_curl__stream.c) = ccabcd665359ae00b76230a4ced22f360a0989e5
SHA1 (patch-platform_x11_pdfapp.c) = e806f10b9c7dad2f6db2386c0b5509d5cf311f06
SHA1 (patch-source_fitz_crypt-sha2.c) = c6b113818b32cb4470e8549c00a16e0b2f364ede
-SHA1 (patch-source_fitz_load-jpx.c) = 8d7f58168c8429a82127b821387298341a1fcbfb
-SHA1 (patch-source_helpers_pkcs7_pkcs7-openssl.c) = f3e949de8bdfc55e2da402a5bc59b4baf04b0d55
+SHA1 (patch-source_fitz_load-jpx.c) = 237367451cf048950a99c6e2ea948298cad23e9e
+SHA1 (patch-source_fitz_stext-search.c) = c7115f748ddb9e3b12b432cee37cbde5dceec4d7
+SHA1 (patch-source_helpers_pkcs7_pkcs7-openssl.c) = e0fb32b2c82a5951ef5befd14ca88c47f075dd4e
Index: pkgsrc/print/mupdf/patches/patch-Makelists
diff -u pkgsrc/print/mupdf/patches/patch-Makelists:1.4 pkgsrc/print/mupdf/patches/patch-Makelists:1.5
--- pkgsrc/print/mupdf/patches/patch-Makelists:1.4 Thu Dec 18 17:45:58 2025
+++ pkgsrc/print/mupdf/patches/patch-Makelists Tue Mar 3 21:49:01 2026
@@ -1,9 +1,8 @@
-$NetBSD: patch-Makelists,v 1.4 2025/12/18 17:45:58 nia Exp $
+$NetBSD: patch-Makelists,v 1.5 2026/03/03 21:49:01 yhardy Exp $
* Disable JPEX XR support.
-* Fix compiling with a pre-c++20 compiler.
---- Makelists.orig 2025-09-10 12:15:25.000000000 +0000
+--- Makelists.orig 2026-02-18 16:24:19.000000000 +0000
+++ Makelists
@@ -140,7 +140,7 @@ JPEGXR_CFLAGS += -Ithirdparty/jpegxr/Software
@@ -14,13 +13,3 @@ $NetBSD: patch-Makelists,v 1.4 2025/12/1
JPEGXR_BUILD_CFLAGS += -Wno-tautological-compare
-@@ -804,7 +804,9 @@ TESSERACT_BUILD_CFLAGS += $(TESSERACT_DEFINES)
-
- # --- ZXINGCPP (optional) ---
-
-+ifeq ($(barcode),yes)
- ZXINGCPP_LANGFLAGS = -std=c++20
-+endif
-
- ZXINGCPP_CFLAGS += -Ithirdparty/zxing-cpp/core/src
- ZXINGCPP_CFLAGS += -DZXING_EXPERIMENTAL_API
Index: pkgsrc/print/mupdf/patches/patch-Makerules
diff -u pkgsrc/print/mupdf/patches/patch-Makerules:1.2 pkgsrc/print/mupdf/patches/patch-Makerules:1.3
--- pkgsrc/print/mupdf/patches/patch-Makerules:1.2 Fri Aug 29 09:17:06 2025
+++ pkgsrc/print/mupdf/patches/patch-Makerules Tue Mar 3 21:49:01 2026
@@ -1,4 +1,4 @@
-$NetBSD: patch-Makerules,v 1.2 2025/08/29 09:17:06 leot Exp $
+$NetBSD: patch-Makerules,v 1.3 2026/03/03 21:49:01 yhardy Exp $
- Handle the various operating systems in the same way avoiding hardcoding
- Avoid to use objcopy by setting HAVE_OBJCOPY to no (if `yes', and with
@@ -10,7 +10,7 @@ $NetBSD: patch-Makerules,v 1.2 2025/08/2
- Avoid internal version of freeglut and try to pick it up via pkg-config and
set SYS_GLUT_{CFLAGS,LIBS} accordingly.
---- Makerules.orig 2025-08-22 20:10:30.000000000 +0000
+--- Makerules.orig 2026-02-18 16:24:19.000000000 +0000
+++ Makerules
@@ -100,19 +100,6 @@ endif
@@ -32,7 +32,7 @@ $NetBSD: patch-Makerules,v 1.2 2025/08/2
SANITIZE_FLAGS += -fsanitize=address
SANITIZE_FLAGS += -fsanitize=leak
-@@ -212,37 +199,7 @@ ifneq "$(CLUSTER)" ""
+@@ -212,38 +199,8 @@ endif
CFLAGS += -DCLUSTER
endif
@@ -44,7 +44,8 @@ $NetBSD: patch-Makerules,v 1.2 2025/08/2
- AR = xcrun ar
- LD = xcrun ld
- RANLIB = xcrun ranlib
--
++HAVE_OBJCOPY := no
+
- ifneq ($(ARCHFLAGS),)
- $(warning "MacOS with ARCHFLAGS set. Assuming we are building for arm64, and setting HAVE_LIBCRYPTO to no.")
- HAVE_LIBCRYPTO := no
@@ -67,16 +68,16 @@ $NetBSD: patch-Makerules,v 1.2 2025/08/2
- ifeq ($(OS),OpenBSD)
- LDFLAGS += -pthread
- endif
-+HAVE_OBJCOPY := no
-
+-
ifeq ($(shell pkg-config --exists 'freetype2 >= 18.3.12' && echo yes),yes)
SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2)
-@@ -344,8 +301,6 @@ else
+ SYS_FREETYPE_LIBS := $(shell pkg-config --libs freetype2)
+@@ -343,8 +300,6 @@ else
+ PTHREAD_CFLAGS :=
PTHREAD_LIBS := -lpthread
endif
-
--endif
-
+-endif
+
# The following section has various cross compilation configurations.
#
- # Invoke these as:
Index: pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c
diff -u pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c:1.10 pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c:1.11
--- pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c:1.10 Thu May 7 20:42:57 2020
+++ pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c Tue Mar 3 21:49:01 2026
@@ -1,4 +1,4 @@
-$NetBSD: patch-source_fitz_load-jpx.c,v 1.10 2020/05/07 20:42:57 leot Exp $
+$NetBSD: patch-source_fitz_load-jpx.c,v 1.11 2026/03/03 21:49:01 yhardy Exp $
- MuPDF does some locking around its allocation calls; it overrides openjpeg's
allocators to do this locking too. However mupdf tries to manually align things
@@ -13,11 +13,11 @@ $NetBSD: patch-source_fitz_load-jpx.c,v
From OpenBSD ports textproc/mupdf/patch-source_fitz_load-jpx_c,v 1.5.
---- source/fitz/load-jpx.c.orig 2020-05-05 11:29:09.000000000 +0000
+--- source/fitz/load-jpx.c.orig 2026-02-18 16:24:19.000000000 +0000
+++ source/fitz/load-jpx.c
-@@ -584,19 +584,7 @@ void opj_free(void *ptr)
+@@ -163,19 +163,7 @@ static void * fz_opj_aligned_malloc_n(size_t alignment
- static void * opj_aligned_malloc_n(size_t alignment, size_t size)
+ static void * fz_opj_aligned_malloc_n(size_t alignment, size_t size)
{
- uint8_t *ptr;
- size_t off;
@@ -26,19 +26,19 @@ $NetBSD: patch-source_fitz_load-jpx.c,v
- return NULL;
-
- size += alignment + sizeof(uint8_t);
-- ptr = opj_malloc(size);
+- ptr = fz_opj_malloc(size);
- if (ptr == NULL)
- return NULL;
- off = alignment-(((int)(intptr_t)ptr) & (alignment - 1));
- ptr[off-1] = (uint8_t)off;
- return ptr + off;
-+ return opj_malloc(size);
++ return fz_opj_malloc(size);
}
- void * opj_aligned_malloc(size_t size)
-@@ -611,13 +599,7 @@ void * opj_aligned_32_malloc(size_t size
+ void * fz_opj_aligned_malloc(size_t size)
+@@ -190,13 +178,7 @@ void fz_opj_aligned_free(void* ptr_)
- void opj_aligned_free(void* ptr_)
+ void fz_opj_aligned_free(void* ptr_)
{
- uint8_t *ptr = (uint8_t *)ptr_;
- uint8_t off;
@@ -46,8 +46,8 @@ $NetBSD: patch-source_fitz_load-jpx.c,v
- return;
-
- off = ptr[-1];
-- opj_free((void *)(((unsigned char *)ptr) - off));
-+ opj_free(ptr_);
+- fz_opj_free((void *)(((unsigned char *)ptr) - off));
++ fz_opj_free(ptr_);
}
#if 0
Index: pkgsrc/print/mupdf/patches/patch-source_helpers_pkcs7_pkcs7-openssl.c
diff -u pkgsrc/print/mupdf/patches/patch-source_helpers_pkcs7_pkcs7-openssl.c:1.1 pkgsrc/print/mupdf/patches/patch-source_helpers_pkcs7_pkcs7-openssl.c:1.2
--- pkgsrc/print/mupdf/patches/patch-source_helpers_pkcs7_pkcs7-openssl.c:1.1 Thu Sep 7 14:36:54 2023
+++ pkgsrc/print/mupdf/patches/patch-source_helpers_pkcs7_pkcs7-openssl.c Tue Mar 3 21:49:01 2026
@@ -1,11 +1,11 @@
-$NetBSD: patch-source_helpers_pkcs7_pkcs7-openssl.c,v 1.1 2023/09/07 14:36:54 vins Exp $
+$NetBSD: patch-source_helpers_pkcs7_pkcs7-openssl.c,v 1.2 2026/03/03 21:49:01 yhardy Exp $
Add default_paths to STORE for checking signatures.
From OpenBSD ports.
---- source/helpers/pkcs7/pkcs7-openssl.c.orig 2023-09-05 11:51:19.000000000 +0000
+--- source/helpers/pkcs7/pkcs7-openssl.c.orig 2026-02-18 16:24:19.000000000 +0000
+++ source/helpers/pkcs7/pkcs7-openssl.c
-@@ -203,7 +203,7 @@ static int stream_free(BIO *b)
+@@ -209,7 +209,7 @@ static int stream_free(BIO *b)
return 1;
}
@@ -14,13 +14,13 @@ From OpenBSD ports.
{
return 1;
}
-@@ -519,6 +519,9 @@ check_certificate(fz_context *ctx, pdf_p
+@@ -524,6 +524,9 @@ check_certificate(fz_context *ctx, pdf_pkcs7_verifier
+ X509_STORE_add_cert(st, c);
}
}
-
++
+ /* Add default paths */
+ X509_STORE_set_default_paths(st);
-+
+
res = pk7_verify_cert(st, pk7sig);
- exit:
Added files:
Index: pkgsrc/print/mupdf/patches/patch-source_fitz_stext-search.c
diff -u /dev/null pkgsrc/print/mupdf/patches/patch-source_fitz_stext-search.c:1.1
--- /dev/null Tue Mar 3 21:49:01 2026
+++ pkgsrc/print/mupdf/patches/patch-source_fitz_stext-search.c Tue Mar 3 21:49:01 2026
@@ -0,0 +1,16 @@
+$NetBSD: patch-source_fitz_stext-search.c,v 1.1 2026/03/03 21:49:01 yhardy Exp $
+
+Since we are dynamically linking libmujs from lang/mujs, we should
+use the regexp.h header file from the mujs package.
+
+--- source/fitz/stext-search.c.orig 2026-03-02 10:51:00.197237036 +0000
++++ source/fitz/stext-search.c
+@@ -22,7 +22,7 @@
+
+ #include "mupdf/fitz.h"
+
+-#include "../thirdparty/mujs/regexp.h"
++#include "mujs/regexp.h"
+
+ #include "mupdf/ucdn.h"
+
Home |
Main Index |
Thread Index |
Old Index