Wed May 15 21:00:43 2024 UTC (32d)
mupdf: update to 1.24.0.

List of changes in MuPDF 1.24

	Error handling changes:

		You must call pdf_report_error in the final fz_catch. Any
		unreported errors will be automatically reported when a new
		error is raised, or when closing the fitz context.

	New formats:

		Read Office (XML) files! We internally open and convert
		docx/pptx/xlsx documents to HTML to allow reading the plain
		text content. The exact layout will NOT be preserved.

		Optional compile time option to use libarchive for reading CBR
		and other archive formats.

		Read plain text documents.

		Read gzipped files directly.

		Open and read FDF files to support importing annotations or
		form data using the low-level PDF functions. There are no tools
		for this yet.

		Read CFB (Compound File Binary) format archives -- used for the
		Office formats.

		Write images as JPEG2000.

	New tools and features:

		mutool bake (and associated functions) to bake appearance of
		annotations and forms into static content.

		Font subsetting flag to mutool clean (EXPERIMENTAL FEATURE).

		Option to use ObjStms when writing PDF files.

		Compression effort option when writing PDF files.

		Add option to control how line art is affected by redaction.
		Add more options to control how images are affected by
		redaction (remove-unless-invisible).

		Fix up q/Q gstate balance when cleaning content streams.

	New functions and types:

		pdf_rearrange_pages to subset or re-order pages in a PDF file.

		fz_invert_bitmap to invert monochrome bitmaps.

		fz_compressed_image_type to query the format of a compressed
		image.

		fz_text_decoder to convert various legacy and CJK encodings
		into UTF-8.

		More helper functions to easily manipulate PDF objects in C.

		Add flag to control fz_place_story overflow behavior when the
		text doesn't fit into the box.

		New archive handlers can be added at runtime.

	Major bug fixes and improvements:

		Support using Art, Bleed, Media, and Trim boxes for PDF page
		size.

		Support ActualText in PDF! No more strange text extraction when
		the file uses ActualText to patch over bad font encodings.

		Add special TrueType fallback encoding CMap for a specific
		flavor of broken PDF files that use an "identity" encoding
		without embedding the font.

		Limited "transfer function" support in PDF. Transfer functions
		are a deprecated legacy PDF feature that predates proper color
		management. They were intended to provide limited color
		management such as applying a gamma curve. Transfer functions
		have often been (ab)-used to invert images, and many PDF
		creators use them when writing softmask images. We have added
		support for this case only.

		Box drawing characters added to fonts for HTML and plain text
		documents.

		Write more compact PDF files (removed some unneccessary
		whitespace).

		Improved selection behavior for non-axis aligned text.

		Improved heuristics for detecting the logical and visual order
		of RTL text in PDF.

		Improved heuristics for inserting missing spaces in PDF text.

		Improved handling of CMYK JPEG files (which ones are inverted
		and which are not).

		Improved content type detection. Don't assume everything is PDF
		when we can't recognize it.

	Removed deprecated functions:
		pdf_check_signature


(wiz)
diff -r1.117 -r1.118 pkgsrc/print/mupdf/Makefile
diff -r1.27 -r1.28 pkgsrc/print/mupdf/PLIST
diff -r1.74 -r1.75 pkgsrc/print/mupdf/distinfo
diff -r1.28 -r1.29 pkgsrc/print/mupdf/patches/patch-ab
diff -r1.31 -r1.32 pkgsrc/print/mupdf/patches/patch-ac

cvs diff -r1.117 -r1.118 pkgsrc/print/mupdf/Makefile (expand / switch to unified diff)

