head	1.4;
access;
symbols
	pkgsrc-2026Q3:1.3.0.6
	pkgsrc-2026Q3-base:1.3
	pkgsrc-2026Q2:1.3.0.4
	pkgsrc-2026Q2-base:1.3
	pkgsrc-2026Q1:1.3.0.2
	pkgsrc-2026Q1-base:1.3
	pkgsrc-2025Q4:1.2.0.4
	pkgsrc-2025Q4-base:1.2
	pkgsrc-2025Q3:1.2.0.2
	pkgsrc-2025Q3-base:1.2
	pkgsrc-2025Q2:1.1.0.8
	pkgsrc-2025Q2-base:1.1
	pkgsrc-2025Q1:1.1.0.6
	pkgsrc-2025Q1-base:1.1
	pkgsrc-2024Q4:1.1.0.4
	pkgsrc-2024Q4-base:1.1
	pkgsrc-2024Q3:1.1.0.2
	pkgsrc-2024Q3-base:1.1;
locks; strict;
comment	@# @;


1.4
date	2026.10.10.15.31.07;	author leot;	state Exp;
branches;
next	1.3;
commitid	7IJd7GCdYqcQBWYG;

1.3
date	2026.03.03.21.49.01;	author yhardy;	state Exp;
branches;
next	1.2;
commitid	mcA4dYtqQmhSMzwG;

1.2
date	2025.08.29.09.17.06;	author leot;	state Exp;
branches;
next	1.1;
commitid	oDnIuFFF6BDpDB8G;

1.1
date	2024.08.14.05.55.32;	author adam;	state Exp;
branches;
next	;
commitid	6Jr4EKtxzKjCJKlF;


desc
@@


1.4
log
@mupdf: Update to 1.28.5

pkgsrc changes:
- Remove comment indicating that MuPDF needs mujs headers, it seems no longer
  the case (and patch is no longer needed). Depends still on MuJS though to
  provide functionalities.


Changes:
List of changes in MuPDF 1.28.5
 Huge amount of bug fixes

List of changes in MuPDF 1.28.4
 Bug fixes

List of changes in MuPDF 1.28.3
 mutool poster restored to working order (the command was broken in 1.28.0 through 1.28.2)

List of changes in MuPDF 1.28.2
 Build system fixes

List of changes in MuPDF 1.28.1
 Structured text improvements
 Bug fixes

List of changes in MuPDF 1.28
 Markdown document format support!
 New internal options parsing API:
  - Removed fz_has_option, fz_copy_option, and fz_option_eq.
  - Added fz_options struct with constructors and accessors.
  - Detect and warn for unknown and mis-spelled options.
  - The mutool draw command now accepts device specific options with -O.
  - Setting overprint simulation in mutool draw is now done with -M.
 HTML and EPUB improvements:
  - vertical-align for inline images
  - vertical-align percentage based values
  - support tags <u>, <s>, <mark>
  - background-color on inline elements
  - :before and :after pseudo-selectors with content
  - input form elements now have an appearance (but non-interactive)
  - respect meta viewport to set minimum page size
 Per-document control of publisher and user CSS.
  - context global fz_set_use_document_css and fz_set_user_css deprecated
  - replaced with per-document fz_style_document
 PDF write option "decrypt" is deprecated; use "encrypt=none" instead.
 New mutool audit command to analyze PDF structure and generate report
 Many improvements and fixes to incremental search API.
  - customizable structured text to plain text flattening conversions
  - mutool grep command uses regular expressions by default
 Improved text extraction:
  - improved ActualText replacement handling for non-text elements
  - more robust behavior around ActualText replacements
  - presentation form (ligature) decomposition for all scripts
  - improved text-indent paragraph detection
  - improved fake bold detection
  - improved handling of soft and hard hyphens
 Added fz_check_document to scan document and fix possible structural
 errors. Use this to avoid the risk of encountering file errors that may
 cause edits to be lost when the file structure is repaired.
 Support linear and radial shadings when converting XPS (and other formats) to PDF.
 Checked arithmetic functions like in C23 (fz_ckd_mul_int etc)
 Many bug fixes, optimizations, security hardening fixes, and undefined
 behavior code cleanups.
