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:   leot
Date:           Sat Oct 23 15:22:07 UTC 2021

Modified Files:
        pkgsrc/print/mupdf: Makefile PLIST buildlink3.mk distinfo
        pkgsrc/print/mupdf/patches: patch-Makethird patch-ab patch-ac
            patch-thirdparty_mujs_Makefile
Added Files:
        pkgsrc/print/mupdf/patches: patch-Makelists
            patch-source_fitz_color-lcms.c
Removed Files:
        pkgsrc/print/mupdf/patches: patch-source_pdf_pdf-parse.c
            patch-source_pdf_pdf-xref.c

Log Message:
mupdf: Update to 1.19.0

Changes:
1.19.0
------
 * Removed support for Luratech JBIG2 and JPEG2000 decoders.
 * Added 'extract' library for more output options:
     Added DOCX output format
     Added ODT output format
 * Notable new features:
     Journal for undo and redo
     Snapshot for auto-save and restore (for backgrounding mobile apps)
     Reflow document wrapper
     Rollover appearance for annotations and widgets
     Customize appearance of signed digital signatures
     Progress and cancel callbacks to OCR functions
     Create signature form fields
 * Minor new features:
     Support CJK fonts in pdfwrite output
     Support JBIG2 images in pdfwrite output
     Support opacity for all markup annotation types
     High-DPI aware UI in mupdf-gl
     mutool extract -a option to embed SMasks as alpha channel
 * API changes:
     Removed pdf_widget type alias (was always same as pdf_annot)
     Updated annotation 'dirty' logic
     Fix typo in function and type names: designated name -> distinguished name
     More functions available to 'mutool run'
     More functions available to Java library
 * New unicode scripts and fonts for EPUB:
     Dogra, Elymaic, Gondi, Hanifi Rohingya, Masaram Gondi,
     Medefaidrin, Nushu, Nyiakeng Puachue Hmong, Old Sogdian,
     Sogdian, Soyombo, Wancho, Yezidi, and Zanabazar Square.
 * C++ and Python bindings:
     C++ and Python bindings now work on Windows.
     Python bindings are available as pre-built binaries on pypi.org.
     Added demo PDF viewer using the Python MuPDF bindings and PyQt.
     Better access to data in generated wrapper classes.
     Improved handling of out-parameters in generated Python.
     Text representation of POD types via C++ operator<< and Python str().
     Fixed ref-counting bug in iterators.
     Updates for new MuPDF functions.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 pkgsrc/print/mupdf/Makefile
cvs rdiff -u -r1.21 -r1.22 pkgsrc/print/mupdf/PLIST
cvs rdiff -u -r1.42 -r1.43 pkgsrc/print/mupdf/buildlink3.mk
cvs rdiff -u -r1.54 -r1.55 pkgsrc/print/mupdf/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/print/mupdf/patches/patch-Makelists \
    pkgsrc/print/mupdf/patches/patch-source_fitz_color-lcms.c
cvs rdiff -u -r1.12 -r1.13 pkgsrc/print/mupdf/patches/patch-Makethird
cvs rdiff -u -r1.23 -r1.24 pkgsrc/print/mupdf/patches/patch-ab
cvs rdiff -u -r1.26 -r1.27 pkgsrc/print/mupdf/patches/patch-ac
cvs rdiff -u -r1.1 -r0 \
    pkgsrc/print/mupdf/patches/patch-source_pdf_pdf-parse.c
cvs rdiff -u -r1.3 -r0 pkgsrc/print/mupdf/patches/patch-source_pdf_pdf-xref.c
cvs rdiff -u -r1.7 -r1.8 \
    pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_Makefile

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.88 pkgsrc/print/mupdf/Makefile:1.89
--- pkgsrc/print/mupdf/Makefile:1.88    Wed Sep 29 19:00:12 2021
+++ pkgsrc/print/mupdf/Makefile Sat Oct 23 15:22:07 2021
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.88 2021/09/29 19:00:12 adam Exp $
+# $NetBSD: Makefile,v 1.89 2021/10/23 15:22:07 leot Exp $
 