--- pkgsrc/print/mupdf/Makefile 2024/01/17 23:57:50 1.117
+++ pkgsrc/print/mupdf/Makefile 2024/05/15 21:00:43 1.118
@@ -1,18 +1,17 @@ @@ -1,18 +1,17 @@
1# $NetBSD: Makefile,v 1.117 2024/01/17 23:57:50 gdt Exp $ 1# $NetBSD: Makefile,v 1.118 2024/05/15 21:00:43 wiz Exp $
2 2
3DISTNAME= mupdf-1.23.7-source 3DISTNAME= mupdf-1.24.0-source
4PKGNAME= ${DISTNAME:S/-source//} 4PKGNAME= ${DISTNAME:S/-source//}
5PKGREVISION= 1 
6CATEGORIES= print 5CATEGORIES= print
7MASTER_SITES= https://mupdf.com/downloads/archive/ 6MASTER_SITES= https://mupdf.com/downloads/archive/
8 7
9MAINTAINER= leot@NetBSD.org 8MAINTAINER= leot@NetBSD.org
10HOMEPAGE= https://mupdf.com/ 9HOMEPAGE= https://mupdf.com/
11COMMENT= Lightweight PDF, XPS and E-book viewer and toolkit 10COMMENT= Lightweight PDF, XPS and E-book viewer and toolkit
12LICENSE= gnu-agpl-v3 11LICENSE= gnu-agpl-v3
13 12
14USE_LANGUAGES= c c++ 13USE_LANGUAGES= c c++
15USE_TOOLS+= pkg-config gmake 14USE_TOOLS+= pkg-config gmake
16 15
17USE_CC_FEATURES= c99 16USE_CC_FEATURES= c99
18USE_CXX_FEATURES= c++11 17USE_CXX_FEATURES= c++11

cvs diff -r1.27 -r1.28 pkgsrc/print/mupdf/PLIST (expand / switch to unified diff)

--- pkgsrc/print/mupdf/PLIST 2023/09/07 14:36:54 1.27
+++ pkgsrc/print/mupdf/PLIST 2024/05/15 21:00:43 1.28
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1@comment $NetBSD: PLIST,v 1.27 2023/09/07 14:36:54 vins Exp $ 1@comment $NetBSD: PLIST,v 1.28 2024/05/15 21:00:43 wiz Exp $
2bin/mupdf 2bin/mupdf
3${PLIST.opengl}bin/mupdf-gl 3${PLIST.opengl}bin/mupdf-gl
4${PLIST.curl}bin/mupdf-x11-curl 4${PLIST.curl}bin/mupdf-x11-curl
5bin/muraster 5bin/muraster
6bin/mutool 6bin/mutool
7include/mupdf/fitz.h 7include/mupdf/fitz.h
8include/mupdf/fitz/archive.h 8include/mupdf/fitz/archive.h
9include/mupdf/fitz/band-writer.h 9include/mupdf/fitz/band-writer.h
10include/mupdf/fitz/bidi.h 10include/mupdf/fitz/bidi.h
11include/mupdf/fitz/bitmap.h 11include/mupdf/fitz/bitmap.h
12include/mupdf/fitz/buffer.h 12include/mupdf/fitz/buffer.h
13include/mupdf/fitz/color.h 13include/mupdf/fitz/color.h
14include/mupdf/fitz/compress.h 14include/mupdf/fitz/compress.h
@@ -17,26 +17,28 @@ include/mupdf/fitz/config.h @@ -17,26 +17,28 @@ include/mupdf/fitz/config.h
17include/mupdf/fitz/context.h 17include/mupdf/fitz/context.h
18include/mupdf/fitz/crypt.h 18include/mupdf/fitz/crypt.h
19include/mupdf/fitz/device.h 19include/mupdf/fitz/device.h
20include/mupdf/fitz/display-list.h 20include/mupdf/fitz/display-list.h
21include/mupdf/fitz/document.h 21include/mupdf/fitz/document.h
22include/mupdf/fitz/export.h 22include/mupdf/fitz/export.h
23include/mupdf/fitz/filter.h 23include/mupdf/fitz/filter.h
24include/mupdf/fitz/font.h 24include/mupdf/fitz/font.h
25include/mupdf/fitz/geometry.h 25include/mupdf/fitz/geometry.h
26include/mupdf/fitz/getopt.h 26include/mupdf/fitz/getopt.h
27include/mupdf/fitz/glyph-cache.h 27include/mupdf/fitz/glyph-cache.h
28include/mupdf/fitz/glyph.h 28include/mupdf/fitz/glyph.h
29include/mupdf/fitz/hash.h 29include/mupdf/fitz/hash.h
 30include/mupdf/fitz/heap-imp.h
 31include/mupdf/fitz/heap.h
30include/mupdf/fitz/image.h 32include/mupdf/fitz/image.h
31include/mupdf/fitz/link.h 33include/mupdf/fitz/link.h
32include/mupdf/fitz/log.h 34include/mupdf/fitz/log.h
33include/mupdf/fitz/outline.h 35include/mupdf/fitz/outline.h
34include/mupdf/fitz/output-svg.h 36include/mupdf/fitz/output-svg.h
35include/mupdf/fitz/output.h 37include/mupdf/fitz/output.h
36include/mupdf/fitz/path.h 38include/mupdf/fitz/path.h
37include/mupdf/fitz/pixmap.h 39include/mupdf/fitz/pixmap.h
38include/mupdf/fitz/pool.h 40include/mupdf/fitz/pool.h
39include/mupdf/fitz/separation.h 41include/mupdf/fitz/separation.h
40include/mupdf/fitz/shade.h 42include/mupdf/fitz/shade.h
41include/mupdf/fitz/store.h 43include/mupdf/fitz/store.h
42include/mupdf/fitz/story-writer.h 44include/mupdf/fitz/story-writer.h
@@ -45,62 +47,68 @@ include/mupdf/fitz/stream.h @@ -45,62 +47,68 @@ include/mupdf/fitz/stream.h
45include/mupdf/fitz/string-util.h 47include/mupdf/fitz/string-util.h
46include/mupdf/fitz/structured-text.h 48include/mupdf/fitz/structured-text.h
47include/mupdf/fitz/system.h 49include/mupdf/fitz/system.h
48include/mupdf/fitz/text.h 50include/mupdf/fitz/text.h
49include/mupdf/fitz/track-usage.h 51include/mupdf/fitz/track-usage.h
50include/mupdf/fitz/transition.h 52include/mupdf/fitz/transition.h
51include/mupdf/fitz/tree.h 53include/mupdf/fitz/tree.h
52include/mupdf/fitz/types.h 54include/mupdf/fitz/types.h
53include/mupdf/fitz/util.h 55include/mupdf/fitz/util.h
54include/mupdf/fitz/version.h 56include/mupdf/fitz/version.h
55include/mupdf/fitz/write-pixmap.h 57include/mupdf/fitz/write-pixmap.h
56include/mupdf/fitz/writer.h 58include/mupdf/fitz/writer.h
57include/mupdf/fitz/xml.h 59include/mupdf/fitz/xml.h
 60include/mupdf/html.h
58include/mupdf/memento.h 61include/mupdf/memento.h
59include/mupdf/pdf.h 62include/mupdf/pdf.h
60include/mupdf/pdf/annot.h 63include/mupdf/pdf/annot.h
61include/mupdf/pdf/clean.h 64include/mupdf/pdf/clean.h
62include/mupdf/pdf/cmap.h 65include/mupdf/pdf/cmap.h
63include/mupdf/pdf/crypt.h 66include/mupdf/pdf/crypt.h
64include/mupdf/pdf/document.h 67include/mupdf/pdf/document.h
65include/mupdf/pdf/event.h 68include/mupdf/pdf/event.h
66include/mupdf/pdf/font.h 69include/mupdf/pdf/font.h
67include/mupdf/pdf/form.h 70include/mupdf/pdf/form.h
 71include/mupdf/pdf/image-rewriter.h
68include/mupdf/pdf/interpret.h 72include/mupdf/pdf/interpret.h
69include/mupdf/pdf/javascript.h 73include/mupdf/pdf/javascript.h
70include/mupdf/pdf/name-table.h 74include/mupdf/pdf/name-table.h
71include/mupdf/pdf/object.h 75include/mupdf/pdf/object.h
72include/mupdf/pdf/page.h 76include/mupdf/pdf/page.h
73include/mupdf/pdf/parse.h 77include/mupdf/pdf/parse.h
74include/mupdf/pdf/resource.h 78include/mupdf/pdf/resource.h
75include/mupdf/pdf/xref.h 79include/mupdf/pdf/xref.h
76include/mupdf/ucdn.h 80include/mupdf/ucdn.h
77lib/libmupdf-third.a 81lib/libmupdf-third.a
78lib/libmupdf.a 82lib/libmupdf.a
79lib/pkgconfig/mupdf.pc 83lib/pkgconfig/mupdf.pc
80man/man1/mupdf.1 84man/man1/mupdf.1
81man/man1/mutool.1 85man/man1/mutool.1
82share/applications/mupdf.desktop 86share/applications/mupdf.desktop
83share/doc/mupdf/CHANGES 87share/doc/mupdf/CHANGES
84share/doc/mupdf/COPYING 88share/doc/mupdf/COPYING
85share/doc/mupdf/README 89share/doc/mupdf/README
86share/doc/mupdf/examples/SnarkFront.svg 90share/doc/mupdf/examples/SnarkFront.svg
87share/doc/mupdf/examples/bbox-device.js 91share/doc/mupdf/examples/bbox-device.js
 92share/doc/mupdf/examples/copy-outline.js
88share/doc/mupdf/examples/create-thumbnail.js 93share/doc/mupdf/examples/create-thumbnail.js
89share/doc/mupdf/examples/draw-device.js 94share/doc/mupdf/examples/draw-device.js
90share/doc/mupdf/examples/draw-document.js 95share/doc/mupdf/examples/draw-document.js
91share/doc/mupdf/examples/example.c 96share/doc/mupdf/examples/example.c
92share/doc/mupdf/examples/fix-s22pdf.js 97share/doc/mupdf/examples/fix-s22pdf.js
93share/doc/mupdf/examples/huntingofthesnark.png 98share/doc/mupdf/examples/huntingofthesnark.png
 99share/doc/mupdf/examples/import-fdf.js
94share/doc/mupdf/examples/jpx-to-pdf.js 100share/doc/mupdf/examples/jpx-to-pdf.js
95share/doc/mupdf/examples/multi-threaded.c 101share/doc/mupdf/examples/multi-threaded.c
 102share/doc/mupdf/examples/pdf-bake.js
96share/doc/mupdf/examples/pdf-create-lowlevel.js 103share/doc/mupdf/examples/pdf-create-lowlevel.js
97share/doc/mupdf/examples/pdf-create.js 104share/doc/mupdf/examples/pdf-create.js
98share/doc/mupdf/examples/pdf-dejpx.js 105share/doc/mupdf/examples/pdf-dejpx.js
99share/doc/mupdf/examples/pdf-extract-rich-media.js 106share/doc/mupdf/examples/pdf-extract-rich-media.js
100share/doc/mupdf/examples/pdf-merge.js 107share/doc/mupdf/examples/pdf-merge.js
101share/doc/mupdf/examples/pdf-portfolio.js 108share/doc/mupdf/examples/pdf-portfolio.js
102share/doc/mupdf/examples/pdf-trace.js 109share/doc/mupdf/examples/pdf-trace.js
 110share/doc/mupdf/examples/reconvert-cmyk.js
103share/doc/mupdf/examples/storytest.c 111share/doc/mupdf/examples/storytest.c
104share/doc/mupdf/examples/storytest.js 112share/doc/mupdf/examples/storytest.js
105share/doc/mupdf/examples/trace-device.js 113share/doc/mupdf/examples/trace-device.js
106share/pixmaps/mupdf.xpm 114share/pixmaps/mupdf.xpm

cvs diff -r1.74 -r1.75 pkgsrc/print/mupdf/distinfo (expand / switch to unified diff)

--- pkgsrc/print/mupdf/distinfo 2023/12/07 09:10:16 1.74
+++ pkgsrc/print/mupdf/distinfo 2024/05/15 21:00:43 1.75
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1$NetBSD: distinfo,v 1.74 2023/12/07 09:10:16 wiz Exp $ 1$NetBSD: distinfo,v 1.75 2024/05/15 21:00:43 wiz Exp $
2 2
3BLAKE2s (mupdf-1.23.7-source.tar.gz) = 2f8162b63879d67f4a53bb68646168af9d80860da9ca045ba44590129048ef5f 3BLAKE2s (mupdf-1.24.0-source.tar.gz) = 03ff1288498b566ca601680786b435252e7d164d367ac5889429500d4a020f62
4SHA512 (mupdf-1.23.7-source.tar.gz) = 581a4a5a16041bb405fbd7c1b9fba47da5745f00cbdf30e0e0468bfe67ac542884193b5957b293a4cdfc52f043b4f19612086f294b93dbd242d34735a1088777 4SHA512 (mupdf-1.24.0-source.tar.gz) = cb3b70341a924b524ddd20d5af00249a48bf79d9e05031648f95dd4121e1f125eb85ca70168b34db9fcf5251db705df599e327afde14549ee8627efe1d866811
5Size (mupdf-1.23.7-source.tar.gz) = 55312697 bytes 5Size (mupdf-1.24.0-source.tar.gz) = 55310611 bytes
6SHA1 (patch-Makelists) = 714157e21b2b609ac4f0adacc73c3e3a2156640a 6SHA1 (patch-Makelists) = 714157e21b2b609ac4f0adacc73c3e3a2156640a
7SHA1 (patch-ab) = 548361a64a7ef6777e60e48a2653120034a35338 7SHA1 (patch-ab) = 3b299b39058897d4aeb51e6123a59f28841d7459
8SHA1 (patch-ac) = 2377fe83c6ff3b976a20a912087694fcfe0e9168 8SHA1 (patch-ac) = bf98e521c067ba49ebc3e94894270bb76fa3f80c
9SHA1 (patch-ae) = c6b113818b32cb4470e8549c00a16e0b2f364ede 9SHA1 (patch-ae) = c6b113818b32cb4470e8549c00a16e0b2f364ede
10SHA1 (patch-docs_man_mupdf.1) = c2a2c1ad283428168a714adb634aa50cdd6a4aba 10SHA1 (patch-docs_man_mupdf.1) = c2a2c1ad283428168a714adb634aa50cdd6a4aba
11SHA1 (patch-platform_gl_gl-app.h) = 1e915249010acd3ff1343f0607e785d06577fe78 11SHA1 (patch-platform_gl_gl-app.h) = 1e915249010acd3ff1343f0607e785d06577fe78
12SHA1 (patch-platform_x11_curl__stream.c) = ccabcd665359ae00b76230a4ced22f360a0989e5 12SHA1 (patch-platform_x11_curl__stream.c) = ccabcd665359ae00b76230a4ced22f360a0989e5
13SHA1 (patch-platform_x11_pdfapp.c) = 33b53c845c6778614e4384a783a34d00b6814e74 13SHA1 (patch-platform_x11_pdfapp.c) = 33b53c845c6778614e4384a783a34d00b6814e74
14SHA1 (patch-source_fitz_load-jpx.c) = 8d7f58168c8429a82127b821387298341a1fcbfb 14SHA1 (patch-source_fitz_load-jpx.c) = 8d7f58168c8429a82127b821387298341a1fcbfb
15SHA1 (patch-source_helpers_pkcs7_pkcs7-openssl.c) = f3e949de8bdfc55e2da402a5bc59b4baf04b0d55 15SHA1 (patch-source_helpers_pkcs7_pkcs7-openssl.c) = f3e949de8bdfc55e2da402a5bc59b4baf04b0d55

cvs diff -r1.28 -r1.29 pkgsrc/print/mupdf/patches/patch-ab (expand / switch to unified diff)

--- pkgsrc/print/mupdf/patches/patch-ab 2023/09/07 14:36:54 1.28
+++ pkgsrc/print/mupdf/patches/patch-ab 2024/05/15 21:00:43 1.29
@@ -1,28 +1,28 @@ @@ -1,28 +1,28 @@
1$NetBSD: patch-ab,v 1.28 2023/09/07 14:36:54 vins Exp $ 1$NetBSD: patch-ab,v 1.29 2024/05/15 21:00:43 wiz Exp $
2 2
3- Handle the various operating systems in the same way avoiding hardcoding 3- Handle the various operating systems in the same way avoiding hardcoding
4- Avoid to use objcopy by setting HAVE_OBJCOPY to no (if `yes', and with 4- Avoid to use objcopy by setting HAVE_OBJCOPY to no (if `yes', and with
5 `USE_TOOLS+= objcopy' the objcopy-ing fails as follow: 5 `USE_TOOLS+= objcopy' the objcopy-ing fails as follow:
6 OBJCOPY build/release/resources/fonts/urw/Dingbats.cff.o 6 OBJCOPY build/release/resources/fonts/urw/Dingbats.cff.o
7 build/release/resources/fonts/urw/Dingbats.cff.o:1: warning: NUL character seen; rest of line ignored 7 build/release/resources/fonts/urw/Dingbats.cff.o:1: warning: NUL character seen; rest of line ignored
8 build/release/resources/fonts/urw/Dingbats.cff.o:1: *** missing separator. Stop. 8 build/release/resources/fonts/urw/Dingbats.cff.o:1: *** missing separator. Stop.
9 (also for other fonts)). This needs to be investigated further. 9 (also for other fonts)). This needs to be investigated further.
10- Avoid internal version of freeglut and try to pick it up via pkg-config and 10- Avoid internal version of freeglut and try to pick it up via pkg-config and
11 set SYS_GLUT_{CFLAGS,LIBS} accordingly. 11 set SYS_GLUT_{CFLAGS,LIBS} accordingly.
12 12
13--- Makerules.orig 2023-09-05 11:51:19.000000000 +0000 13--- Makerules.orig 2024-03-19 15:31:58.000000000 +0000
14+++ Makerules 14+++ Makerules
15@@ -42,30 +42,6 @@ endif 15@@ -48,30 +48,6 @@ endif
16  16
17 # System specific features 17 # System specific features
18  18
19-ifeq ($(findstring -fembed-bitcode,$(XCFLAGS)),) 19-ifeq ($(findstring -fembed-bitcode,$(XCFLAGS)),)
20- # clang does not support these in combination with -fembed-bitcode 20- # clang does not support these in combination with -fembed-bitcode
21- CFLAGS += -ffunction-sections -fdata-sections 21- CFLAGS += -ffunction-sections -fdata-sections
22-endif 22-endif
23- 23-
24-ifeq ($(OS),MACOS) 24-ifeq ($(OS),MACOS)
25- LDREMOVEUNREACH := -Wl,-dead_strip 25- LDREMOVEUNREACH := -Wl,-dead_strip
26- SO := dylib 26- SO := dylib
27-else 27-else
28- LDREMOVEUNREACH := -Wl,--gc-sections 28- LDREMOVEUNREACH := -Wl,--gc-sections
@@ -33,80 +33,75 @@ $NetBSD: patch-ab,v 1.28 2023/09/07 14:3 @@ -33,80 +33,75 @@ $NetBSD: patch-ab,v 1.28 2023/09/07 14:3
33- SO := so 33- SO := so
34- endif 34- endif
35-endif 35-endif
36- 36-
37-ifeq "$(OS)" "ios" 37-ifeq "$(OS)" "ios"
38- NEONFLAGS = 38- NEONFLAGS =
39-else 39-else
40- NEONFLAGS = -mneon 40- NEONFLAGS = -mneon
41-endif 41-endif
42- 42-
43 SANITIZE_FLAGS += -fsanitize=address 43 SANITIZE_FLAGS += -fsanitize=address
44 SANITIZE_FLAGS += -fsanitize=leak 44 SANITIZE_FLAGS += -fsanitize=leak
45  45
46@@ -154,41 +130,7 @@ ifneq "$(CLUSTER)" "" 46@@ -178,37 +154,7 @@ ifeq ($(OS),OpenBSD)
47 CFLAGS += -DCLUSTER 47 LINUX_OR_OPENBSD := yes
48 endif 48 endif
49  49
50-ifeq ($(OS),MINGW) 50-ifeq ($(OS),MINGW)
51- WINDRES := windres 51- WINDRES := windres
52- HAVE_WIN32 := yes 52- HAVE_WIN32 := yes
53- 53-
54-else ifeq ($(OS),MACOS) 54-else ifeq ($(OS),MACOS)
55- HAVE_GLUT := yes 55- HAVE_GLUT := yes
56- SYS_GLUT_CFLAGS := -Wno-deprecated-declarations 56- SYS_GLUT_CFLAGS := -Wno-deprecated-declarations
57- SYS_GLUT_LIBS := -framework GLUT -framework OpenGL 57- SYS_GLUT_LIBS := -framework GLUT -framework OpenGL
58- CC = xcrun cc 58- CC = xcrun cc
59- AR = xcrun ar 59- AR = xcrun ar
60- LD = xcrun ld 60- LD = xcrun ld
61- RANLIB = xcrun ranlib 61- RANLIB = xcrun ranlib
62- 62-
63- ifneq ($(ARCHFLAGS),) 63- ifneq ($(ARCHFLAGS),)
64- $(warning "MacOS with ARCHFLAGS set. Assuming we are building for arm64, and setting HAVE_LIBCRYPTO to no.") 64- $(warning "MacOS with ARCHFLAGS set. Assuming we are building for arm64, and setting HAVE_LIBCRYPTO to no.")
65- HAVE_LIBCRYPTO := no 65- HAVE_LIBCRYPTO := no
66- else ifeq (, $(shell which pkg-config)) 66- else ifeq (, $(shell command -v pkg-config))
67- $(warning "No pkg-config found, install it for proper integration of libcrypto") 67- $(warning "No pkg-config found, install it for proper integration of libcrypto")
68- else 68- else
69- HAVE_LIBCRYPTO := $(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes) 69- HAVE_LIBCRYPTO := $(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes)
70- ifeq ($(HAVE_LIBCRYPTO),yes) 70- ifeq ($(HAVE_LIBCRYPTO),yes)
71- LIBCRYPTO_CFLAGS := $(shell pkg-config --cflags libcrypto) -DHAVE_LIBCRYPTO 71- LIBCRYPTO_CFLAGS := $(shell pkg-config --cflags libcrypto) -DHAVE_LIBCRYPTO
72- LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto) 72- LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto)
73- endif 73- endif
74- endif 74- endif
75- 75-
76-else ifeq ($(OS),Linux) 76-else ifeq ($(LINUX_OR_OPENBSD),yes)
77- ifeq ($(PYODIDE_ROOT),) 77-
 78- ifeq ($(OS),Linux)
