tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Updating devel/mujs and print/mupdf
Dear Pkgsrc developers,
Our package for devel/mujs is a little old (investigated while looking
into updating print/mupdf). Additionally, mupdf now needs mujs/regexp.h
which is not installed by default.
Attached is a proposal to update mujs and mupdf bringing both to the
latest release, and supporting mupdf by installing mujs/regexp.h
as part of mujs.
Any thought on updating mujs and mupdf?
--
Kind regards,
Yorick Hardy
devel/mujs: update to mujs-1.3.9
mujs-1.3.9
==========
Commits:
Bug 709180: Fix simple array check in Array.prototype.sort.
Bug 709127: Plug memory leak in String.prototype.replace.
Bug 709128: Avoid undefined behavior for -INT_MIN in js_itoa.
Avoid UB when computing (unused) pointer from NULL.
Add "undefined" UB sanitize build target.
Bug 709124: Guard against malicious Array.prototype.sort comparator.
Bug 709103: Increase lexbuf capacity counter after realloc (not before).
Add UnicodeData.txt and SpecialCasing.txt tables.
Define Error.prototype.message property.
Delay string interning from lexer.
mujs-1.3.8
==========
Commits:
Improve Error.stack and restore Error.stackTrace.
Add rudimentary runtime limit checks.
update patch version
mujs-1.3.7
==========
Commits:
Bug 708625: Use more common "stack" property for error stack trace.
Issue #202: Special case for empty substring that splits surrogate pair.
Fix glitch with escape \x2d being treated as - in character classes.
Update character tables to include SpecialCasing.txt.
mujs-1.3.6
==========
Commits:
Update character tables to Unicode 16.
Remove stale IRC link.
Issue 193 and issue 194: Always use heapsort instead of quicksort.
Simplify Array.prototype.sort by sorting in place without libc.
mujs-1.3.5
==========
Commits:
Issue #130: Fix bug with String.prototype.split(RegExp).
Expose extended unicode characters as surrogate pairs in String methods.
Issue #164: Use correct scope for function declaration bindings.
Increase default stack sizes.
regex: Dynamically allocate character class buffer.
print/mupdf: update to mupdf-1.27.2
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.
Index: lang/mujs/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/mujs/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- lang/mujs/Makefile 7 Dec 2023 09:21:34 -0000 1.7
+++ lang/mujs/Makefile 2 Mar 2026 17:44:51 -0000
@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.7 2023/12/07 09:21:34 nia Exp $
-DISTNAME= mujs-1.3.4
+DISTNAME= mujs-1.3.9
CATEGORIES= lang
MASTER_SITES= https://mujs.com/downloads/
@@ -20,5 +20,11 @@
PKGCONFIG_OVERRIDE_STAGE= pre-install
PKGCONFIG_OVERRIDE+= build/release/mujs.pc
+INSTALLATION_DIRS+= include/mujs
+
+# needed by print/mupdf
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/regexp.h ${DESTDIR}${PREFIX}/include/mujs/
+
.include "../../mk/readline.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
Index: lang/mujs/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/lang/mujs/PLIST,v
retrieving revision 1.3
diff -u -r1.3 PLIST
--- lang/mujs/PLIST 10 Sep 2023 09:36:38 -0000 1.3
+++ lang/mujs/PLIST 2 Mar 2026 17:44:51 -0000
@@ -2,5 +2,6 @@
bin/mujs
bin/mujs-pp
include/mujs.h
+include/mujs/regexp.h
lib/libmujs.la
lib/pkgconfig/mujs.pc
Index: lang/mujs/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/lang/mujs/distinfo,v
retrieving revision 1.7
diff -u -r1.7 distinfo
--- lang/mujs/distinfo 7 Dec 2023 09:21:34 -0000 1.7
+++ lang/mujs/distinfo 2 Mar 2026 17:44:51 -0000
@@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.7 2023/12/07 09:21:34 nia Exp $
-BLAKE2s (mujs-1.3.4.tar.gz) = 8c2e5e0042b86f6e6c898ed881d92b8addb3f735a4d07f04f923da3922b53038
-SHA512 (mujs-1.3.4.tar.gz) = 0806684be5e6dc3cb7305355ab7c7babbfd3fd5bbd22515659a88a82c25f3f4b6af14f7ca07bacd154823b19110b749bba68311c9f317dd684e0fd5628ece573
-Size (mujs-1.3.4.tar.gz) = 128202 bytes
+BLAKE2s (mujs-1.3.9.tar.gz) = b568555aa299923cb952e85b2b39cd47a756afb9ac83250ec5788a58d8dfa332
+SHA512 (mujs-1.3.9.tar.gz) = a3be06a861f88fe8b10151bc2e56c19b8122078579f3c65a84f0874385d1e7c90dbc7891eff5c78c75c290fff62160a3babc43717fe03982668ca7aa40289552
+Size (mujs-1.3.9.tar.gz) = 454317 bytes
SHA1 (patch-Makefile) = a804b88721e4a48277e06f4f3d89b6c6f71eb76b
Index: print/mupdf/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/mupdf/Makefile,v
retrieving revision 1.138
diff -u -r1.138 Makefile
--- print/mupdf/Makefile 6 Feb 2026 10:05:44 -0000 1.138
+++ print/mupdf/Makefile 2 Mar 2026 17:44:51 -0000
@@ -1,10 +1,9 @@
# $NetBSD: Makefile,v 1.138 2026/02/06 10:05:44 wiz 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 @@
# 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 @@
${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 @@
.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 @@
#.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: print/mupdf/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/print/mupdf/PLIST,v
retrieving revision 1.30
diff -u -r1.30 PLIST
--- print/mupdf/PLIST 29 Aug 2025 09:54:49 -0000 1.30
+++ print/mupdf/PLIST 2 Mar 2026 17:44:51 -0000
@@ -30,6 +30,7 @@
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-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: print/mupdf/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/print/mupdf/distinfo,v
retrieving revision 1.81
diff -u -r1.81 distinfo
--- print/mupdf/distinfo 18 Dec 2025 17:45:58 -0000 1.81
+++ print/mupdf/distinfo 2 Mar 2026 17:44:52 -0000
@@ -1,15 +1,16 @@
$NetBSD: distinfo,v 1.81 2025/12/18 17:45:58 nia 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) = 21aa16ea38704bbd00d5b5ed4136a6c54c3b55d7
+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: print/mupdf/patches/patch-Makelists
===================================================================
RCS file: /cvsroot/pkgsrc/print/mupdf/patches/patch-Makelists,v
retrieving revision 1.4
diff -u -r1.4 patch-Makelists
--- print/mupdf/patches/patch-Makelists 18 Dec 2025 17:45:58 -0000 1.4
+++ print/mupdf/patches/patch-Makelists 2 Mar 2026 17:44:52 -0000
@@ -3,7 +3,7 @@
* 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 +14,3 @@
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: print/mupdf/patches/patch-Makerules
===================================================================
RCS file: /cvsroot/pkgsrc/print/mupdf/patches/patch-Makerules,v
retrieving revision 1.2
diff -u -r1.2 patch-Makerules
--- print/mupdf/patches/patch-Makerules 29 Aug 2025 09:17:06 -0000 1.2
+++ print/mupdf/patches/patch-Makerules 2 Mar 2026 17:44:52 -0000
@@ -10,7 +10,7 @@
- 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 @@
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 @@
- 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 @@
- 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: print/mupdf/patches/patch-source_fitz_load-jpx.c
===================================================================
RCS file: /cvsroot/pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c,v
retrieving revision 1.10
diff -u -r1.10 patch-source_fitz_load-jpx.c
--- print/mupdf/patches/patch-source_fitz_load-jpx.c 7 May 2020 20:42:57 -0000 1.10
+++ print/mupdf/patches/patch-source_fitz_load-jpx.c 2 Mar 2026 17:44:52 -0000
@@ -13,11 +13,11 @@
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 @@
- 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 @@
- 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: print/mupdf/patches/patch-source_helpers_pkcs7_pkcs7-openssl.c
===================================================================
RCS file: /cvsroot/pkgsrc/print/mupdf/patches/patch-source_helpers_pkcs7_pkcs7-openssl.c,v
retrieving revision 1.1
diff -u -r1.1 patch-source_helpers_pkcs7_pkcs7-openssl.c
--- print/mupdf/patches/patch-source_helpers_pkcs7_pkcs7-openssl.c 7 Sep 2023 14:36:54 -0000 1.1
+++ print/mupdf/patches/patch-source_helpers_pkcs7_pkcs7-openssl.c 2 Mar 2026 17:44:52 -0000
@@ -3,9 +3,9 @@
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 @@
{
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:
===================================================================
--- /dev/null 2026-03-02 19:45:14.621992502 +0200
+++ print/mupdf/patches/patch-source_fitz_stext-search.c 2026-03-02 12:55:11.611594148 +0200
@@ -0,0 +1,16 @@
+$NetBSD$
+
+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