-DISTNAME=      mupdf-1.18.0-source
+DISTNAME=      mupdf-1.19.0-source
 PKGNAME=       ${DISTNAME:S/-source//}
-PKGREVISION=   3
 CATEGORIES=    print
 MASTER_SITES=  https://mupdf.com/downloads/archive/
 
@@ -39,9 +38,11 @@ post-extract:
            ${WRKSRC}/thirdparty/gumbo-parser \
            ${WRKSRC}/thirdparty/harfbuzz \
            ${WRKSRC}/thirdparty/jbig2dec \
+           ${WRKSRC}/thirdparty/leptonica \
            ${WRKSRC}/thirdparty/lcms2 \
            ${WRKSRC}/thirdparty/libjpeg \
            ${WRKSRC}/thirdparty/openjpeg \
+           ${WRKSRC}/thirdparty/tesseract \
            ${WRKSRC}/thirdparty/zlib
 
 post-build:

Index: pkgsrc/print/mupdf/PLIST
diff -u pkgsrc/print/mupdf/PLIST:1.21 pkgsrc/print/mupdf/PLIST:1.22
--- pkgsrc/print/mupdf/PLIST:1.21       Thu Oct  8 22:50:16 2020
+++ pkgsrc/print/mupdf/PLIST    Sat Oct 23 15:22:07 2021
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.21 2020/10/08 22:50:16 leot Exp $
+@comment $NetBSD: PLIST,v 1.22 2021/10/23 15:22:07 leot Exp $
 bin/mupdf
 ${PLIST.curl}bin/mupdf-curl
 ${PLIST.opengl}bin/mupdf-gl
@@ -19,6 +19,7 @@ include/mupdf/fitz/crypt.h
 include/mupdf/fitz/device.h
 include/mupdf/fitz/display-list.h
 include/mupdf/fitz/document.h
+include/mupdf/fitz/export.h
 include/mupdf/fitz/filter.h
 include/mupdf/fitz/font.h
 include/mupdf/fitz/geometry.h
@@ -65,7 +66,6 @@ include/mupdf/pdf/interpret.h
 include/mupdf/pdf/javascript.h
 include/mupdf/pdf/name-table.h
 include/mupdf/pdf/object.h
-include/mupdf/pdf/output-pdf.h
 include/mupdf/pdf/page.h
 include/mupdf/pdf/parse.h
 include/mupdf/pdf/resource.h
@@ -112,9 +112,13 @@ share/doc/mupdf/manual-mutool-convert.ht
 share/doc/mupdf/manual-mutool-create.html
 share/doc/mupdf/manual-mutool-draw.html
 share/doc/mupdf/manual-mutool-extract.html
+share/doc/mupdf/manual-mutool-info.html
 share/doc/mupdf/manual-mutool-merge.html
+share/doc/mupdf/manual-mutool-pages.html
+share/doc/mupdf/manual-mutool-poster.html
 share/doc/mupdf/manual-mutool-run.html
 share/doc/mupdf/manual-mutool-show.html
+share/doc/mupdf/manual-mutool-sign.html
 share/doc/mupdf/manual-mutool-trace.html
 share/doc/mupdf/style.css
 share/doc/mupdf/template.html

Index: pkgsrc/print/mupdf/buildlink3.mk
diff -u pkgsrc/print/mupdf/buildlink3.mk:1.42 pkgsrc/print/mupdf/buildlink3.mk:1.43
--- pkgsrc/print/mupdf/buildlink3.mk:1.42       Wed Sep 29 19:00:12 2021
+++ pkgsrc/print/mupdf/buildlink3.mk    Sat Oct 23 15:22:07 2021
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.42 2021/09/29 19:00:12 adam Exp $
+# $NetBSD: buildlink3.mk,v 1.43 2021/10/23 15:22:07 leot Exp $
 
 BUILDLINK_TREE+=       mupdf
 
@@ -6,7 +6,7 @@ BUILDLINK_TREE+=        mupdf
 MUPDF_BUILDLINK3_MK:=
 
 BUILDLINK_API_DEPENDS.mupdf+=  mupdf>=1.14.0
-BUILDLINK_ABI_DEPENDS.mupdf?=  mupdf>=1.18.0nb3
+BUILDLINK_ABI_DEPENDS.mupdf?=  mupdf>=1.19.0
 BUILDLINK_PKGSRCDIR.mupdf?=    ../../print/mupdf
 
 pkgbase := mupdf

Index: pkgsrc/print/mupdf/distinfo
diff -u pkgsrc/print/mupdf/distinfo:1.54 pkgsrc/print/mupdf/distinfo:1.55
--- pkgsrc/print/mupdf/distinfo:1.54    Thu Oct  7 14:48:59 2021
+++ pkgsrc/print/mupdf/distinfo Sat Oct 23 15:22:07 2021
@@ -1,15 +1,15 @@
-$NetBSD: distinfo,v 1.54 2021/10/07 14:48:59 nia Exp $
+$NetBSD: distinfo,v 1.55 2021/10/23 15:22:07 leot Exp $
 
-RMD160 (mupdf-1.18.0-source.tar.gz) = 59fce4cd71417510ed997ce518e34f426e981951
-SHA512 (mupdf-1.18.0-source.tar.gz) = dd3d413badc5ea50ee100a39aa0265f2d096006e6466f3029ef5f4902e7a9f8e9f958b78ae484524233217ae6ef6ecf56431b8ac462d603a050c4e490503aef1
-Size (mupdf-1.18.0-source.tar.gz) = 72621417 bytes
-SHA1 (patch-Makethird) = 4d9eeba69db25be49d1652b826312a66eb8e2d5a
-SHA1 (patch-ab) = 7c4c8f809dcd79a75fbb6f2411596893cbd62b43
-SHA1 (patch-ac) = a65476612d200647342a870689205c241aeeb144
+RMD160 (mupdf-1.19.0-source.tar.gz) = 517eea21fd85bb0650dc1db10c881dee5f02794a
+SHA512 (mupdf-1.19.0-source.tar.gz) = c6bb0e4331212d5d01d2f5e04f7e981b195c144d282db99ddd3ae263ae2e5ff09a727b0b5a50942f1a21cacb46b23f76ff9fe00b67f5fab1eebe9d66158c5d09
+Size (mupdf-1.19.0-source.tar.gz) = 90778757 bytes
+SHA1 (patch-Makelists) = 474ad296aa550272b9d734e2b001af1371ae06ad
+SHA1 (patch-Makethird) = 415a3fe6e0e58a948565b9098c8325e85d19d561
+SHA1 (patch-ab) = 3323dd627001e76c47e6b231b2d93952e3c3acf3
+SHA1 (patch-ac) = 1bcbb499dd00cef04d3123daefe2d7b92b567054
 SHA1 (patch-ae) = c6b113818b32cb4470e8549c00a16e0b2f364ede
 SHA1 (patch-platform_gl_gl-app.h) = 48f48f13c9a6376231de25aa63411560ea9d91ca
 SHA1 (patch-platform_gl_gl-main.c) = c760d16f0ac4a9b09800869d22b7324724bc007b
+SHA1 (patch-source_fitz_color-lcms.c) = a43f5046063c68dea16824b9364c386505b6fadd
 SHA1 (patch-source_fitz_load-jpx.c) = 8d7f58168c8429a82127b821387298341a1fcbfb
-SHA1 (patch-source_pdf_pdf-parse.c) = 39441caeae75b61ff0b56aa839047dde34b05108
-SHA1 (patch-source_pdf_pdf-xref.c) = 7d7a9650f63061edbc7659ce65401569642bd6e6
-SHA1 (patch-thirdparty_mujs_Makefile) = 8ff3cc67a60b648841b074846bd6e7de943fd034
+SHA1 (patch-thirdparty_mujs_Makefile) = e959ad04995bf2268563d2c2939edd5dba12e4b2

Index: pkgsrc/print/mupdf/patches/patch-Makethird
diff -u pkgsrc/print/mupdf/patches/patch-Makethird:1.12 pkgsrc/print/mupdf/patches/patch-Makethird:1.13
--- pkgsrc/print/mupdf/patches/patch-Makethird:1.12     Thu Oct  8 22:50:16 2020
+++ pkgsrc/print/mupdf/patches/patch-Makethird  Sat Oct 23 15:22:07 2021
@@ -1,25 +1,38 @@
-$NetBSD: patch-Makethird,v 1.12 2020/10/08 22:50:16 leot Exp $
+$NetBSD: patch-Makethird,v 1.13 2021/10/23 15:22:07 leot Exp $
 
-- Do not pass thirdparty lcms2 CFLAGS (mupdf is always built without lcms2)
-- mujs building support with libtool
+- Avoid to need third party lcms2
+- Add mujs building support with libtool
 
---- Makethird.orig     2020-10-07 10:35:03.000000000 +0000
+--- Makethird.orig     2021-10-05 10:44:43.000000000 +0000
 +++ Makethird
-@@ -284,8 +284,6 @@ else
- 
- THIRD_SRC += $(sort $(wildcard thirdparty/lcms2/src/cms*.c))
- 
--THIRD_CFLAGS += -Ithirdparty/lcms2/include -DHAVE_LCMS2MT
--
- $(OUT)/thirdparty/lcms2/%.o: thirdparty/lcms2/%.c
-       $(CC_CMD) $(LIB_CFLAGS) -Ithirdparty/lcms2/include
- 
-@@ -301,7 +299,7 @@ else
- THIRD_SRC += thirdparty/mujs/one.c
- THIRD_CFLAGS += -Ithirdparty/mujs
+@@ -120,12 +120,6 @@ endif
+ ifeq ($(USE_SYSTEM_LCMS2),yes)
+   THIRD_CFLAGS += $(SYS_LCMS2_CFLAGS)
+   THIRD_LIBS += $(SYS_LCMS2_LIBS)
+-else
+-  THIRD_CFLAGS += $(LCMS2_CFLAGS)
+-  THIRD_LIBS += $(LCMS2_LIBS)
+-  THIRD_SRC += $(LCMS2_SRC)
+-$(OUT)/thirdparty/lcms2/%.o: thirdparty/lcms2/%.c
+-      $(CC_CMD) $(LIB_CFLAGS) $(LCMS2_CFLAGS) $(LCMS2_BUILD_CFLAGS)
+ endif
  
+ # --- MuJS ---
+@@ -137,7 +131,7 @@ else
+   THIRD_CFLAGS += $(MUJS_CFLAGS)
+   THIRD_LIBS += $(MUJS_LIBS)
+   THIRD_SRC += $(MUJS_SRC)
 -$(OUT)/thirdparty/mujs/%.o: thirdparty/mujs/%.c
 +$(OUT)/thirdparty/mujs/%.lo: thirdparty/mujs/%.c
-       $(CC_CMD) $(LIB_CFLAGS)
- 
+       $(CC_CMD) $(LIB_CFLAGS) $(MUJS_CFLAGS) $(MUJS_BUILD_CFLAGS)
  endif
+ 
+@@ -241,7 +235,7 @@ endif
+ THIRD_CFLAGS += $(EXTRACT_CFLAGS)
+ THIRD_LIBS += $(EXTRACT_LIBS)
+ THIRD_SRC += $(EXTRACT_SRC)
+-$(OUT)/thirdparty/extract/%.o: thirdparty/extract/%.c
++$(OUT)/thirdparty/extract/%.lo: thirdparty/extract/%.c
+       $(CC_CMD) $(WARNING_CFLAGS) $(LIB_CFLAGS) $(EXTRACT_CFLAGS) $(ZLIB_CFLAGS) $(EXTRACT_BUILD_CFLAGS)
+ 
+ # The first python3 command in the next two rules returns 0 (success) iff

Index: pkgsrc/print/mupdf/patches/patch-ab
diff -u pkgsrc/print/mupdf/patches/patch-ab:1.23 pkgsrc/print/mupdf/patches/patch-ab:1.24
--- pkgsrc/print/mupdf/patches/patch-ab:1.23    Thu Oct  8 22:50:16 2020
+++ pkgsrc/print/mupdf/patches/patch-ab Sat Oct 23 15:22:07 2021
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.23 2020/10/08 22:50:16 leot Exp $
+$NetBSD: patch-ab,v 1.24 2021/10/23 15:22:07 leot 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
@@ -14,11 +14,11 @@ $NetBSD: patch-ab,v 1.23 2020/10/08 22:5
   If no lcms2 is available just pass `-DFZ_ENABLE_ICC=0' to disable it via
   CFLAGS.
 
---- Makerules.orig     2020-10-07 10:35:03.000000000 +0000
+--- Makerules.orig     2021-10-05 10:44:43.000000000 +0000
 +++ Makerules
-@@ -6,19 +6,6 @@ OS := $(OS:MSYS%=MINGW)
- OS := $(OS:Windows_NT=MINGW)
- OS := $(OS:Darwin=MACOS)
+@@ -27,29 +27,6 @@ endif
+ 
+ # System specific features
  
 -ifeq ($(findstring -fembed-bitcode,$(XCFLAGS)),)
 -  # clang does not support these in combination with -fembed-bitcode
@@ -30,13 +30,23 @@ $NetBSD: patch-ab,v 1.23 2020/10/08 22:5
 -  SO := dylib
 -else
 -  LDREMOVEUNREACH := -Wl,--gc-sections
--  SO := so
+-  ifeq ($(OS),MINGW)
+-    SO := dll
+-  else
+-    SO := so
+-  endif
+-endif
+-
+-ifeq "$(OS)" "ios"
+-  NEONFLAGS =
+-else
+-  NEONFLAGS = -mneon
 -endif
 -
- CFLAGS += -Wsign-compare
- 
  SANITIZE_FLAGS += -fsanitize=address
-@@ -102,93 +89,79 @@ ifneq "$(CLUSTER)" ""
+ SANITIZE_FLAGS += -fsanitize=leak
+ 
+@@ -132,103 +109,79 @@ ifneq "$(CLUSTER)" ""
    CFLAGS += -DCLUSTER
  endif
  
@@ -53,10 +63,20 @@ $NetBSD: patch-ab,v 1.23 2020/10/08 22:5
 -  LD = xcrun ld
 -  RANLIB = xcrun ranlib
 -
--else ifeq ($(OS),Linux)
--  HAVE_OBJCOPY := yes
+-  ifeq (, $(shell which 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
 +HAVE_OBJCOPY := no
  
+-else ifeq ($(OS),Linux)
+-  HAVE_OBJCOPY := yes
+-
 -  ifeq ($(shell pkg-config --exists freetype2 && echo yes),yes)
 +ifeq ($(shell pkg-config --exists freetype2 && echo yes),yes)
        SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2)
@@ -102,19 +122,19 @@ $NetBSD: patch-ab,v 1.23 2020/10/08 22:5
 -  endif
 +endif
  
--  HAVE_LEPTONICA := $(shell pkg-config --exists 'lept >= 1.7.4' && echo yes)
--  ifeq ($(HAVE_LEPTONICA),yes)
-+HAVE_LEPTONICA := $(shell pkg-config --exists 'lept >= 1.7.4' && echo yes)
-+ifeq ($(HAVE_LEPTONICA),yes)
+-  HAVE_SYS_LEPTONICA := $(shell pkg-config --exists 'lept >= 1.7.4' && echo yes)
+-  ifeq ($(HAVE_SYS_LEPTONICA),yes)
++HAVE_SYS_LEPTONICA := $(shell pkg-config --exists 'lept >= 1.7.4' && echo yes)
++ifeq ($(HAVE_SYS_LEPTONICA),yes)
        SYS_LEPTONICA_CFLAGS := $(shell pkg-config --cflags lept)
        SYS_LEPTONICA_LIBS := $(shell pkg-config --libs lept)
 -  endif
 +endif
  
--  HAVE_TESSERACT := $(shell pkg-config --exists 'tesseract-ocr >= 4.0.0' && echo yes)
--  ifeq ($(HAVE_TESSERACT),yes)
-+HAVE_TESSERACT := $(shell pkg-config --exists 'tesseract-ocr >= 4.0.0' && echo yes)
-+ifeq ($(HAVE_TESSERACT),yes)
+-  HAVE_SYS_TESSERACT := $(shell pkg-config --exists 'tesseract >= 4.0.0' && echo yes)
+-  ifeq ($(HAVE_SYS_TESSERACT),yes)
++HAVE_SYS_TESSERACT := $(shell pkg-config --exists 'tesseract >= 4.0.0' && echo yes)
++ifeq ($(HAVE_SYS_TESSERACT),yes)
        SYS_TESSERACT_CFLAGS := $(shell pkg-config --cflags tesseract)
        SYS_TESSERACT_LIBS := $(shell pkg-config --libs tesseract)
 -  endif
@@ -131,11 +151,13 @@ $NetBSD: patch-ab,v 1.23 2020/10/08 22:5
  
 -  HAVE_GLUT := yes
 -  ifeq ($(HAVE_GLUT),yes)
-+HAVE_GLUT := yes
-+ifeq ($(HAVE_GLUT),yes)
-       SYS_GLUT_CFLAGS :=
-       SYS_GLUT_LIBS := -lglut -lGL
+-      SYS_GLUT_CFLAGS :=
+-      SYS_GLUT_LIBS := -lglut -lGL
 -  endif
++HAVE_GLUT := $(shell pkg-config --exists glut && echo yes)
++ifeq ($(shell pkg-config --exists glut && echo yes),yes)
++      SYS_GLUT_CFLAGS := $(shell pkg-config --cflags glut)
++      SYS_GLUT_LIBS := $(shell pkg-config --libs glut)
 +endif
  
 -  HAVE_X11 := $(shell pkg-config --exists x11 xext && echo yes)

Index: pkgsrc/print/mupdf/patches/patch-ac
diff -u pkgsrc/print/mupdf/patches/patch-ac:1.26 pkgsrc/print/mupdf/patches/patch-ac:1.27
--- pkgsrc/print/mupdf/patches/patch-ac:1.26    Thu Oct  8 22:50:16 2020
+++ pkgsrc/print/mupdf/patches/patch-ac Sat Oct 23 15:22:07 2021
@@ -1,4 +1,4 @@
-$NetBSD: patch-ac,v 1.26 2020/10/08 22:50:16 leot Exp $
+$NetBSD: patch-ac,v 1.27 2021/10/23 15:22:07 leot Exp $
 
 - libtool support 
 - Install target cleanup
@@ -8,9 +8,9 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
   be invoked during the building phase)
 - Install mupdf with curl support as `mupdf-curl'
 
---- Makefile.orig      2020-10-07 10:35:03.000000000 +0000
+--- Makefile.orig      2021-10-05 10:44:43.000000000 +0000
 +++ Makefile
-@@ -55,20 +55,20 @@ ifneq ($(verbose),yes)
+@@ -54,13 +54,13 @@ ifneq ($(verbose),yes)
  endif
  
  MKTGTDIR = mkdir -p $(dir $@)
@@ -18,16 +18,26 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
 -CXX_CMD = $(QUIET_CXX) $(MKTGTDIR) ; $(CXX) $(CFLAGS) $(XCXXFLAGS) -MMD -MP -o $@ -c $<
 -AR_CMD = $(QUIET_AR) $(MKTGTDIR) ; $(AR) cr $@ $^
 +CC_CMD = $(QUIET_CC) $(MKTGTDIR) ; $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
-+CXX_CMD = $(QUIET_CXX) $(MKTGTDIR) ; $(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) -MMD -MP -o $@ -c $<
++CXX_CMD = $(QUIET_CXX) $(MKTGTDIR) ; $(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) $(XCXXFLAGS) -MMD -MP -o $@ -c $<
 +AR_CMD = $(QUIET_AR) $(MKTGTDIR) ; $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ -version-info 0:0:0 -rpath $(PREFIX)/lib $^
  ifdef RANLIB
    RANLIB_CMD = $(QUIET_RANLIB) $(RANLIB) $@
  endif
 -LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
 +LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
- TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p
+ TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p --exclude=platform/python --exclude=platform/c++
  WINDRES_CMD = $(QUIET_WINDRES) $(MKTGTDIR) ; $(WINDRES) $< $@
  OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -z noexecstack -o $@ $<
+@@ -68,7 +68,7 @@ GENDEF_CMD = $(QUIET_GENDEF) gendef - $<
+ DLLTOOL_CMD = $(QUIET_DLLTOOL) dlltool -d $< -D $(notdir $(^:%.def=%.dll)) -l $@
+ 
+ ifeq ($(shared),yes)
+-LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ \
++LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ \
+       $(filter-out %.$(SO),$^) \
+       $(sort $(patsubst %,-L%,$(dir $(filter %.$(SO),$^)))) \
+       $(patsubst lib%.$(SO),-l%,$(notdir $(filter %.$(SO),$^))) \
+@@ -77,7 +77,7 @@ endif
  
  # --- Rules ---
  
@@ -36,55 +46,60 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
        $(AR_CMD)
        $(RANLIB_CMD)
  
-@@ -78,52 +78,52 @@ $(OUT)/%.exe: %.c
- $(OUT)/%.$(SO):
-       $(LINK_CMD) $(LIB_LDFLAGS) $(THIRD_LIBS) $(LIBCRYPTO_LIBS)
+@@ -93,57 +93,57 @@ $(OUT)/%.def: $(OUT)/%.$(SO)
+ $(OUT)/%_$(SO).a: $(OUT)/%.def
+       $(DLLTOOL_CMD)
  
 -$(OUT)/source/helpers/mu-threads/%.o : source/helpers/mu-threads/%.c
 +$(OUT)/source/helpers/mu-threads/%.lo : source/helpers/mu-threads/%.c
-       $(CC_CMD) $(LIB_CFLAGS) $(THREADING_CFLAGS)
+       $(CC_CMD) $(WARNING_CFLAGS) $(LIB_CFLAGS) $(THREADING_CFLAGS)
  
 -$(OUT)/source/helpers/pkcs7/%.o : source/helpers/pkcs7/%.c
 +$(OUT)/source/helpers/pkcs7/%.lo : source/helpers/pkcs7/%.c
-       $(CC_CMD) $(LIB_CFLAGS) $(LIBCRYPTO_CFLAGS)
+       $(CC_CMD) $(WARNING_CFLAGS) $(LIB_CFLAGS) $(LIBCRYPTO_CFLAGS)
  
 -$(OUT)/source/tools/%.o : source/tools/%.c
 +$(OUT)/source/tools/%.lo : source/tools/%.c
-       $(CC_CMD) -Wall $(THIRD_CFLAGS) $(THREADING_CFLAGS)
+       $(CC_CMD) $(WARNING_CFLAGS) $(THIRD_CFLAGS) $(THREADING_CFLAGS)
  
 -$(OUT)/generated/%.o : generated/%.c
+-      $(CC_CMD) $(WARNING_CFLAGS) $(LIB_CFLAGS) -O0
 +$(OUT)/generated/%.lo : generated/%.c
-       $(CC_CMD) $(LIB_CFLAGS) -O0
++      $(CC_CMD) $(WARNING_CFLAGS) $(LIB_CFLAGS)
  
 -$(OUT)/platform/x11/%.o : platform/x11/%.c
 +$(OUT)/platform/x11/%.lo : platform/x11/%.c
-       $(CC_CMD) -Wall $(X11_CFLAGS)
+       $(CC_CMD) $(WARNING_CFLAGS) $(X11_CFLAGS)
  
 -$(OUT)/platform/x11/curl/%.o : platform/x11/%.c
 +$(OUT)/platform/x11/curl/%.lo : platform/x11/%.c
-       $(CC_CMD) -Wall $(X11_CFLAGS) $(CURL_CFLAGS) -DHAVE_CURL
+       $(CC_CMD) $(WARNING_CFLAGS) $(X11_CFLAGS) $(CURL_CFLAGS)
  
 -$(OUT)/platform/gl/%.o : platform/gl/%.c
 +$(OUT)/platform/gl/%.lo : platform/gl/%.c
-       $(CC_CMD) -Wall $(THIRD_CFLAGS) $(GLUT_CFLAGS)
+       $(CC_CMD) $(WARNING_CFLAGS) $(THIRD_CFLAGS) $(THIRD_GLUT_CFLAGS)
  
  ifeq ($(HAVE_OBJCOPY),yes)
 -  $(OUT)/source/fitz/noto.o : source/fitz/noto.c
 +  $(OUT)/source/fitz/noto.lo : source/fitz/noto.c
-       $(CC_CMD) -Wall -Wdeclaration-after-statement -DHAVE_OBJCOPY $(LIB_CFLAGS) $(THIRD_CFLAGS)
+       $(CC_CMD) $(WARNING_CFLAGS) -Wdeclaration-after-statement -DHAVE_OBJCOPY $(LIB_CFLAGS) $(THIRD_CFLAGS)
  endif
  
+-$(OUT)/source/fitz/memento.o : source/fitz/memento.c
++$(OUT)/source/fitz/memento.lo : source/fitz/memento.c
+       $(CC_CMD) $(WARNING_CFLAGS) $(LIB_CFLAGS) $(THIRD_CFLAGS) -DMEMENTO_MUPDF_HACKS
+ 
 -$(OUT)/source/%.o : source/%.c
 +$(OUT)/source/%.lo : source/%.c
-       $(CC_CMD) -Wall -Wdeclaration-after-statement $(LIB_CFLAGS) $(THIRD_CFLAGS)
+       $(CC_CMD) $(WARNING_CFLAGS) -Wdeclaration-after-statement $(LIB_CFLAGS) $(THIRD_CFLAGS)
  
 -$(OUT)/source/%.o : source/%.cpp
 +$(OUT)/source/%.lo : source/%.cpp
-       $(CXX_CMD) -Wall $(LIB_CFLAGS) $(THIRD_CFLAGS)
+       $(CXX_CMD) $(WARNING_CFLAGS) $(LIB_CFLAGS) $(THIRD_CFLAGS) $(TESSERACT_BUILD_CFLAGS)
  
 -$(OUT)/platform/%.o : platform/%.c
 +$(OUT)/platform/%.lo : platform/%.c
-       $(CC_CMD) -Wall
+       $(CC_CMD) $(WARNING_CFLAGS)
  
 -$(OUT)/%.o: %.rc
 +$(OUT)/%.lo: %.rc
@@ -103,10 +118,13 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
 +THIRD_OBJ := $(THIRD_OBJ:%.cc=$(OUT)/%.lo)
 +THIRD_OBJ := $(THIRD_OBJ:%.cpp=$(OUT)/%.lo)
  
+-THIRD_GLUT_OBJ := $(THIRD_GLUT_SRC:%.c=$(OUT)/%.o)
++THIRD_GLUT_OBJ := $(THIRD_GLUT_SRC:%.c=$(OUT)/%.lo)
+ 
  MUPDF_SRC := $(sort $(wildcard source/fitz/*.c))
  MUPDF_SRC += $(sort $(wildcard source/fitz/*.cpp))
-@@ -133,15 +133,15 @@ MUPDF_SRC += $(sort $(wildcard source/sv
- MUPDF_SRC += $(sort $(wildcard source/html/*.c))
+@@ -154,14 +154,14 @@ MUPDF_SRC += $(sort $(wildcard source/ht
+ MUPDF_SRC += $(sort $(wildcard source/reflow/*.c))
  MUPDF_SRC += $(sort $(wildcard source/cbz/*.c))
  
 -MUPDF_OBJ := $(MUPDF_SRC:%.c=$(OUT)/%.o)
@@ -118,14 +136,13 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
 -THREAD_OBJ := $(THREAD_SRC:%.c=$(OUT)/%.o)
 +THREAD_OBJ := $(THREAD_SRC:%.c=$(OUT)/%.lo)
  
- PKCS7_SRC := source/helpers/pkcs7/pkcs7-check.c
  PKCS7_SRC += source/helpers/pkcs7/pkcs7-openssl.c
 -PKCS7_OBJ := $(PKCS7_SRC:%.c=$(OUT)/%.o)
 +PKCS7_OBJ := $(PKCS7_SRC:%.c=$(OUT)/%.lo)
  
  # --- Generated embedded font files ---
  
-@@ -162,13 +162,13 @@ generated/%.ttf.c : %.ttf $(HEXDUMP_EXE)
+@@ -182,13 +182,13 @@ generated/%.ttf.c : %.ttf $(HEXDUMP_EXE)
  generated/%.ttc.c : %.ttc $(HEXDUMP_EXE) ; $(QUIET_GEN) $(MKTGTDIR) ; $(HEXDUMP_EXE) -s $@ $<
  
  ifeq ($(HAVE_OBJCOPY),yes)
@@ -145,31 +162,41 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
  endif
  
  generate: $(FONT_GEN)
-@@ -214,10 +214,10 @@ MUPDF_LIB = $(OUT)/libmupdf.$(SO)
+@@ -242,24 +242,24 @@ else
+ LIBS_TO_INSTALL_IN_LIB = $(MUPDF_LIB)
+ endif
+ ifneq ($(USE_SYSTEM_GLUT),yes)
+-THIRD_GLUT_LIB = $(OUT)/libmupdf-glut.a
++THIRD_GLUT_LIB = $(OUT)/libmupdf-glut.la
+ endif
+-THREAD_LIB = $(OUT)/libmupdf-threads.a
+-PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a
++THREAD_LIB = $(OUT)/libmupdf-threads.la
++PKCS7_LIB = $(OUT)/libmupdf-pkcs7.la
  
- $(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ) $(THREAD_OBJ) $(PKCS7_OBJ)
+ $(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ)
+ $(THIRD_GLUT_LIB) : $(THIRD_GLUT_OBJ)
+ $(THREAD_LIB) : $(THREAD_OBJ)
+ $(PKCS7_LIB) : $(PKCS7_OBJ)
  else
 -MUPDF_LIB = $(OUT)/libmupdf.a
+-LIBS_TO_INSTALL_IN_LIB = $(MUPDF_LIB) $(THIRD_LIB)
 -THIRD_LIB = $(OUT)/libmupdf-third.a
--THREAD_LIB = $(OUT)/libmupdf-threads.a
--PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a
 +MUPDF_LIB = $(OUT)/libmupdf.la
++LIBS_TO_INSTALL_IN_LIB = $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) $(PKCS7_LIB)
 +THIRD_LIB = $(OUT)/libmupdf-third.la
+ ifneq ($(USE_SYSTEM_GLUT),yes)
+-THIRD_GLUT_LIB = $(OUT)/libmupdf-glut.a
++THIRD_GLUT_LIB = $(OUT)/libmupdf-glut.la
+ endif
+-THREAD_LIB = $(OUT)/libmupdf-threads.a
+-PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a
 +THREAD_LIB = $(OUT)/libmupdf-threads.la
 +PKCS7_LIB = $(OUT)/libmupdf-pkcs7.la
  
  $(MUPDF_LIB) : $(MUPDF_OBJ)
  $(THIRD_LIB) : $(THIRD_OBJ)
-@@ -230,7 +230,7 @@ $(THIRD_LIB) : $(THIRD_OBJ)
- $(THREAD_LIB) : $(THREAD_OBJ)
- $(PKCS7_LIB) : $(PKCS7_OBJ)
- 
--INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB)
-+INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) $(PKCS7_LIB)
- 
- # --- Main tools and viewers ---
- 
-@@ -241,13 +241,13 @@ MUTOOL_SRC += source/tools/murun.c
+@@ -282,13 +282,13 @@ MUTOOL_SRC += source/tools/murun.c
  MUTOOL_SRC += source/tools/mutrace.c
  MUTOOL_SRC += source/tools/cmapdump.c
  MUTOOL_SRC += $(sort $(wildcard source/tools/pdf*.c))
@@ -185,16 +212,16 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
  MURASTER_EXE := $(OUT)/muraster
  $(MURASTER_EXE) : $(MURASTER_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(PKCS7_LIB) $(THREAD_LIB)
        $(LINK_CMD) $(THIRD_LIBS) $(THREADING_LIBS) $(LIBCRYPTO_LIBS)
-@@ -255,7 +255,7 @@ TOOL_APPS += $(MURASTER_EXE)
+@@ -296,7 +296,7 @@ TOOL_APPS += $(MURASTER_EXE)
  
  ifeq ($(HAVE_GLUT),yes)
    MUVIEW_GLUT_SRC += $(sort $(wildcard platform/gl/*.c))
 -  MUVIEW_GLUT_OBJ := $(MUVIEW_GLUT_SRC:%.c=$(OUT)/%.o)
 +  MUVIEW_GLUT_OBJ := $(MUVIEW_GLUT_SRC:%.c=$(OUT)/%.lo)
    MUVIEW_GLUT_EXE := $(OUT)/mupdf-gl
-   $(MUVIEW_GLUT_EXE) : $(MUVIEW_GLUT_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(PKCS7_LIB) $(GLUT_LIB)
-       $(LINK_CMD) $(THIRD_LIBS) $(LIBCRYPTO_LIBS) $(WIN32_LDFLAGS) $(GLUT_LIBS)
-@@ -263,10 +263,10 @@ ifeq ($(HAVE_GLUT),yes)
+   $(MUVIEW_GLUT_EXE) : $(MUVIEW_GLUT_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(THIRD_GLUT_LIB) $(PKCS7_LIB)
+       $(LINK_CMD) $(THIRD_LIBS) $(LIBCRYPTO_LIBS) $(WIN32_LDFLAGS) $(THIRD_GLUT_LIBS)
+@@ -304,10 +304,10 @@ ifeq ($(HAVE_GLUT),yes)
  endif
  
  ifeq ($(HAVE_X11),yes)
@@ -209,7 +236,7 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
    $(MUVIEW_X11_EXE) : $(MUVIEW_X11_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(PKCS7_LIB)
        $(LINK_CMD) $(THIRD_LIBS) $(X11_LIBS) $(LIBCRYPTO_LIBS)
    VIEW_APPS += $(MUVIEW_X11_EXE)
-@@ -274,9 +274,9 @@ endif
+@@ -315,9 +315,9 @@ endif
  
  ifeq ($(HAVE_WIN32),yes)
    MUVIEW_WIN32_EXE := $(OUT)/mupdf-w32
@@ -222,7 +249,7 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
    $(MUVIEW_WIN32_EXE) : $(MUVIEW_WIN32_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(PKCS7_LIB)
        $(LINK_CMD) $(THIRD_LIBS) $(WIN32_LDFLAGS) $(WIN32_LIBS) $(LIBCRYPTO_LIBS)
    VIEW_APPS += $(MUVIEW_WIN32_EXE)
-@@ -285,12 +285,12 @@ endif
+@@ -326,12 +326,12 @@ endif
  ifeq ($(HAVE_X11),yes)
  ifeq ($(HAVE_CURL),yes)
  ifeq ($(HAVE_PTHREAD),yes)
@@ -241,7 +268,7 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
    $(MUVIEW_X11_CURL_EXE) : $(MUVIEW_X11_CURL_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(PKCS7_LIB) $(CURL_LIB)
        $(LINK_CMD) $(THIRD_LIBS) $(X11_LIBS) $(LIBCRYPTO_LIBS) $(CURL_LIBS) $(PTHREAD_LIBS)
    VIEW_APPS += $(MUVIEW_X11_CURL_EXE)
-@@ -300,19 +300,19 @@ endif
+@@ -341,19 +341,19 @@ endif
  
  # --- Generated dependencies ---
  
@@ -249,7 +276,7 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
 --include $(PKCS7_OBJ:%.o=%.d)
 --include $(THREAD_OBJ:%.o=%.d)
 --include $(THIRD_OBJ:%.o=%.d)
---include $(GLUT_OBJ:%.o=%.d)
+--include $(THIRD_GLUT_OBJ:%.o=%.d)
 -
 --include $(MUTOOL_OBJ:%.o=%.d)
 --include $(MUVIEW_GLUT_OBJ:%.o=%.d)
@@ -259,7 +286,7 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
 +-include $(PKCS7_OBJ:%.lo=%.d)
 +-include $(THREAD_OBJ:%.lo=%.d)
 +-include $(THIRD_OBJ:%.lo=%.d)
-+-include $(GLUT_OBJ:%.lo=%.d)
++-include $(THIRD_GLUT_OBJ:%.lo=%.d)
 +
 +-include $(MUTOOL_OBJ:%.lo=%.d)
 +-include $(MUVIEW_GLUT_OBJ:%.lo=%.d)
@@ -273,7 +300,7 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
  
  # --- Examples ---
  
-@@ -325,10 +325,10 @@ $(OUT)/multi-threaded: docs/examples/mul
+@@ -366,10 +366,10 @@ $(OUT)/multi-threaded: docs/examples/mul
  
  # --- Update version string header ---
  
@@ -288,7 +315,7 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
  
  # --- Format man pages ---
  
-@@ -356,27 +356,30 @@ tools: $(TOOL_APPS)
+@@ -397,29 +397,33 @@ tools: $(TOOL_APPS)
  apps: $(TOOL_APPS) $(VIEW_APPS)
  
  install: libs apps
@@ -298,12 +325,20 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
 -      install -m 644 include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf
 -      install -m 644 include/mupdf/fitz/*.h $(DESTDIR)$(incdir)/mupdf/fitz
 -      install -m 644 include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf
--
++      ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(incdir)/mupdf
++      ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(incdir)/mupdf/fitz
++      ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(incdir)/mupdf/pdf
++      ${BSD_INSTALL_DATA} include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf
++      ${BSD_INSTALL_DATA} include/mupdf/fitz/*.h $(DESTDIR)$(incdir)/mupdf/fitz
++      ${BSD_INSTALL_DATA} include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf
+ 
+ ifneq ($(LIBS_TO_INSTALL_IN_LIB),)
 -      install -d $(DESTDIR)$(libdir)
--      install -m 644 $(INSTALL_LIBS) $(DESTDIR)$(libdir)
+-      install -m 644 $(LIBS_TO_INSTALL_IN_LIB) $(DESTDIR)$(libdir)
+-endif
 -
 -      install -d $(DESTDIR)$(bindir)
--      install -m 755 $(TOOL_APPS) $(VIEW_APPS) $(DESTDIR)$(bindir)
+-      install -m 755 $(LIBS_TO_INSTALL_IN_BIN) $(TOOL_APPS) $(VIEW_APPS) $(DESTDIR)$(bindir)
 -
 -      install -d $(DESTDIR)$(mandir)/man1
 -      install -m 644 docs/man/*.1 $(DESTDIR)$(mandir)/man1
@@ -313,26 +348,21 @@ $NetBSD: patch-ac,v 1.26 2020/10/08 22:5
 -      install -m 644 README COPYING CHANGES $(DESTDIR)$(docdir)
 -      install -m 644 docs/*.html docs/*.css docs/*.png $(DESTDIR)$(docdir)
 -      install -m 644 docs/examples/* $(DESTDIR)$(docdir)/examples
-+      ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(incdir)/mupdf
-+      ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(incdir)/mupdf/fitz
-+      ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(incdir)/mupdf/pdf
-+      ${BSD_INSTALL_DATA} include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf
-+      ${BSD_INSTALL_DATA} include/mupdf/fitz/*.h $(DESTDIR)$(incdir)/mupdf/fitz
-+      ${BSD_INSTALL_DATA} include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf
-+
-+      ${BSD_INSTALL_LIB_DIR} $(DESTDIR)$(libdir)
-+      for f in $(INSTALL_LIBS); do \
++      ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(libdir)
++      for f in $(LIBS_TO_INSTALL_IN_LIB); do \
 +              ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} $$f $(DESTDIR)$(libdir); \
 +      done
++endif
 +
-+      ${BSD_INSTALL_PROGRAM_DIR} $(DESTDIR)$(bindir)
-+      for f in $(TOOL_APPS) $(VIEW_APPS); do \
++      ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(bindir)
++      for f in $(LIBS_TO_INSTALL_IN_BIN) $(TOOL_APPS) $(VIEW_APPS); do \
 +              ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} $$f $(DESTDIR)$(bindir); \
 +      done
 +
 +      ${BSD_INSTALL_MAN_DIR} $(DESTDIR)$(mandir)/man1
 +      ${BSD_INSTALL_MAN} docs/man/*.1 $(DESTDIR)$(mandir)/man1
 +
++      ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)
 +      ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)/examples
 +      ${BSD_INSTALL_DATA} README COPYING CHANGES $(DESTDIR)$(docdir)
 +      ${BSD_INSTALL_DATA} docs/*.html docs/*.css docs/*.png $(DESTDIR)$(docdir)

Index: pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_Makefile
diff -u pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_Makefile:1.7 pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_Makefile:1.8
--- pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_Makefile:1.7       Thu May  7 20:42:57 2020
+++ pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_Makefile   Sat Oct 23 15:22:07 2021
@@ -1,11 +1,11 @@
-$NetBSD: patch-thirdparty_mujs_Makefile,v 1.7 2020/05/07 20:42:57 leot Exp $
+$NetBSD: patch-thirdparty_mujs_Makefile,v 1.8 2021/10/23 15:22:07 leot Exp $
 
 - Add libtool support to mujs.
 - Avoid to set (unused) VERSION variable.
 
---- thirdparty/mujs/Makefile.orig      2020-03-17 13:10:18.000000000 +0000
+--- thirdparty/mujs/Makefile.orig      2021-06-08 11:41:51.000000000 +0000
 +++ thirdparty/mujs/Makefile
-@@ -7,12 +7,6 @@ bindir ?= $(prefix)/bin
+@@ -9,12 +9,6 @@ bindir ?= $(prefix)/bin
  incdir ?= $(prefix)/include
  libdir ?= $(prefix)/lib
  
@@ -18,7 +18,7 @@ $NetBSD: patch-thirdparty_mujs_Makefile,
  # Compiler flags for various configurations:
  
  CFLAGS := -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter
-@@ -51,7 +45,7 @@ HDRS := $(wildcard js*.h mujs.h utf.h re
+@@ -54,7 +48,7 @@ HDRS := $(wildcard js*.h mujs.h utf.h re
  
  default: shell
  shell: $(OUT)/mujs $(OUT)/mujs-pp
@@ -27,28 +27,28 @@ $NetBSD: patch-thirdparty_mujs_Makefile,
  shared: $(OUT)/libmujs.so
  
  astnames.h: jsparse.h
-@@ -65,15 +59,15 @@ one.c: $(SRCS)
+@@ -68,15 +62,15 @@ one.c: $(SRCS)
  
  jsdump.c: astnames.h opnames.h
  
 -$(OUT)/%.o: %.c $(HDRS)
 +$(OUT)/%.lo: %.c $(HDRS)
        @ mkdir -p $(dir $@)
-       $(CC) $(CFLAGS) -o $@ -c $<
+       $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
  
 -$(OUT)/libmujs.o: one.c $(HDRS)
 +$(OUT)/libmujs.lo: one.c $(HDRS)
        @ mkdir -p $(dir $@)
-       $(CC) $(CFLAGS) -o $@ -c $<
+       $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
  
 -$(OUT)/libmujs.a: $(OUT)/libmujs.o
 +$(OUT)/libmujs.la: $(OUT)/libmujs.lo
        @ mkdir -p $(dir $@)
        $(AR) cr $@ $^
  
-@@ -81,11 +75,11 @@ $(OUT)/libmujs.so: one.c $(HDRS)
+@@ -84,11 +78,11 @@ $(OUT)/libmujs.so: one.c $(HDRS)
        @ mkdir -p $(dir $@)
-       $(CC) $(CFLAGS) -fPIC -shared -o $@ $< -lm
+       $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -shared $(LDFLAGS) -o $@ $< -lm
  
 -$(OUT)/mujs: $(OUT)/libmujs.o $(OUT)/main.o
 +$(OUT)/mujs: $(OUT)/libmujs.lo $(OUT)/main.lo
@@ -60,7 +60,7 @@ $NetBSD: patch-thirdparty_mujs_Makefile,
        @ mkdir -p $(dir $@)
        $(CC) $(LDFLAGS) -o $@ $^ -lm
  
-@@ -111,8 +105,8 @@ install-common: $(OUT)/mujs $(OUT)/mujs.
+@@ -114,8 +108,8 @@ install-common: $(OUT)/mujs $(OUT)/mujs.
        install -m 644 $(OUT)/mujs.pc $(DESTDIR)$(libdir)/pkgconfig
        install -m 755 $(OUT)/mujs $(DESTDIR)$(bindir)
  

Added files:

Index: pkgsrc/print/mupdf/patches/patch-Makelists
diff -u /dev/null pkgsrc/print/mupdf/patches/patch-Makelists:1.1
--- /dev/null   Sat Oct 23 15:22:07 2021
+++ pkgsrc/print/mupdf/patches/patch-Makelists  Sat Oct 23 15:22:07 2021
@@ -0,0 +1,25 @@
+$NetBSD: patch-Makelists,v 1.1 2021/10/23 15:22:07 leot Exp $
+
+Avoid to unconditionally pass -DHAVE_* flags: this breaks lcms2 that
+gets recognized as lcms2mt.
+
+--- Makelists.orig     2021-10-05 10:44:43.000000000 +0000
++++ Makelists
+@@ -130,7 +130,7 @@ HARFBUZZ_SRC += thirdparty/harfbuzz/src/
+ 
+ JPEGXR_CFLAGS += -Ithirdparty/jpegxr
+ JPEGXR_CFLAGS += -Ithirdparty/jpegxr/Software
+-JPEGXR_CFLAGS += -DHAVE_JPEGXR
++#JPEGXR_CFLAGS += -DHAVE_JPEGXR
+ 
+ JPEGXR_BUILD_CFLAGS += -Wno-tautological-compare
+ 
+@@ -186,7 +186,7 @@ LIBJPEG_SRC += thirdparty/libjpeg/jutils
+ # --- LCMS2 (multi-threaded fork) ---
+ 
+ LCMS2_CFLAGS += -Ithirdparty/lcms2/include
+-LCMS2_CFLAGS += -DHAVE_LCMS2MT
++#LCMS2_CFLAGS += -DHAVE_LCMS2MT
+ 
+ LCMS2_SRC += thirdparty/lcms2/src/cmsalpha.c
+ LCMS2_SRC += thirdparty/lcms2/src/cmscam02.c
Index: pkgsrc/print/mupdf/patches/patch-source_fitz_color-lcms.c
diff -u /dev/null pkgsrc/print/mupdf/patches/patch-source_fitz_color-lcms.c:1.1
--- /dev/null   Sat Oct 23 15:22:07 2021
+++ pkgsrc/print/mupdf/patches/patch-source_fitz_color-lcms.c   Sat Oct 23 15:22:07 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-source_fitz_color-lcms.c,v 1.1 2021/10/23 15:22:07 leot Exp $
+
+memset(3) needs string.h.
+
+--- source/fitz/color-lcms.c.orig      2021-10-05 10:44:43.000000000 +0000
++++ source/fitz/color-lcms.c
+@@ -22,6 +22,8 @@
+ 
+ #include "mupdf/fitz.h"
+ 
++#include <string.h>
++
+ #include "color-imp.h"
+ 
+ #if FZ_ENABLE_ICC



Home | Main Index | Thread Index | Old Index