78- HAVE_OBJCOPY := yes 79- HAVE_OBJCOPY := yes
79- else 
80- # Pyodide's ld does not support -b so we cannot use it to create object 
81- # files containing font data, so leave HAVE_OBJCOPY unset. And we need 
82- # extra memory when linking. 
83- LDFLAGS += -sTOTAL_MEMORY=48MB 
84- endif 80- endif
85+HAVE_OBJCOPY := no 81+HAVE_OBJCOPY := no
86  82
87 ifeq ($(shell pkg-config --exists freetype2 && echo yes),yes) 83 ifeq ($(shell pkg-config --exists freetype2 && echo yes),yes)
88 SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2) 84 SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2)
89@@ -237,10 +179,10 @@ else ifeq ($(OS),Linux) 85@@ -265,13 +211,8 @@ else ifeq ($(LINUX_OR_OPENBSD),yes)
90 SYS_CURL_LIBS := $(shell pkg-config --libs libcurl) 
91 endif 
92  86
93- HAVE_GLUT := yes 87 HAVE_GLUT := yes
94- ifeq ($(HAVE_GLUT),yes) 88 ifeq ($(HAVE_GLUT),yes)
95- SYS_GLUT_CFLAGS := 89- ifeq ($(OS),OpenBSD)
96- SYS_GLUT_LIBS := -lglut -lGL 90 SYS_GLUT_CFLAGS := $(shell pkg-config --cflags glut gl)
97+ HAVE_GLUT := $(shell pkg-config --exists glut && echo yes) 91 SYS_GLUT_LIBS := $(shell pkg-config --libs glut gl)
98+ ifeq ($(shell pkg-config --exists glut && echo yes),yes) 92- else
99+ SYS_GLUT_CFLAGS := $(shell pkg-config --cflags glut) 93- SYS_GLUT_CFLAGS :=
100+ SYS_GLUT_LIBS := $(shell pkg-config --libs glut) 94- SYS_GLUT_LIBS := -lglut -lGL
 95- endif