@
text
@$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
  `USE_TOOLS+= objcopy' the objcopy-ing fails as follow:
    OBJCOPY build/release/resources/fonts/urw/Dingbats.cff.o
    build/release/resources/fonts/urw/Dingbats.cff.o:1: warning: NUL character seen; rest of line ignored
    build/release/resources/fonts/urw/Dingbats.cff.o:1: *** missing separator.  Stop.
  (also for other fonts)).  This needs to be investigated further.
- Avoid internal version of freeglut and try to pick it up via pkg-config and
  set SYS_GLUT_{CFLAGS,LIBS} accordingly.

--- Makerules.orig	2026-09-25 02:11:56.000000000 +0000
+++ Makerules
@@@@ -103,19 +103,6 @@@@ endif
 
 # System specific features
 
-ifeq ($(findstring -fembed-bitcode,$(XCFLAGS)),)
-  # clang does not support these in combination with -fembed-bitcode
-  CFLAGS += -ffunction-sections -fdata-sections
-endif
-
-ifeq ($(OS),Darwin)
-  LDREMOVEUNREACH := -Wl,-dead_strip
-  SO := dylib
-else
-  LDREMOVEUNREACH := -Wl,--gc-sections
-  SO := so
-endif
-
 SANITIZE_FLAGS += -fsanitize=undefined
 SANITIZE_FLAGS += -fsanitize=address
 SANITIZE_FLAGS += -fsanitize=leak
@@@@ -220,38 +207,8 @@@@ endif
   CFLAGS += -DCLUSTER
 endif
 
-ifeq ($(OS),Darwin)
-  HAVE_GLUT := yes
-  SYS_GLUT_CFLAGS := -Wno-deprecated-declarations
-  SYS_GLUT_LIBS := -framework GLUT -framework OpenGL
-  CC = xcrun cc
-  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
-  else ifeq (, $(shell command -v pkg-config))
-    $(warning "No pkg-config found, install it for proper integration of libcrypto")
-  else
-    HAVE_LIBCRYPTO := $(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes)
-    ifeq ($(HAVE_LIBCRYPTO),yes)
-      LIBCRYPTO_CFLAGS := $(shell pkg-config --cflags libcrypto) -DHAVE_LIBCRYPTO
-      LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto)
-    endif
-  endif
-
-else
-
-  ifeq ($(OS),Linux)
-    HAVE_OBJCOPY := yes
-  endif
-
-  ifeq ($(OS),OpenBSD)
-    LDFLAGS += -pthread
-  endif
-
   ifeq ($(shell pkg-config --exists 'freetype2 >= 18.3.12' && echo yes),yes)
     SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2)
     SYS_FREETYPE_LIBS := $(shell pkg-config --libs freetype2)
@@@@ -355,8 +312,6 @@@@ else
     PTHREAD_CFLAGS :=
     PTHREAD_LIBS := -lpthread
   endif
-
-endif
 
 # The following section has various cross compilation configurations.
 #
@


1.3
log
@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.
@
text
@d1 1
a1 1
$NetBSD: patch-Makerules,v 1.2 2025/08/29 09:17:06 leot Exp $
d13 1
a13 1
--- Makerules.orig	2026-02-18 16:24:19.000000000 +0000
d15 1
a15 1
@@@@ -100,19 +100,6 @@@@ endif
d32 1
d35 1
a35 2
 
@@@@ -212,38 +199,8 @@@@ endif
d75 1
a75 1
@@@@ -343,8 +300,6 @@@@ else
@


1.2
log
@mupdf: Update to 1.26.7

Changes:
List of changes in MuPDF 1.26
- Removed PDF linearization support:
- Object labels:
  Write a comment before numbered objects listing the possible
  ways it can be reached from the document root.
  Enable with mutool show -L, mutool clean -L, and PDF write
  option "labels".
  Library functions pdf_load_object_labels and pdf_label_object.
- Brotli compression:
  Experimental feature from latest PDF specification proposal.
- Optional barcode support:
  Build with "make barcode=yes".
  Uses zxing-cpp (zebra crossing) C++ as a third party dependency.
  Adds mutool barcode sub-command.
  To detect barcodes in a PDF:
   mutool barcode -d barcode.pdf
  To create barcode images as PNG file:
   mutool barcode -c -o barcode.png -F qrcode "Hello, world!"
  Library functions fz_new_barcode_image and
  fz_decode_barcode_from_pixmap.
- New Structured Text extraction passes:
  Paragraph Breaking: Detect paragraphs from first-line
  indentation and other heuristics.
  Table Hunt: Scan text and try to assemble it into tables with
  rows and columns.
- New Structured Text extraction options:
   - allow reading raw character or glyph index when unicode is not available
   - collect styles to detect fake bold, underlines, strike-through, etc.
   - clip-rect to only extract text inside the specified area
   - accurate-ascenders to measure ascender data from font outline
   - accurate-side-bearings to measure glyph widths from font outline
- CSV output format (using "Table Hunt" pass on input document).
- Core library additions:
  JSON parser, object model, and printer.
  Activity logger API.
  Support "overlong null" characters in utf-8 (using "\xC0\x80"
  to represent \x00 in C strings, without being misconstrued as a
  string terminator).
- Build system changes:
  Cleaned up Makefile cruft and refactored how shared libraries
  are built.
  Removed bit-rotted sections of the Makefile that have not been
  maintained and no longer work (primarily iOS and MinGW).
  Don't build example tools muraster and mupdf-x11-curl by
  default. These examples can be built with "make extra-apps".
- Miscellaneous improvements and new behavior:
  Include more data in structured text XML dumps.
  Ignore junk at the start of a PDF file (such as PJL commands)
  without needing to perform a full repair pass.
  Support non-latin/greek/cyrillic/CJK languages in annotations
  and widgets (requires HTML layout engine).
  Use system font callback to look for missing fonts in HTML
  layout.
  Support CSS text fill and stroke properties:
   -webkit-text-fill-color
   -webkit-stroke-color
   -webkit-stroke-width
  Updated unicode line breaking (UAX 14) and upper/lowercase
  tables to Unicode 16.0.
- Bug fixes and stability improvements:
- Command line tool additional options:
   mutool poster: new option -m (margin)
   mutool show: new option -r (force repair)
   mutool clean: --structure=keep to keep tagged content when
   subsetting pages. WARNING: This option will prevent the file
   from shrinking, because we must still keep all the objects from
   deleted pages around.
   mutool clean: -t option will always write compact objects
   mutool clean: -tt option will always pretty-print objects

List of changes in MuPDF 1.25
- New logo!
- Redaction options:
   - New "don't redact text" option
   - New "redact line art" option
- Structured Text options:
   - Use "Tagged PDF" structure information
   - Detect underlines and strikeouts
   - Mark automatically inserted spaces
   - Mark areas where line art (vectors) are present
   - Use accurate glyph bounding boxes
   - Ignore ActualText tags
   - Scan page for 'grid' lines
   - Segment page into areas (headers, columns, etc)
- Annotation features:
   - Intent property accessors.
   - Rich Content styling on FreeText annotations.
   - Callout arrows on FreeText annotations.
   - Leader Line and Caption on Line annotations.
   - Improved handling of Rect and RD.
- Low level FDF format support.
   - See docs/examples/import-fdf.js for how to use.
- Improved FileSpec handling with new functions.
   - Functions for listing document and page Associated Files (AF).
   - Functions to create and write XML DOM trees (fz_xml).
   - Skew detection and deskew algorithms on pixmaps and PDFOCR device.
   - Document area detection in scanned images.
   - ZUGFeRD support.
   - New tool "mutool audit" to create summary of PDF file composition.
- Important bug fixes
@
text
@d1 1
a1 1
$NetBSD: patch-Makerules,v 1.1 2024/08/14 05:55:32 adam Exp $
d13 1
a13 1
--- Makerules.orig	2025-08-22 20:10:30.000000000 +0000
d35 1
a35 1
@@@@ -212,37 +199,7 @@@@ ifneq "$(CLUSTER)" ""
d47 2
a48 1
-
d71 1
a71 2
+HAVE_OBJCOPY := no
 
d74 3
a76 1
@@@@ -344,8 +301,6 @@@@ else
d79 2
a81 2
-endif
-
a83 1
 # Invoke these as:
@


1.1
log
@mupdf: really disable FreeGLUT when not enabled as an option
@
text
@d1 1
a1 1
$NetBSD: patch-ab,v 1.29 2024/05/15 21:00:43 wiz Exp $
d13 1
a13 1
--- Makerules.orig	2024-03-19 15:31:58.000000000 +0000
d15 1
a15 1
@@@@ -48,30 +48,6 @@@@ endif
d24 1
a24 1
-ifeq ($(OS),MACOS)
d29 1
a29 12
-  ifeq ($(OS),MINGW)
-    SO := dll
-    EXE := .exe
-  else
-    SO := so
-  endif
-endif
-
-ifeq "$(OS)" "ios"
-  NEONFLAGS =
-else
-  NEONFLAGS = -mneon
d35 2
a36 2
@@@@ -178,37 +154,7 @@@@ ifeq ($(OS),OpenBSD)
     LINUX_OR_OPENBSD := yes
d39 1
a39 5
-ifeq ($(OS),MINGW)
-  WINDRES := windres
-  HAVE_WIN32 := yes
-
-else ifeq ($(OS),MACOS)
d56 2
a57 2
-	  LIBCRYPTO_CFLAGS := $(shell pkg-config --cflags libcrypto) -DHAVE_LIBCRYPTO
-	  LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto)
d61 1
a61 1
-else ifeq ($(LINUX_OR_OPENBSD),yes)
d66 4
d72 4
a75 20
   ifeq ($(shell pkg-config --exists freetype2 && echo yes),yes)
 	SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2)
@@@@ -263,15 +209,9 @@@@ else ifeq ($(LINUX_OR_OPENBSD),yes)
 	SYS_CURL_LIBS := $(shell pkg-config --libs libcurl)
   endif
 
-  HAVE_GLUT := yes
   ifeq ($(HAVE_GLUT),yes)
-    ifeq ($(OS),OpenBSD)
       SYS_GLUT_CFLAGS := $(shell pkg-config --cflags glut gl)
       SYS_GLUT_LIBS := $(shell pkg-config --libs glut gl)
-    else
-      SYS_GLUT_CFLAGS :=
-      SYS_GLUT_LIBS := -lglut -lGL
-    endif
   endif
 
   HAVE_X11 := $(shell pkg-config --exists x11 xext && echo yes)
@@@@ -294,8 +234,6 @@@@ else ifeq ($(LINUX_OR_OPENBSD),yes)
 	PTHREAD_LIBS := -lpthread
@