101 endif 96 endif
102  97
103 HAVE_X11 := $(shell pkg-config --exists x11 xext && echo yes) 98 HAVE_X11 := $(shell pkg-config --exists x11 xext && echo yes)
104@@ -263,8 +205,6 @@ else ifeq ($(OS),Linux) 99@@ -294,8 +235,6 @@ else ifeq ($(LINUX_OR_OPENBSD),yes)
105 PTHREAD_LIBS := -lpthread 100 PTHREAD_LIBS := -lpthread
106 endif 101 endif
107  102
108-endif 103-endif
109- 104-
110 # The following section has various cross compilation configurations. 105 # The following section has various cross compilation configurations.
111 # 106 #
112 # Invoke these as: 107 # Invoke these as:

cvs diff -r1.31 -r1.32 pkgsrc/print/mupdf/patches/patch-ac (expand / switch to unified diff)

--- pkgsrc/print/mupdf/patches/patch-ac 2023/09/07 14:36:54 1.31
+++ pkgsrc/print/mupdf/patches/patch-ac 2024/05/15 21:00:43 1.32
@@ -1,75 +1,146 @@ @@ -1,75 +1,146 @@
1$NetBSD: patch-ac,v 1.31 2023/09/07 14:36:54 vins Exp $ 1$NetBSD: patch-ac,v 1.32 2024/05/15 21:00:43 wiz Exp $
2 2
3- Install target cleanup 3- Install target cleanup
4- Also install muthreads and mupkcs7 libraries (needed by various tools) 4- Also install muthreads and mupkcs7 libraries (needed by various tools)
5- Use sh instead of bash 5- Use sh instead of bash
6 6
7--- Makefile.orig 2023-09-05 11:51:19.000000000 +0000 7--- Makefile.orig 2024-03-19 15:31:58.000000000 +0000
8+++ Makefile 8+++ Makefile
9@@ -214,10 +214,10 @@ endif 9@@ -237,10 +237,10 @@ endif
10  10
11 FONT_GEN := $(FONT_BIN:%=generated/%.c) 11 FONT_GEN := $(FONT_BIN:%=generated/%.c)
12  12
13-generated/%.cff.c : %.cff $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; bash $(HEXDUMP_SH) > $@ $< 13-generated/%.cff.c : %.cff $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; bash $(HEXDUMP_SH) > $@ $<
14-generated/%.otf.c : %.otf $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; bash $(HEXDUMP_SH) > $@ $< 14-generated/%.otf.c : %.otf $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; bash $(HEXDUMP_SH) > $@ $<
15-generated/%.ttf.c : %.ttf $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; bash $(HEXDUMP_SH) > $@ $< 15-generated/%.ttf.c : %.ttf $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; bash $(HEXDUMP_SH) > $@ $<
16-generated/%.ttc.c : %.ttc $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; bash $(HEXDUMP_SH) > $@ $< 16-generated/%.ttc.c : %.ttc $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; bash $(HEXDUMP_SH) > $@ $<
17+generated/%.cff.c : %.cff $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; sh $(HEXDUMP_SH) > $@ $< 17+generated/%.cff.c : %.cff $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; sh $(HEXDUMP_SH) > $@ $<
18+generated/%.otf.c : %.otf $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; sh $(HEXDUMP_SH) > $@ $< 18+generated/%.otf.c : %.otf $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; sh $(HEXDUMP_SH) > $@ $<
19+generated/%.ttf.c : %.ttf $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; sh $(HEXDUMP_SH) > $@ $< 19+generated/%.ttf.c : %.ttf $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; sh $(HEXDUMP_SH) > $@ $<
20+generated/%.ttc.c : %.ttc $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; sh $(HEXDUMP_SH) > $@ $< 20+generated/%.ttc.c : %.ttc $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; sh $(HEXDUMP_SH) > $@ $<
21  21
22 ifeq ($(HAVE_OBJCOPY),yes) 22 ifeq ($(HAVE_OBJCOPY),yes)
23 MUPDF_OBJ += $(FONT_BIN:%=$(OUT)/%.o) 23 MUPDF_OBJ += $(FONT_BIN:%=$(OUT)/%.o)
24@@ -440,29 +440,35 @@ tools: $(TOOL_APPS) 24@@ -465,55 +465,59 @@ tools: $(TOOL_APPS)
25 apps: $(TOOL_APPS) $(VIEW_APPS) 25 apps: $(TOOL_APPS) $(VIEW_APPS)
26  26
27 install-libs: libs 27 install-headers:
28- install -d $(DESTDIR)$(incdir)/mupdf 28- install -d $(DESTDIR)$(incdir)/mupdf
29- install -d $(DESTDIR)$(incdir)/mupdf/fitz 29- install -d $(DESTDIR)$(incdir)/mupdf/fitz
30- install -d $(DESTDIR)$(incdir)/mupdf/pdf 30- install -d $(DESTDIR)$(incdir)/mupdf/pdf
31- install -m 644 include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf 31- install -m 644 include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf
32- install -m 644 include/mupdf/fitz/*.h $(DESTDIR)$(incdir)/mupdf/fitz 32- install -m 644 include/mupdf/fitz/*.h $(DESTDIR)$(incdir)/mupdf/fitz
33- install -m 644 include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf 33- install -m 644 include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf
34+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(incdir)/mupdf 34+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(incdir)/mupdf
35+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(incdir)/mupdf/fitz 35+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(incdir)/mupdf/fitz
36+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(incdir)/mupdf/pdf 36+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(incdir)/mupdf/pdf
37+ ${BSD_INSTALL_DATA} include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf 37+ ${BSD_INSTALL_DATA} include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf
38+ ${BSD_INSTALL_DATA} include/mupdf/fitz/*.h $(DESTDIR)$(incdir)/mupdf/fitz 38+ ${BSD_INSTALL_DATA} include/mupdf/fitz/*.h $(DESTDIR)$(incdir)/mupdf/fitz
39+ ${BSD_INSTALL_DATA} include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf 39+ ${BSD_INSTALL_DATA} include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf
 40
 41 install-libs: libs install-headers
40 ifneq ($(LIBS_TO_INSTALL_IN_LIB),) 42 ifneq ($(LIBS_TO_INSTALL_IN_LIB),)
41- install -d $(DESTDIR)$(libdir) 43- install -d $(DESTDIR)$(libdir)
42- install -m 644 $(LIBS_TO_INSTALL_IN_LIB) $(DESTDIR)$(libdir) 44- install -m 644 $(LIBS_TO_INSTALL_IN_LIB) $(DESTDIR)$(libdir)
43+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(libdir) 45+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(libdir)
44+ for f in $(LIBS_TO_INSTALL_IN_LIB); do \ 46+ for f in $(LIBS_TO_INSTALL_IN_LIB); do \
45+ ${BSD_INSTALL_LIB} $$f $(DESTDIR)$(libdir); \ 47+ ${BSD_INSTALL_LIB} $$f $(DESTDIR)$(libdir); \
46+ done 48+ done
47+ 
48 endif 49 endif
49  50
50 install-apps: apps 51 install-apps: apps
51- install -d $(DESTDIR)$(bindir) 52- install -d $(DESTDIR)$(bindir)
52- install -m 755 $(LIBS_TO_INSTALL_IN_BIN) $(TOOL_APPS) $(VIEW_APPS) $(DESTDIR)$(bindir) 53- install -m 755 $(LIBS_TO_INSTALL_IN_BIN) $(TOOL_APPS) $(VIEW_APPS) $(DESTDIR)$(bindir)
53+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(bindir) 54+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(bindir)
54+ for f in $(LIBS_TO_INSTALL_IN_BIN) $(TOOL_APPS) $(VIEW_APPS); do \ 55+ for f in $(LIBS_TO_INSTALL_IN_BIN) $(TOOL_APPS) $(VIEW_APPS); do \
55+ ${BSD_INSTALL_LIB} $$f $(DESTDIR)$(bindir); \ 56+ ${BSD_INSTALL_LIB} $$f $(DESTDIR)$(bindir); \
56+ done 57+ done
57  58
58 install-docs: 59 install-docs:
59- install -d $(DESTDIR)$(mandir)/man1 60- install -d $(DESTDIR)$(mandir)/man1
60- install -m 644 docs/man/*.1 $(DESTDIR)$(mandir)/man1 61- install -m 644 docs/man/*.1 $(DESTDIR)$(mandir)/man1
61+ ${BSD_INSTALL_MAN_DIR} $(DESTDIR)$(mandir)/man1 62+ ${BSD_INSTALL_MAN_DIR} $(DESTDIR)$(mandir)/man1
62+ ${BSD_INSTALL_MAN} docs/man/*.1 $(DESTDIR)$(mandir)/man1 63+ ${BSD_INSTALL_MAN} docs/man/*.1 $(DESTDIR)$(mandir)/man1
63+ 
64+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir) 
65+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)/examples 
66+ ${BSD_INSTALL_DATA} README COPYING CHANGES $(DESTDIR)$(docdir) 
67+ ${BSD_INSTALL_DATA} docs/examples/* $(DESTDIR)$(docdir)/examples 
68  64
69- install -d $(DESTDIR)$(docdir) 65- install -d $(DESTDIR)$(docdir)
70- install -d $(DESTDIR)$(docdir)/examples 66- install -d $(DESTDIR)$(docdir)/examples
71- install -m 644 README COPYING CHANGES $(DESTDIR)$(docdir) 67- install -m 644 README CHANGES $(DESTDIR)$(docdir)
 68- install -m 644 $(wildcard COPYING LICENSE) $(DESTDIR)$(docdir)
72- install -m 644 docs/examples/* $(DESTDIR)$(docdir)/examples 69- install -m 644 docs/examples/* $(DESTDIR)$(docdir)/examples
 70+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)
 71+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)/examples
 72+ ${BSD_INSTALL_DATA} README CHANGES $(DESTDIR)$(docdir)
 73+ ${BSD_INSTALL_DATA} $(wildcard COPYING LICENSE) $(DESTDIR)$(docdir)
 74+ ${BSD_INSTALL_DATA} docs/examples/* $(DESTDIR)$(docdir)/examples
73  75
74 install: install-libs install-apps install-docs 76 install: install-libs install-apps install-docs
75  77
 78 install-docs-html:
 79 python3 scripts/build-docs.py
 80- install -d $(DESTDIR)$(docdir)
 81- install -d $(DESTDIR)$(docdir)/_images
 82- install -d $(DESTDIR)$(docdir)/_static
 83- install -d $(DESTDIR)$(docdir)/_static/js
 84- install -d $(DESTDIR)$(docdir)/_static/css
 85- install -d $(DESTDIR)$(docdir)/_static/css/fonts
 86- install -m 644 build/docs/html/*.html $(DESTDIR)$(docdir)
 87- install -m 644 build/docs/html/*.inv $(DESTDIR)$(docdir)
 88- install -m 644 build/docs/html/*.js $(DESTDIR)$(docdir)
 89- install -m 644 build/docs/html/_images/* $(DESTDIR)$(docdir)/_images
 90- install -m 644 build/docs/html/_static/*.css $(DESTDIR)$(docdir)/_static
 91- install -m 644 build/docs/html/_static/*.ico $(DESTDIR)$(docdir)/_static
 92- install -m 644 build/docs/html/_static/*.js $(DESTDIR)$(docdir)/_static
 93- install -m 644 build/docs/html/_static/*.png $(DESTDIR)$(docdir)/_static
 94- install -m 644 build/docs/html/_static/*.svg $(DESTDIR)$(docdir)/_static
 95- install -m 644 build/docs/html/_static/js/* $(DESTDIR)$(docdir)/_static/js
 96- install -m 644 build/docs/html/_static/css/*.css $(DESTDIR)$(docdir)/_static/css
 97- install -m 644 build/docs/html/_static/css/fonts/* $(DESTDIR)$(docdir)/_static/css/fonts
 98+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)
 99+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)/_images
 100+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)/_static
 101+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)/_static/js
 102+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)/_static/css
 103+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)/_static/css/fonts
 104+ ${BSD_INSTALL_DATA} build/docs/html/*.html $(DESTDIR)$(docdir)
 105+ ${BSD_INSTALL_DATA} build/docs/html/*.inv $(DESTDIR)$(docdir)
 106+ ${BSD_INSTALL_DATA} build/docs/html/*.js $(DESTDIR)$(docdir)
 107+ ${BSD_INSTALL_DATA} build/docs/html/_images/* $(DESTDIR)$(docdir)/_images
 108+ ${BSD_INSTALL_DATA} build/docs/html/_static/*.css $(DESTDIR)$(docdir)/_static
 109+ ${BSD_INSTALL_DATA} build/docs/html/_static/*.ico $(DESTDIR)$(docdir)/_static
 110+ ${BSD_INSTALL_DATA} build/docs/html/_static/*.js $(DESTDIR)$(docdir)/_static
 111+ ${BSD_INSTALL_DATA} build/docs/html/_static/*.png $(DESTDIR)$(docdir)/_static
 112+ ${BSD_INSTALL_DATA} build/docs/html/_static/*.svg $(DESTDIR)$(docdir)/_static
 113+ ${BSD_INSTALL_DATA} build/docs/html/_static/js/* $(DESTDIR)$(docdir)/_static/js
 114+ ${BSD_INSTALL_DATA} build/docs/html/_static/css/*.css $(DESTDIR)$(docdir)/_static/css
 115+ ${BSD_INSTALL_DATA} build/docs/html/_static/css/fonts/* $(DESTDIR)$(docdir)/_static/css/fonts
 116
 117 tarball:
 118 bash scripts/archive.sh
 119@@ -638,23 +642,23 @@ ifneq ($(USE_SYSTEM_LIBS),yes)
 120 endif
 121
 122 install-shared-c: install-shared-check shared install-headers
 123- install -d $(DESTDIR)$(libdir)
 124+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(libdir)
 125 install -m $(SO_INSTALL_MODE) $(OUT)/libmupdf.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/
 126 ifneq ($(OS),OpenBSD)
 127 ln -sf libmupdf.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/libmupdf.$(SO)
 128 endif
 129
 130 install-shared-c++: install-shared-c c++
 131- install -m 644 platform/c++/include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf
 132+ ${BSD_INSTALL_DATA} platform/c++/include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf
 133 install -m $(SO_INSTALL_MODE) $(OUT)/libmupdfcpp.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/
 134 ifneq ($(OS),OpenBSD)
 135 ln -sf libmupdfcpp.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/libmupdfcpp.$(SO)
 136 endif
 137
 138 install-shared-python: install-shared-c++ python
 139- install -d $(DESTDIR)$(pydir)/mupdf
 140+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(pydir)/mupdf
 141 install -m $(SO_INSTALL_MODE) $(OUT)/_mupdf.$(SO) $(DESTDIR)$(pydir)/mupdf
 142- install -m 644 $(OUT)/mupdf.py $(DESTDIR)$(pydir)/mupdf/__init__.py
 143+ ${BSD_INSTALL_DATA} $(OUT)/mupdf.py $(DESTDIR)$(pydir)/mupdf/__init__.py
 144
 145 else
 146