head	1.33;
access;
symbols
	pkgsrc-2024Q2:1.32.0.2
	pkgsrc-2024Q2-base:1.32
	pkgsrc-2024Q1:1.31.0.6
	pkgsrc-2024Q1-base:1.31
	pkgsrc-2023Q4:1.31.0.4
	pkgsrc-2023Q4-base:1.31
	pkgsrc-2023Q3:1.31.0.2
	pkgsrc-2023Q3-base:1.31
	pkgsrc-2023Q2:1.30.0.2
	pkgsrc-2023Q2-base:1.30
	pkgsrc-2023Q1:1.29.0.6
	pkgsrc-2023Q1-base:1.29
	pkgsrc-2022Q4:1.29.0.4
	pkgsrc-2022Q4-base:1.29
	pkgsrc-2022Q3:1.29.0.2
	pkgsrc-2022Q3-base:1.29
	pkgsrc-2022Q2:1.27.0.6
	pkgsrc-2022Q2-base:1.27
	pkgsrc-2022Q1:1.27.0.4
	pkgsrc-2022Q1-base:1.27
	pkgsrc-2021Q4:1.27.0.2
	pkgsrc-2021Q4-base:1.27
	pkgsrc-2021Q3:1.26.0.8
	pkgsrc-2021Q3-base:1.26
	pkgsrc-2021Q2:1.26.0.6
	pkgsrc-2021Q2-base:1.26
	pkgsrc-2021Q1:1.26.0.4
	pkgsrc-2021Q1-base:1.26
	pkgsrc-2020Q4:1.26.0.2
	pkgsrc-2020Q4-base:1.26
	pkgsrc-2020Q3:1.25.0.4
	pkgsrc-2020Q3-base:1.25
	pkgsrc-2020Q2:1.25.0.2
	pkgsrc-2020Q2-base:1.25
	pkgsrc-2020Q1:1.24.0.4
	pkgsrc-2020Q1-base:1.24
	pkgsrc-2019Q4:1.24.0.6
	pkgsrc-2019Q4-base:1.24
	pkgsrc-2019Q3:1.24.0.2
	pkgsrc-2019Q3-base:1.24
	pkgsrc-2019Q2:1.23.0.2
	pkgsrc-2019Q2-base:1.23
	pkgsrc-2019Q1:1.20.0.4
	pkgsrc-2019Q1-base:1.20
	pkgsrc-2018Q4:1.20.0.2
	pkgsrc-2018Q4-base:1.20
	pkgsrc-2018Q3:1.19.0.4
	pkgsrc-2018Q3-base:1.19
	pkgsrc-2018Q2:1.19.0.2
	pkgsrc-2018Q2-base:1.19
	pkgsrc-2018Q1:1.18.0.4
	pkgsrc-2018Q1-base:1.18
	pkgsrc-2017Q4:1.18.0.2
	pkgsrc-2017Q4-base:1.18
	pkgsrc-2017Q3:1.17.0.4
	pkgsrc-2017Q3-base:1.17
	pkgsrc-2017Q2:1.16.0.2
	pkgsrc-2017Q2-base:1.16
	pkgsrc-2017Q1:1.15.0.4
	pkgsrc-2017Q1-base:1.15
	pkgsrc-2016Q4:1.15.0.2
	pkgsrc-2016Q4-base:1.15
	pkgsrc-2016Q3:1.14.0.4
	pkgsrc-2016Q3-base:1.14
	pkgsrc-2016Q2:1.14.0.2
	pkgsrc-2016Q2-base:1.14
	pkgsrc-2016Q1:1.13.0.2
	pkgsrc-2016Q1-base:1.13
	pkgsrc-2015Q4:1.12.0.2
	pkgsrc-2015Q4-base:1.12
	pkgsrc-2015Q3:1.10.0.4
	pkgsrc-2015Q3-base:1.10
	pkgsrc-2015Q2:1.10.0.2
	pkgsrc-2015Q2-base:1.10
	pkgsrc-2015Q1:1.9.0.8
	pkgsrc-2015Q1-base:1.9
	pkgsrc-2014Q4:1.9.0.6
	pkgsrc-2014Q4-base:1.9
	pkgsrc-2014Q3:1.9.0.4
	pkgsrc-2014Q3-base:1.9
	pkgsrc-2014Q2:1.9.0.2
	pkgsrc-2014Q2-base:1.9
	pkgsrc-2014Q1:1.7.0.2
	pkgsrc-2014Q1-base:1.7
	pkgsrc-2013Q4:1.5.0.12
	pkgsrc-2013Q4-base:1.5
	pkgsrc-2013Q3:1.5.0.10
	pkgsrc-2013Q3-base:1.5
	pkgsrc-2013Q2:1.5.0.8
	pkgsrc-2013Q2-base:1.5
	pkgsrc-2013Q1:1.5.0.6
	pkgsrc-2013Q1-base:1.5
	pkgsrc-2012Q4:1.5.0.4
	pkgsrc-2012Q4-base:1.5
	pkgsrc-2012Q3:1.5.0.2
	pkgsrc-2012Q3-base:1.5
	pkgsrc-2012Q2:1.4.0.2
	pkgsrc-2012Q2-base:1.4
	pkgsrc-2012Q1:1.3.0.2
	pkgsrc-2012Q1-base:1.3
	pkgsrc-2011Q4:1.2.0.8
	pkgsrc-2011Q4-base:1.2
	pkgsrc-2011Q3:1.2.0.6
	pkgsrc-2011Q3-base:1.2
	pkgsrc-2011Q2:1.2.0.4
	pkgsrc-2011Q2-base:1.2
	pkgsrc-2011Q1:1.2.0.2
	pkgsrc-2011Q1-base:1.2
	pkgsrc-2010Q4:1.1.0.4
	pkgsrc-2010Q4-base:1.1
	pkgsrc-2010Q3:1.1.0.2
	pkgsrc-2010Q3-base:1.1;
locks; strict;
comment	@# @;


1.33
date	2024.08.14.05.55.33;	author adam;	state dead;
branches;
next	1.32;
commitid	6Jr4EKtxzKjCJKlF;

1.32
date	2024.05.15.21.00.43;	author wiz;	state Exp;
branches;
next	1.31;
commitid	uUcP5EU8o7ioF8aF;

1.31
date	2023.09.07.14.36.54;	author vins;	state Exp;
branches;
next	1.30;
commitid	u8eslIAw1GtJBQDE;

1.30
date	2023.04.29.08.17.53;	author wiz;	state Exp;
branches;
next	1.29;
commitid	HZqxLnumeehMIYmE;

1.29
date	2022.07.24.10.13.38;	author leot;	state Exp;
branches;
next	1.28;
commitid	2VeZuJAoaZRsk8ND;

1.28
date	2022.07.23.15.09.43;	author leot;	state Exp;
branches;
next	1.27;
commitid	FjjMZn4CTTEk02ND;

1.27
date	2021.10.23.15.22.07;	author leot;	state Exp;
branches;
next	1.26;
commitid	gdBXh9Ik56aEQWdD;

1.26
date	2020.10.08.22.50.16;	author leot;	state Exp;
branches;
next	1.25;
commitid	FgSy7mcRxSjBx9rC;

1.25
date	2020.05.07.20.42.57;	author leot;	state Exp;
branches;
next	1.24;
commitid	BKBJtenIADtQMl7C;

1.24
date	2019.08.03.14.47.41;	author leot;	state Exp;
branches;
next	1.23;
commitid	HIwJYegY9iOTKAxB;

1.23
date	2019.05.17.05.45.10;	author wiz;	state Exp;
branches;
next	1.22;
commitid	6vjv1Dwah1lkgwnB;

1.22
date	2019.05.13.11.03.58;	author leot;	state Exp;
branches;
next	1.21;
commitid	rPup8SM3CwIg62nB;

1.21
date	2019.05.12.12.27.02;	author ryoon;	state Exp;
branches;
next	1.20;
commitid	SnbP30nbqNReEUmB;

1.20
date	2018.10.04.19.02.33;	author leot;	state Exp;
branches;
next	1.19;
commitid	LVpLHA7pNeIfUFUA;

1.19
date	2018.05.06.13.19.10;	author leot;	state Exp;
branches;
next	1.18;
commitid	COhp9WCCCo6oReBA;

1.18
date	2017.12.18.15.06.34;	author leot;	state Exp;
branches;
next	1.17;
commitid	piDUW6ZgHXgvUnjA;

1.17
date	2017.07.16.08.29.53;	author leot;	state Exp;
branches;
next	1.16;
commitid	hrg1rSkBOOBeHqZz;

1.16
date	2017.04.12.13.03.08;	author leot;	state Exp;
branches;
next	1.15;
commitid	PbHMIboXP7i4hfNz;

1.15
date	2016.11.28.14.40.42;	author leot;	state Exp;
branches;
next	1.14;
commitid	gJAKjvlEKHiE9Uvz;

1.14
date	2016.04.27.12.34.58;	author leot;	state Exp;
branches;
next	1.13;
commitid	slCnl0SRdIXYmg4z;

1.13
date	2016.02.04.11.50.24;	author leot;	state Exp;
branches;
next	1.12;
commitid	VdJkl1kCTohZMATy;

1.12
date	2015.11.12.21.11.31;	author leot;	state Exp;
branches;
next	1.11;
commitid	qYnY20gvoU7nzQIy;

1.11
date	2015.11.11.17.08.25;	author leot;	state Exp;
branches;
next	1.10;
commitid	uJF6ihauX2BdgHIy;

1.10
date	2015.04.17.07.18.21;	author wiz;	state Exp;
branches;
next	1.9;
commitid	gZ6ocrKNN6hMHUhy;

1.9
date	2014.06.15.14.14.18;	author wiz;	state Exp;
branches;
next	1.8;
commitid	Y7uHP65AoicgQCEx;

1.8
date	2014.04.21.16.14.40;	author wiz;	state Exp;
branches;
next	1.7;
commitid	0Ss6ATlkH3WYgzxx;

1.7
date	2014.02.20.23.15.27;	author wiz;	state Exp;
branches;
next	1.6;
commitid	H7Z6VaGfK3B5xTpx;

1.6
date	2014.01.09.14.25.23;	author mef;	state Exp;
branches;
next	1.5;
commitid	sV6w5TKv9rU6Urkx;

1.5
date	2012.08.21.19.50.54;	author drochner;	state Exp;
branches;
next	1.4;

1.4
date	2012.06.03.22.03.24;	author wiz;	state Exp;
branches;
next	1.3;

1.3
date	2012.03.24.13.31.58;	author drochner;	state Exp;
branches;
next	1.2;

1.2
date	2011.03.08.17.09.25;	author drochner;	state Exp;
branches;
next	1.1;

1.1
date	2010.09.15.13.15.29;	author joerg;	state Exp;
branches;
next	;


desc
@@


1.33
log
@mupdf: really disable FreeGLUT when not enabled as an option
@
text
@$NetBSD: patch-ac,v 1.32 2024/05/15 21:00:43 wiz Exp $

- Install target cleanup
- Also install muthreads and mupkcs7 libraries (needed by various tools)
- Use sh instead of bash

--- Makefile.orig	2024-03-19 15:31:58.000000000 +0000
+++ Makefile
@@@@ -237,10 +237,10 @@@@ endif
 
 FONT_GEN := $(FONT_BIN:%=generated/%.c)
 
-generated/%.cff.c : %.cff $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; bash $(HEXDUMP_SH) > $@@ $<
-generated/%.otf.c : %.otf $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; bash $(HEXDUMP_SH) > $@@ $<
-generated/%.ttf.c : %.ttf $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; bash $(HEXDUMP_SH) > $@@ $<
-generated/%.ttc.c : %.ttc $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; bash $(HEXDUMP_SH) > $@@ $<
+generated/%.cff.c : %.cff $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; sh $(HEXDUMP_SH) > $@@ $<
+generated/%.otf.c : %.otf $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; sh $(HEXDUMP_SH) > $@@ $<
+generated/%.ttf.c : %.ttf $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; sh $(HEXDUMP_SH) > $@@ $<
+generated/%.ttc.c : %.ttc $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; sh $(HEXDUMP_SH) > $@@ $<
 
 ifeq ($(HAVE_OBJCOPY),yes)
   MUPDF_OBJ += $(FONT_BIN:%=$(OUT)/%.o)
@@@@ -465,55 +465,59 @@@@ tools: $(TOOL_APPS)
 apps: $(TOOL_APPS) $(VIEW_APPS)
 
 install-headers:
-	install -d $(DESTDIR)$(incdir)/mupdf
-	install -d $(DESTDIR)$(incdir)/mupdf/fitz
-	install -d $(DESTDIR)$(incdir)/mupdf/pdf
-	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
 
 install-libs: libs install-headers
 ifneq ($(LIBS_TO_INSTALL_IN_LIB),)
-	install -d $(DESTDIR)$(libdir)
-	install -m 644 $(LIBS_TO_INSTALL_IN_LIB) $(DESTDIR)$(libdir)
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(libdir)
+	for f in $(LIBS_TO_INSTALL_IN_LIB); do \
+		${BSD_INSTALL_LIB} $$f $(DESTDIR)$(libdir); \
+	done
 endif
 
 install-apps: apps
-	install -d $(DESTDIR)$(bindir)
-	install -m 755 $(LIBS_TO_INSTALL_IN_BIN) $(TOOL_APPS) $(VIEW_APPS) $(DESTDIR)$(bindir)
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(bindir)
+	for f in $(LIBS_TO_INSTALL_IN_BIN) $(TOOL_APPS) $(VIEW_APPS); do \
+		${BSD_INSTALL_LIB} $$f $(DESTDIR)$(bindir); \
+	done
 
 install-docs:
-	install -d $(DESTDIR)$(mandir)/man1
-	install -m 644 docs/man/*.1 $(DESTDIR)$(mandir)/man1
+	${BSD_INSTALL_MAN_DIR} $(DESTDIR)$(mandir)/man1
+	${BSD_INSTALL_MAN} docs/man/*.1 $(DESTDIR)$(mandir)/man1
 
-	install -d $(DESTDIR)$(docdir)
-	install -d $(DESTDIR)$(docdir)/examples
-	install -m 644 README CHANGES $(DESTDIR)$(docdir)
-	install -m 644 $(wildcard COPYING LICENSE) $(DESTDIR)$(docdir)
-	install -m 644 docs/examples/* $(DESTDIR)$(docdir)/examples
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)/examples
+	${BSD_INSTALL_DATA} README CHANGES $(DESTDIR)$(docdir)
+	${BSD_INSTALL_DATA} $(wildcard COPYING LICENSE) $(DESTDIR)$(docdir)
+	${BSD_INSTALL_DATA} docs/examples/* $(DESTDIR)$(docdir)/examples
 
 install: install-libs install-apps install-docs
 
 install-docs-html:
 	python3 scripts/build-docs.py
-	install -d $(DESTDIR)$(docdir)
-	install -d $(DESTDIR)$(docdir)/_images
-	install -d $(DESTDIR)$(docdir)/_static
-	install -d $(DESTDIR)$(docdir)/_static/js
-	install -d $(DESTDIR)$(docdir)/_static/css
-	install -d $(DESTDIR)$(docdir)/_static/css/fonts
-	install -m 644 build/docs/html/*.html $(DESTDIR)$(docdir)
-	install -m 644 build/docs/html/*.inv $(DESTDIR)$(docdir)
-	install -m 644 build/docs/html/*.js $(DESTDIR)$(docdir)
-	install -m 644 build/docs/html/_images/* $(DESTDIR)$(docdir)/_images
-	install -m 644 build/docs/html/_static/*.css $(DESTDIR)$(docdir)/_static
-	install -m 644 build/docs/html/_static/*.ico $(DESTDIR)$(docdir)/_static
-	install -m 644 build/docs/html/_static/*.js $(DESTDIR)$(docdir)/_static
-	install -m 644 build/docs/html/_static/*.png $(DESTDIR)$(docdir)/_static
-	install -m 644 build/docs/html/_static/*.svg $(DESTDIR)$(docdir)/_static
-	install -m 644 build/docs/html/_static/js/* $(DESTDIR)$(docdir)/_static/js
-	install -m 644 build/docs/html/_static/css/*.css $(DESTDIR)$(docdir)/_static/css
-	install -m 644 build/docs/html/_static/css/fonts/* $(DESTDIR)$(docdir)/_static/css/fonts
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)/_images
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)/_static
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)/_static/js
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)/_static/css
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)/_static/css/fonts
+	${BSD_INSTALL_DATA} build/docs/html/*.html $(DESTDIR)$(docdir)
+	${BSD_INSTALL_DATA} build/docs/html/*.inv $(DESTDIR)$(docdir)
+	${BSD_INSTALL_DATA} build/docs/html/*.js $(DESTDIR)$(docdir)
+	${BSD_INSTALL_DATA} build/docs/html/_images/* $(DESTDIR)$(docdir)/_images
+	${BSD_INSTALL_DATA} build/docs/html/_static/*.css $(DESTDIR)$(docdir)/_static
+	${BSD_INSTALL_DATA} build/docs/html/_static/*.ico $(DESTDIR)$(docdir)/_static
+	${BSD_INSTALL_DATA} build/docs/html/_static/*.js $(DESTDIR)$(docdir)/_static
+	${BSD_INSTALL_DATA} build/docs/html/_static/*.png $(DESTDIR)$(docdir)/_static
+	${BSD_INSTALL_DATA} build/docs/html/_static/*.svg $(DESTDIR)$(docdir)/_static
+	${BSD_INSTALL_DATA} build/docs/html/_static/js/* $(DESTDIR)$(docdir)/_static/js
+	${BSD_INSTALL_DATA} build/docs/html/_static/css/*.css $(DESTDIR)$(docdir)/_static/css
+	${BSD_INSTALL_DATA} build/docs/html/_static/css/fonts/* $(DESTDIR)$(docdir)/_static/css/fonts
 
 tarball:
 	bash scripts/archive.sh
@@@@ -638,23 +642,23 @@@@ ifneq ($(USE_SYSTEM_LIBS),yes)
 endif
 
 install-shared-c: install-shared-check shared install-headers
-	install -d $(DESTDIR)$(libdir)
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(libdir)
 	install -m $(SO_INSTALL_MODE) $(OUT)/libmupdf.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/
 ifneq ($(OS),OpenBSD)
 	ln -sf libmupdf.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/libmupdf.$(SO)
 endif
 
 install-shared-c++: install-shared-c c++
-	install -m 644 platform/c++/include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf
+	${BSD_INSTALL_DATA} platform/c++/include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf
 	install -m $(SO_INSTALL_MODE) $(OUT)/libmupdfcpp.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/
 ifneq ($(OS),OpenBSD)
 	ln -sf libmupdfcpp.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/libmupdfcpp.$(SO)
 endif
 
 install-shared-python: install-shared-c++ python
-	install -d $(DESTDIR)$(pydir)/mupdf
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(pydir)/mupdf
 	install -m $(SO_INSTALL_MODE) $(OUT)/_mupdf.$(SO) $(DESTDIR)$(pydir)/mupdf
-	install -m 644 $(OUT)/mupdf.py $(DESTDIR)$(pydir)/mupdf/__init__.py
+	${BSD_INSTALL_DATA} $(OUT)/mupdf.py $(DESTDIR)$(pydir)/mupdf/__init__.py
 
 else
 
@


1.32
log
@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
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.31 2023/09/07 14:36:54 vins Exp $
@


1.31
log
@print/mupdf: update to MuPDF 1.23.3

# Changes (local)

  * Import patch from OpenBSD ports, adding support for fine-grained zoom.
  * Fix scrolling with vi-like bindings (from FreeBSD ports).
  * Use REPLACE_INTERPRETER instead of an ad-hoc patch.
  * Don't install html documentation (turn it into an option in future?)
  * Provide .desktop application file and pixmap for mupdf.
  * Avoid executable bit being set on static libs.
  * Other minor fixes.
  * Package linted.

# Changes (upstream)

## 1.23.3 (2023-09-05)

  * Fix bug where an inconsistent xref caused problems when saving PDF.

## 1.23.2 (2023-08-31)

  * Fixes needed to allow tesseract builds in C++/Python bindings.

## 1.23.1 (2023-08-29)

  * Fix bug where implicit operations where not ended when creating
    signature widget annotations.
  * Fix bug where saving an encrypted PDF requiring encryption could
    cause an invalid saved file.
  * Fix bug where ink annotation line caps adhered to rendering in older
    Adobe Acrobat Reader.
  * Fix compilation issue of shared library used in pythong bindings.

## 1.23.0 (2023-08-22)

 New features:

  * New WASM library with same API as mutool run and Java, for both
    browser and Node environments.
  * Support CropBox, TrimBox, BleedBox, and ArtBox in PDF tools and
    viewers.
  * PhotoShop PSD image support.
  * mupdf-gl: Custom ICC display profile support.
  * mutool poster: Option to split in RTL direction.

 Miscellaneous improvements and notable bug fixes:

  * EPUB: Fix table cell height calculations.
  * EPUB: Inherit table cell background color from table row.
  * EPUB: Support files with partial encryption (only read unencrypted
    parts).
  * EPUB: Support files with incorrect directory prefixes.
  * TIFF: Stability improvements.
  * MOBI: Stability improvements.
  * PDF: Support old style border dash patterns.
  * PDF: Support GoToR links to remote PDF documents.
  * PDF: Improve link parsing and creation.
  * ZIP: Improve unicode file name handling.
  * Fall back to unhinted fonts if hints are broken.
  * Recognize document types by sniffing contents (don't need to rely on
    mimetype or file extension).

 New APIs:

  * More PDF document permission flags.
  * Tweaked exception error logging.
  * pdf_minimize_document to squeeze amount of memory used by an open
    document.

 Incompatible API changes:

  * pdf_field_name renamed to pdf_load_field_name.
  * mutool run: Changed many methods to match Java and new WASM library.

 New and improved documentation.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.30 2023/04/29 08:17:53 wiz Exp $
d7 1
a7 1
--- Makefile.orig	2023-09-05 11:51:19.000000000 +0000
d9 1
a9 1
@@@@ -214,10 +214,10 @@@@ endif
d24 1
a24 1
@@@@ -440,29 +440,35 @@@@ tools: $(TOOL_APPS)
d27 1
a27 1
 install-libs: libs
d40 2
a48 1
+
d64 6
a69 1
+
d72 2
a73 1
+	${BSD_INSTALL_DATA} README COPYING CHANGES $(DESTDIR)$(docdir)
d76 4
d81 63
a143 3
-	install -d $(DESTDIR)$(docdir)/examples
-	install -m 644 README COPYING CHANGES $(DESTDIR)$(docdir)
-	install -m 644 docs/examples/* $(DESTDIR)$(docdir)/examples
d145 1
a145 1
 install: install-libs install-apps install-docs
@


1.30
log
@mupdf: reduce local patches

In particular, mostly libtoolization and installed libraries.
Only user, zathura-pdf-mupdf, still builds fine.

Bump PKGREVISION.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.29 2022/07/24 10:13:38 leot Exp $
d7 1
a7 1
--- Makefile.orig	2022-06-14 12:19:22.000000000 +0000
d9 1
a9 1
@@@@ -181,19 +181,19 @@@@ FONT_BIN += $(sort $(wildcard resources/
d24 1
a24 10
   $(OUT)/%.cff.o : %.cff ; $(OBJCOPY_CMD)
   $(OUT)/%.otf.o : %.otf ; $(OBJCOPY_CMD)
   $(OUT)/%.ttf.o : %.ttf ; $(OBJCOPY_CMD)
   $(OUT)/%.ttc.o : %.ttc ; $(OBJCOPY_CMD)
 else
   MUPDF_OBJ += $(FONT_GEN:%.c=$(OUT)/%.o)
 endif
 
 generate: $(FONT_GEN)
@@@@ -402,30 +402,34 @@@@ tools: $(TOOL_APPS)
d47 1
d63 5
a71 1
-	install -m 644 docs/*.html docs/*.css docs/*.png $(DESTDIR)$(docdir)
a72 5
+	${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)
+	${BSD_INSTALL_DATA} docs/examples/* $(DESTDIR)$(docdir)/examples
@


1.29
log
@mupdf: Avoid bash dependency

Should hopefully fix the build.

Problem reported by <wiz>, thanks!
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.28 2022/07/23 15:09:43 leot Exp $
a2 1
- libtool support 
a4 1
- Do not force `-O0' flag when building
a5 3
- Get rid of unused VERSION variable and `version:' target (otherwise `git' can
  be invoked during the building phase)
- Install mupdf with curl support as `mupdf-curl'
a8 137
@@@@ -54,13 +54,13 @@@@ ifneq ($(verbose),yes)
 endif
 
 MKTGTDIR = mkdir -p $(dir $@@)
-CC_CMD = $(QUIET_CC) $(MKTGTDIR) ; $(CC) $(CFLAGS) -MMD -MP -o $@@ -c $<
-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) $(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 --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 ---
 
-$(OUT)/%.a :
+$(OUT)/%.la :
 	$(AR_CMD)
 	$(RANLIB_CMD)
 
@@@@ -93,39 +93,39 @@@@ $(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) $(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) $(WARNING_CFLAGS) $(LIB_CFLAGS) $(LIBCRYPTO_CFLAGS)
 
-$(OUT)/source/tools/%.o : source/tools/%.c
+$(OUT)/source/tools/%.lo : source/tools/%.c
 	$(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) $(WARNING_CFLAGS) $(LIB_CFLAGS)
 
-$(OUT)/platform/x11/%.o : platform/x11/%.c
+$(OUT)/platform/x11/%.lo : platform/x11/%.c
 	$(CC_CMD) $(WARNING_CFLAGS) $(X11_CFLAGS)
 
-$(OUT)/platform/x11/curl/%.o : platform/x11/%.c
+$(OUT)/platform/x11/curl/%.lo : platform/x11/%.c
 	$(CC_CMD) $(WARNING_CFLAGS) $(X11_CFLAGS) $(CURL_CFLAGS)
 
-$(OUT)/platform/gl/%.o : platform/gl/%.c
+$(OUT)/platform/gl/%.lo : platform/gl/%.c
 	$(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) $(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) $(WARNING_CFLAGS) -Wdeclaration-after-statement $(LIB_CFLAGS) $(THIRD_CFLAGS)
 
-$(OUT)/source/%.o : source/%.cpp
+$(OUT)/source/%.lo : source/%.cpp
 	$(CXX_CMD) $(WARNING_CFLAGS) $(LIB_CFLAGS) $(THIRD_CFLAGS)
 
 ifeq ($(HAVE_TESSERACT),yes)
@@@@ -133,22 +133,22 @@@@ $(OUT)/source/fitz/tessocr.o : source/fi
 	$(CXX_CMD) $(WARNING_CFLAGS) $(LIB_CFLAGS) $(THIRD_CFLAGS) $(TESSERACT_CFLAGS) $(TESSERACT_DEFINES) $(TESSERACT_LANGFLAGS)
 endif
 
-$(OUT)/platform/%.o : platform/%.c
+$(OUT)/platform/%.lo : platform/%.c
 	$(CC_CMD) $(WARNING_CFLAGS)
 
-$(OUT)/%.o: %.rc
+$(OUT)/%.lo: %.rc
 	$(WINDRES_CMD)
 
-.PRECIOUS : $(OUT)/%.o # Keep intermediates from chained rules
+.PRECIOUS : $(OUT)/%.lo # Keep intermediates from chained rules
 .PRECIOUS : $(OUT)/%.exe # Keep intermediates from chained rules
 
 # --- File lists ---
 
-THIRD_OBJ := $(THIRD_SRC:%.c=$(OUT)/%.o)
-THIRD_OBJ := $(THIRD_OBJ:%.cc=$(OUT)/%.o)
-THIRD_OBJ := $(THIRD_OBJ:%.cpp=$(OUT)/%.o)
+THIRD_OBJ := $(THIRD_SRC:%.c=$(OUT)/%.lo)
+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))
@@@@ -159,14 +159,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)
-MUPDF_OBJ := $(MUPDF_OBJ:%.cpp=$(OUT)/%.o)
+MUPDF_OBJ := $(MUPDF_SRC:%.c=$(OUT)/%.lo)
+MUPDF_OBJ := $(MUPDF_OBJ:%.cpp=$(OUT)/%.lo)
 
 THREAD_SRC := source/helpers/mu-threads/mu-threads.c
-THREAD_OBJ := $(THREAD_SRC:%.c=$(OUT)/%.o)
+THREAD_OBJ := $(THREAD_SRC:%.c=$(OUT)/%.lo)
 
 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 ---
 
d23 5
a27 10
-  MUPDF_OBJ += $(FONT_BIN:%=$(OUT)/%.o)
-  $(OUT)/%.cff.o : %.cff ; $(OBJCOPY_CMD)
-  $(OUT)/%.otf.o : %.otf ; $(OBJCOPY_CMD)
-  $(OUT)/%.ttf.o : %.ttf ; $(OBJCOPY_CMD)
-  $(OUT)/%.ttc.o : %.ttc ; $(OBJCOPY_CMD)
+  MUPDF_OBJ += $(FONT_BIN:%=$(OUT)/%.lo)
+  $(OUT)/%.cff.lo : %.cff ; $(OBJCOPY_CMD)
+  $(OUT)/%.otf.lo : %.otf ; $(OBJCOPY_CMD)
+  $(OUT)/%.ttf.lo : %.ttf ; $(OBJCOPY_CMD)
+  $(OUT)/%.ttc.lo : %.ttc ; $(OBJCOPY_CMD)
d29 1
a29 2
-  MUPDF_OBJ += $(FONT_GEN:%.c=$(OUT)/%.o)
+  MUPDF_OBJ += $(FONT_GEN:%.c=$(OUT)/%.lo)
a32 153
@@@@ -247,24 +247,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)
 $(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
+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)
@@@@ -287,13 +287,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))
-MUTOOL_OBJ := $(MUTOOL_SRC:%.c=$(OUT)/%.o)
+MUTOOL_OBJ := $(MUTOOL_SRC:%.c=$(OUT)/%.lo)
 MUTOOL_EXE := $(OUT)/mutool$(EXE)
 $(MUTOOL_EXE) : $(MUTOOL_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(PKCS7_LIB) $(THREAD_LIB)
 	$(LINK_CMD) $(THIRD_LIBS) $(THREADING_LIBS) $(LIBCRYPTO_LIBS)
 TOOL_APPS += $(MUTOOL_EXE)
 
-MURASTER_OBJ := $(OUT)/source/tools/muraster.o
+MURASTER_OBJ := $(OUT)/source/tools/muraster.lo
 MURASTER_EXE := $(OUT)/muraster$(EXE)
 $(MURASTER_EXE) : $(MURASTER_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(PKCS7_LIB) $(THREAD_LIB)
 	$(LINK_CMD) $(THIRD_LIBS) $(THREADING_LIBS) $(LIBCRYPTO_LIBS)
@@@@ -301,7 +301,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$(EXE)
   $(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)
@@@@ -309,10 +309,10 @@@@ ifeq ($(HAVE_GLUT),yes)
 endif
 
 ifeq ($(HAVE_X11),yes)
-  MUVIEW_X11_EXE := $(OUT)/mupdf-x11$(EXE)
-  MUVIEW_X11_OBJ += $(OUT)/platform/x11/pdfapp.o
-  MUVIEW_X11_OBJ += $(OUT)/platform/x11/x11_main.o
-  MUVIEW_X11_OBJ += $(OUT)/platform/x11/x11_image.o
+  MUVIEW_X11_EXE := $(OUT)/mupdf$(EXE)
+  MUVIEW_X11_OBJ += $(OUT)/platform/x11/pdfapp.lo
+  MUVIEW_X11_OBJ += $(OUT)/platform/x11/x11_main.lo
+  MUVIEW_X11_OBJ += $(OUT)/platform/x11/x11_image.lo
   $(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)
@@@@ -320,9 +320,9 @@@@ endif
 
 ifeq ($(HAVE_WIN32),yes)
   MUVIEW_WIN32_EXE := $(OUT)/mupdf-w32$(EXE)
-  MUVIEW_WIN32_OBJ += $(OUT)/platform/x11/pdfapp.o
-  MUVIEW_WIN32_OBJ += $(OUT)/platform/x11/win_main.o
-  MUVIEW_WIN32_OBJ += $(OUT)/platform/x11/win_res.o
+  MUVIEW_WIN32_OBJ += $(OUT)/platform/x11/pdfapp.lo
+  MUVIEW_WIN32_OBJ += $(OUT)/platform/x11/win_main.lo
+  MUVIEW_WIN32_OBJ += $(OUT)/platform/x11/win_res.lo
   $(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)
@@@@ -331,12 +331,12 @@@@ endif
 ifeq ($(HAVE_X11),yes)
 ifeq ($(HAVE_CURL),yes)
 ifeq ($(HAVE_PTHREAD),yes)
-  MUVIEW_X11_CURL_EXE := $(OUT)/mupdf-x11-curl$(EXE)
-  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/pdfapp.o
-  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/x11_main.o
-  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/x11_image.o
-  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/curl_stream.o
-  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/prog_stream.o
+  MUVIEW_X11_CURL_EXE := $(OUT)/mupdf$(EXE)
+  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/pdfapp.lo
+  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/x11_main.lo
+  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/x11_image.lo
+  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/curl_stream.lo
+  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/prog_stream.lo
   $(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)
@@@@ -346,19 +346,19 @@@@ endif
 
 # --- Generated dependencies ---
 
--include $(MUPDF_OBJ:%.o=%.d)
--include $(PKCS7_OBJ:%.o=%.d)
--include $(THREAD_OBJ:%.o=%.d)
--include $(THIRD_OBJ:%.o=%.d)
--include $(THIRD_GLUT_OBJ:%.o=%.d)
-
--include $(MUTOOL_OBJ:%.o=%.d)
--include $(MUVIEW_GLUT_OBJ:%.o=%.d)
--include $(MUVIEW_X11_OBJ:%.o=%.d)
--include $(MUVIEW_WIN32_OBJ:%.o=%.d)
+-include $(MUPDF_OBJ:%.lo=%.d)
+-include $(PKCS7_OBJ:%.lo=%.d)
+-include $(THREAD_OBJ:%.lo=%.d)
+-include $(THIRD_OBJ:%.lo=%.d)
+-include $(THIRD_GLUT_OBJ:%.lo=%.d)
+
+-include $(MUTOOL_OBJ:%.lo=%.d)
+-include $(MUVIEW_GLUT_OBJ:%.lo=%.d)
+-include $(MUVIEW_X11_OBJ:%.lo=%.d)
+-include $(MUVIEW_WIN32_OBJ:%.lo=%.d)
 
--include $(MURASTER_OBJ:%.o=%.d)
--include $(MUVIEW_X11_CURL_OBJ:%.o=%.d)
+-include $(MURASTER_OBJ:%.lo=%.d)
+-include $(MUVIEW_X11_CURL_OBJ:%.lo=%.d)
 
 # --- Examples ---
 
@@@@ -371,10 +371,10 @@@@ $(OUT)/multi-threaded: docs/examples/mul
 
 # --- Update version string header ---
 
-VERSION = $(shell git describe --tags)
-
-version:
-	sed -i~ -e '/FZ_VERSION /s/".*"/"'$(VERSION)'"/' include/mupdf/fitz/version.h
+#VERSION = $(shell git describe --tags)
+#
+#version:
+#	sed -i~ -e '/FZ_VERSION /s/".*"/"'$(VERSION)'"/' include/mupdf/fitz/version.h
 
 # --- Format man pages ---
 
d54 1
a54 1
+		${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} $$f $(DESTDIR)$(libdir); \
d63 1
a63 1
+		${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} $$f $(DESTDIR)$(bindir); \
@


1.28
log
@mupdf: Update to 1.20.0

Changes:
1.20.0
------
Experimental C# bindings.
Cross compilation should no longer need a host compiler.
Major additions to JNI bindings.

New API to edit outline
New API to resolve and create links
New API to toggle individual layers in PDF
   Layer panel in mupdf-gl
   Layer option in mutool draw
New API to add a Javascript console
   Console panel in mupdf-gl

Text search API extended to be able to distinguish between separate
search hits.

Command line tool improvements:
   all: Negative page numbers to index from the last page
   mutool draw: Add option to render document without text
   mutool draw and convert: Support DPI option in text and HTML output

New hybrid HTML output format using "scripts/pdftohtml" script:
   Graphics in a background image
   Text on top

Improved WASM viewer demo
   Support high DPI screens
   Progressive loading

Update to zlib 1.2.12 for security fix.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.27 2021/10/23 15:22:07 leot Exp $
d7 1
d151 12
a162 2
@@@@ -187,13 +187,13 @@@@ generated/%.ttf.c : %.ttf $(HEXDUMP_SH) 
 generated/%.ttc.c : %.ttc $(HEXDUMP_SH) ; $(QUIET_GEN) $(MKTGTDIR) ; bash $(HEXDUMP_SH) > $@@ $<
@


1.27
log
@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.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.26 2020/10/08 22:50:16 leot Exp $
d11 1
a11 1
--- Makefile.orig	2021-10-05 10:44:43.000000000 +0000
d49 1
a49 1
@@@@ -93,57 +93,57 @@@@ $(OUT)/%.def: $(OUT)/%.$(SO)
d98 6
a103 1
 	$(CXX_CMD) $(WARNING_CFLAGS) $(LIB_CFLAGS) $(THIRD_CFLAGS) $(TESSERACT_BUILD_CFLAGS)
d131 1
a131 1
@@@@ -154,14 +154,14 @@@@ MUPDF_SRC += $(sort $(wildcard source/ht
d150 2
a151 2
@@@@ -182,13 +182,13 @@@@ generated/%.ttf.c : %.ttf $(HEXDUMP_EXE)
 generated/%.ttc.c : %.ttc $(HEXDUMP_EXE) ; $(QUIET_GEN) $(MKTGTDIR) ; $(HEXDUMP_EXE) -s $@@ $<
d170 1
a170 1
@@@@ -242,24 +242,24 @@@@ else
d204 1
a204 1
@@@@ -282,13 +282,13 @@@@ MUTOOL_SRC += source/tools/murun.c
d210 1
a210 1
 MUTOOL_EXE := $(OUT)/mutool
d217 1
a217 1
 MURASTER_EXE := $(OUT)/muraster
d220 1
a220 1
@@@@ -296,7 +296,7 @@@@ TOOL_APPS += $(MURASTER_EXE)
d226 1
a226 1
   MUVIEW_GLUT_EXE := $(OUT)/mupdf-gl
d229 1
a229 1
@@@@ -304,10 +304,10 @@@@ ifeq ($(HAVE_GLUT),yes)
d233 1
a233 1
-  MUVIEW_X11_EXE := $(OUT)/mupdf-x11
d237 1
a237 1
+  MUVIEW_X11_EXE := $(OUT)/mupdf
d244 1
a244 1
@@@@ -315,9 +315,9 @@@@ endif
d247 1
a247 1
   MUVIEW_WIN32_EXE := $(OUT)/mupdf-w32
d257 1
a257 1
@@@@ -326,12 +326,12 @@@@ endif
d261 1
a261 1
-  MUVIEW_X11_CURL_EXE := $(OUT)/mupdf-x11-curl
d267 1
a267 1
+  MUVIEW_X11_CURL_EXE := $(OUT)/mupdf-curl
d276 1
a276 1
@@@@ -341,19 +341,19 @@@@ endif
d308 1
a308 1
@@@@ -366,10 +366,10 @@@@ $(OUT)/multi-threaded: docs/examples/mul
d323 1
a323 1
@@@@ -397,29 +397,33 @@@@ tools: $(TOOL_APPS)
d326 1
a326 1
 install: libs apps
a338 1
 
a341 13
-endif
-
-	install -d $(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
-
-	install -d $(DESTDIR)$(docdir)
-	install -d $(DESTDIR)$(docdir)/examples
-	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
d346 5
a350 2
+endif
+
d355 4
a358 1
+
d361 6
a366 1
+
d373 2
a374 2
 tarball:
 	bash scripts/archive.sh
@


1.26
log
@mupdf: Update to 1.18.0

Changes:
1.18.0
------
mutool draw: bbox output format.
mutool draw: structured text extraction in JSON format.
mutool run: StructuredText.walk()
mutool run: PDFPage.process() and PDFAnnotation.process()

mupdf-gl: Added IBM Common User Access shortcuts for copy & paste.
mupdf-gl: Improved redaction UI.

java: Example desktop Java viewer.

wasm: WebAssembly viewer that runs in a browser.

api: Dehyphenation option in structured text extraction, to improve
     searching for words that are hyphenated across lines.
api: pdf_new_date, pdf_to_date, pdf_dict_put_date and pdf_dict_get_date.
api: Added choice of image redaction algorithms: none, full, partial.
api: Optional use of Tesseract to use OCR to extract text.

svg: Many small parsing fixes.
svg: Parse inline CSS style attributes.
svg: Text elements (simple text layout only).

html: Added HTML5 parser.

pdf: High security redaction -- save redacted PDF as flattened bitmap,
     guaranteed to not leak any sensitive redacted information.

Experimental C++ bindings.
Experimental Python bindings.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.25 2020/05/07 20:42:57 leot Exp $
d11 1
a11 1
--- Makefile.orig	2020-10-07 10:35:03.000000000 +0000
d13 1
a13 1
@@@@ -55,20 +55,20 @@@@ ifneq ($(verbose),yes)
d21 1
a21 1
+CXX_CMD = $(QUIET_CXX) $(MKTGTDIR) ; $(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) -MMD -MP -o $@@ -c $<
d28 1
a28 1
 TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p
d31 10
d49 3
a51 3
@@@@ -78,52 +78,52 @@@@ $(OUT)/%.exe: %.c
 $(OUT)/%.$(SO):
 	$(LINK_CMD) $(LIB_LDFLAGS) $(THIRD_LIBS) $(LIBCRYPTO_LIBS)
d55 1
a55 1
 	$(CC_CMD) $(LIB_CFLAGS) $(THREADING_CFLAGS)
d59 1
a59 1
 	$(CC_CMD) $(LIB_CFLAGS) $(LIBCRYPTO_CFLAGS)
d63 1
a63 1
 	$(CC_CMD) -Wall $(THIRD_CFLAGS) $(THREADING_CFLAGS)
d66 1
d68 1
a68 1
 	$(CC_CMD) $(LIB_CFLAGS) -O0
d72 1
a72 1
 	$(CC_CMD) -Wall $(X11_CFLAGS)
d76 1
a76 1
 	$(CC_CMD) -Wall $(X11_CFLAGS) $(CURL_CFLAGS) -DHAVE_CURL
d80 1
a80 1
 	$(CC_CMD) -Wall $(THIRD_CFLAGS) $(GLUT_CFLAGS)
d85 1
a85 1
 	$(CC_CMD) -Wall -Wdeclaration-after-statement -DHAVE_OBJCOPY $(LIB_CFLAGS) $(THIRD_CFLAGS)
d88 4
d94 1
a94 1
 	$(CC_CMD) -Wall -Wdeclaration-after-statement $(LIB_CFLAGS) $(THIRD_CFLAGS)
d98 1
a98 1
 	$(CXX_CMD) -Wall $(LIB_CFLAGS) $(THIRD_CFLAGS)
d102 1
a102 1
 	$(CC_CMD) -Wall
d121 3
d126 2
a127 2
@@@@ -133,15 +133,15 @@@@ MUPDF_SRC += $(sort $(wildcard source/sv
 MUPDF_SRC += $(sort $(wildcard source/html/*.c))
a138 1
 PKCS7_SRC := source/helpers/pkcs7/pkcs7-check.c
d145 1
a145 1
@@@@ -162,13 +162,13 @@@@ generated/%.ttf.c : %.ttf $(HEXDUMP_EXE)
d165 11
a175 1
@@@@ -214,10 +214,10 @@@@ MUPDF_LIB = $(OUT)/libmupdf.$(SO)
d177 4
a180 1
 $(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ) $(THREAD_OBJ) $(PKCS7_OBJ)
d183 1
d185 7
a193 2
+MUPDF_LIB = $(OUT)/libmupdf.la
+THIRD_LIB = $(OUT)/libmupdf-third.la
d199 1
a199 10
@@@@ -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
d215 1
a215 1
@@@@ -255,7 +255,7 @@@@ TOOL_APPS += $(MURASTER_EXE)
d222 3
a224 3
   $(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)
d239 1
a239 1
@@@@ -274,9 +274,9 @@@@ endif
d252 1
a252 1
@@@@ -285,12 +285,12 @@@@ endif
d271 1
a271 1
@@@@ -300,19 +300,19 @@@@ endif
d279 1
a279 1
--include $(GLUT_OBJ:%.o=%.d)
d289 1
a289 1
+-include $(GLUT_OBJ:%.lo=%.d)
d303 1
a303 1
@@@@ -325,10 +325,10 @@@@ $(OUT)/multi-threaded: docs/examples/mul
d318 1
a318 1
@@@@ -356,27 +356,30 @@@@ tools: $(TOOL_APPS)
d328 8
a335 1
-
d337 2
a338 1
-	install -m 644 $(INSTALL_LIBS) $(DESTDIR)$(libdir)
d341 1
a341 1
-	install -m 755 $(TOOL_APPS) $(VIEW_APPS) $(DESTDIR)$(bindir)
d351 2
a352 9
+	${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 \
d355 1
d357 2
a358 2
+	${BSD_INSTALL_PROGRAM_DIR} $(DESTDIR)$(bindir)
+	for f in $(TOOL_APPS) $(VIEW_APPS); do \
d365 1
@


1.25
log
@mupdf: Update to 1.17.0

pkgsrc changes:
 - Remove patches/patch-platform_x11_pdfapp.c, no longer needed

Changes:
1.17.0
------
api: Improved accessors for markup/ink/polygon annotation data.
api: Chapter based API for faster EPUB loading.
api: Add more documentation to header files.
api: Improved digital signature signing and verification.
api: Validate changes in a signed PDF file.

build: Moved windows build to VS2019 solution.

pdf: Redaction now works on images and links as well as text.
pdf: Greek, Cyrillic, Chinese, Japanese, and Korean scripts in forms and annotations.
pdf: File attachment annotations.
pdf: Use CCITT Fax compression for 1-bit images when creating PDF files.

epub: More forgiving XHTML parsing.
epub: Accelerator files to cache chapter data for faster EPUB loading.
epub: Optimized memory use.

mutool run: Edit Markup, Ink, and Polygon annotation data.
mutool run: Fill out form fields.
viewer: Ask for confirmation before closing a PDF with unsaved changes.
viewer: Embed and extract file attachment annotations.

library: Miscellaneous bugfixes.
library: Fixes to store operation.

thirdparty: Updated Harfbuzz to 2.6.4.
thirdparty: Updated jbig2dec to 0.18.
thirdparty: Updated MuJS to 1.0.7.
thirdparty: Updated OpenJPEG to 2.3.1.
thirdparty: Updated cURL to 7.66.0 (windows only).
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.24 2019/08/03 14:47:41 leot Exp $
d11 1
a11 1
--- Makefile.orig	2020-05-05 11:29:09.000000000 +0000
d13 1
a13 1
@@@@ -51,68 +51,68 @@@@ ifneq ($(verbose),yes)
d18 1
a18 1
-CXX_CMD = $(QUIET_CXX) $(MKTGTDIR) ; $(CXX) $(CFLAGS) -MMD -MP -o $@@ -c $<
d30 1
a30 1
 OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -o $@@ $<
d39 3
a41 2
 $(OUT)/%.exe: %.c
 	$(LINK_CMD)
d45 1
a45 1
 	$(CC_CMD) $(THREADING_CFLAGS)
d49 1
a49 1
 	$(CC_CMD) $(LIBCRYPTO_CFLAGS)
d57 1
a57 1
 	$(CC_CMD) -O0
d74 1
a74 1
 	$(CC_CMD) -Wall -Wdeclaration-after-statement -DHAVE_OBJCOPY $(THIRD_CFLAGS)
d79 5
a83 1
 	$(CC_CMD) -Wall -Wdeclaration-after-statement $(THIRD_CFLAGS)
d101 1
d104 1
d107 2
a108 2
 MUPDF_SRC += $(sort $(wildcard source/pdf/*.c))
@@@@ -121,14 +121,14 @@@@ MUPDF_SRC += $(sort $(wildcard source/sv
d113 1
d115 1
d128 1
a128 1
@@@@ -149,13 +149,13 @@@@ generated/%.ttf.c : %.ttf $(HEXDUMP_EXE)
d148 1
a148 3
@@@@ -189,17 +189,17 @@@@ generate: source/pdf/js/util.js.h
 
 # --- Library ---
d150 2
d163 1
d172 1
a172 1
@@@@ -210,13 +210,13 @@@@ MUTOOL_SRC += source/tools/murun.c
d188 1
a188 1
@@@@ -224,7 +224,7 @@@@ TOOL_APPS += $(MURASTER_EXE)
d197 1
a197 1
@@@@ -232,10 +232,10 @@@@ ifeq ($(HAVE_GLUT),yes)
d212 1
a212 1
@@@@ -243,9 +243,9 @@@@ endif
d225 1
a225 1
@@@@ -254,12 +254,12 @@@@ endif
d244 1
a244 1
@@@@ -269,19 +269,19 @@@@ endif
d276 1
a276 1
@@@@ -294,10 +294,10 @@@@ $(OUT)/multi-threaded: docs/examples/mul
d291 1
a291 1
@@@@ -325,27 +325,30 @@@@ tools: $(TOOL_APPS)
@


1.24
log
@mupdf: Update to 1.16.0

pkgsrc changes:
 - (re)add curl option to build mupdf with curl support (disabled by default).
   Unlike previous versions that supported curl now mupdf with curl support is
   installed as a separate binary as `mupdf-curl' as done by upstream.

Changes:
1.16.0
------
api: Major overhaul of color management architecture.
api: Improved functions to verify/sign PDF documents.
api: Number tree accessor function pdf_lookup_number.
api: Parse and handle more options for PWG output.
api: Removed obsolete gproof document type.
api: User callbacks for warning and error messages.

epub: Changed default page size to A5.
epub: Draw embedded SVG documents in EPUB/XHTML.
epub: New Noto fonts covering more unicode scripts.
epub: Support small-caps font-variant.
pdf: Add Redact annotation type and function to apply redactions.
pdf: Add/remove/change encryption and password when saving PDF files.
pdf: Improvements to text handling in PDF filter processor.
pdf: MP and DP operators now call begin/end_layer device methods.
pdf: New and improved progressive loading.
svg: Draw external images in SVG documents.

mutool show: Add 'form' selector to list PDF form fields.
mutool sign: Sign PDF documents from the command line.
mutool sign: Verify signatures in PDF documents from the command line.
viewer: Option to save a script of user actions for replay with mutool run.
viewer: Runtime toggle for ICC and spot rendering.
viewer: Tooltip when hovering over a link in mupdf-gl.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.23 2019/05/17 05:45:10 wiz Exp $
d11 1
a11 1
--- Makefile.orig	2019-07-26 14:10:07.000000000 +0000
d28 1
a28 1
 TAGS_CMD = $(QUIET_TAGS) ctags -R
d176 2
a177 2
 $(MURASTER_EXE) : $(MURASTER_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB)
 	$(LINK_CMD) $(THIRD_LIBS) $(THREADING_LIBS)
d266 1
a266 1
@@@@ -292,10 +292,10 @@@@ $(OUT)/multi-threaded: docs/examples/mul
d281 1
a281 1
@@@@ -323,27 +323,30 @@@@ tools: $(TOOL_APPS)
@


1.23
log
@mupdf: restore LDFLAGS chunk of patch

Lost in last update; fixes RELRO builds.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.22 2019/05/13 11:03:58 leot Exp $
d9 1
d11 1
a11 1
--- Makefile.orig	2019-05-06 11:53:09.000000000 +0000
d13 1
a13 1
@@@@ -51,65 +51,65 @@@@ ifneq ($(verbose),yes)
a54 1
-	$(CC_CMD) -O0
d56 1
a56 1
+	$(CC_CMD)
d62 4
d101 2
a102 1
@@@@ -119,14 +119,14 @@@@ MUPDF_SRC += $(sort $(wildcard source/ht
a103 1
 MUPDF_SRC += $(sort $(wildcard source/gprf/*.c))
d119 14
a132 3
@@@@ -153,7 +153,7 @@@@ ifeq ($(HAVE_OBJCOPY),yes)
   $(OUT)/%.ttf.o : %.ttf ; $(OBJCOPY_CMD)
   $(OUT)/%.ttc.o : %.ttc ; $(OBJCOPY_CMD)
d139 1
a139 1
@@@@ -187,17 +187,17 @@@@ generate: source/pdf/js/util.js.h
d162 1
a162 1
@@@@ -208,13 +208,13 @@@@ MUTOOL_SRC += source/tools/murun.c
d178 1
a178 1
@@@@ -222,7 +222,7 @@@@ TOOL_APPS += $(MURASTER_EXE)
d187 1
a187 1
@@@@ -230,10 +230,10 @@@@ ifeq ($(HAVE_GLUT),yes)
d202 1
a202 1
@@@@ -241,9 +241,9 @@@@ endif
d215 20
a234 1
@@@@ -251,18 +251,18 @@@@ endif
d260 1
d262 1
d266 1
a266 1
@@@@ -273,10 +273,10 @@@@ $(OUT)/multi-threaded: docs/examples/mul
d281 1
a281 1
@@@@ -304,27 +304,30 @@@@ tools: $(TOOL_APPS)
@


1.22
log
@mupdf: Minor fix/cleanups/patch hunks readd accidentally lost in 1.15.0 update

Fixes:
- Use `HAVE_GLUT ?= yes' instead of `HAVE_GLUT := yes' in patch-ab:
  in that way possible `MAKE_ENV+= HAVE_GLUT=no' in options.mk is honored
  (in 1.15.0 update this could lead to building and installing mupdf-gl
  and failing due PLIST mismatch despite `opengl' option was not
  set.)

Cleanups/patch hunks readds/improvements:
 - Avoid to remove non existent thirdparty/curl directory no longer exists,
   do not remove it in post-extract
 - Clarify why pkgsrc lcms2 could not be used
 - Remove curl leftover in buildlink3.mk
 - Update patch-Makethird, patch-ab, patch-ac comments to reflect reality
 - Populate SYS_GLUT_{CFLAGS,LIBS} via `pkg-config'
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.21 2019/05/12 12:27:02 ryoon Exp $
d21 1
a21 1
+AR_CMD = $(QUIET_AR) $(MKTGTDIR) ; $(LIBTOOL) --mode=link $(CC) -o $@@ -version-info 0:0:0 -rpath $(PREFIX)/lib $^
@


1.21
log
@Update to 1.15.0

* Update lcms2 comment
* Remove removed www/curl option

Changelog:
List of changes in MuPDF 1.15.0

General improvements:
	* WebAssembly build target and examples.
	* Improved forms API in both C and Java bindings.
	* Improved forms JavaScript support.
	* Create appearance streams for more form field types.
	* Fixed many bugs in ICC color management.
	* Fixed many memory leaks in error cleanup.
	* Fixed bugs in pdfwrite output.
	* Improved text extraction from LaTeX documents with math symbols.
	* Improved trace device formatting.
	* Support CBZ and CBT files larger than 2Gb.
	* Show table of contents for FB2 and XHTML documents.
	* Show embedded raster images in SVG and XHTML documents.
	* Show FB2 cover page.
	* Add option to save PDF files without encryption.
	* Add inhibit-spaces option to stext device to turn off missing space detection.
	* Simplified fz_try/fz_always/fz_catch macros.

mupdf-gl improvements:
	* Automatically open annotation editor when selecting an annotation.
	* Full page color tinting option in mupdf-gl.
	* Show/hide table of contents sections.
	* Trigger a reload with sighup.
	* Toggle spot color mode with 'e'.

mutool improvements:
	mutool show $PDF outline -- show outline with open/closed state indicator.
	mutool show $PDF js -- show document level javascript.
	mutool clean -A -- create appearance streams when missing.
	mutool clean -AA -- recreate all appearance streams.
	mutool run docs/examples/portfolio.js -- extract embedded files from PDF document.
	mutool run docs/examples/pdf-dejpx.js -- decompress JPEG2000 images in PDF document.
	mutool run docs/examples/fix-s22pdf.js -- fix fonts in documents generated by S22PDF.

Significant API changes:
	* New and improved forms API.
	* Renamed -DNO_ICC to -DFZ_ENABLE_ICC=0
	* Removed fz_annot superclass. Use pdf_annot and pdf_widget directly instead.
	* Annotations and Widgets now have separate enumerators.
	* Added optional separations argument to pixmap rendering utility functions.

Various cleanups:
	Per-function documentation comments moved to the source file.
	Hopefully they will stay up to date more often than when they
	were hidden away in the header file.

	Removed unused internal testing tools: mjsgen and jstest.

	Removed TGA output support. Use one of the more common and useful PAM,
	PNM, PNG, or TIFF formats instead.

	Removed support for PDF portfolios. This work-in-progress feature was
	never completed, and only worked for a small subset of files.

	Removed support for progressive loading. This rarely used feature added
	a lot of complexity and was an unending source of bugs and strange
	behaviour. Removing this feature has allowed us to clean up and
	simplify large amounts of code, and fix dozens of bugs in one fell
	swoop.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.20 2018/10/04 19:02:33 leot Exp $
a8 3
- Install only one `mupdf' binary, prefer the featureful one and always
  install it as `mupdf'.
- Install all EXTRA_APPS (muraster, mujstest, mjsgen)
@


1.20
log
@mupdf: Update print/mupdf to 1.14.0

pkgsrc changes:
 - Pass USE_SYSTEM_LIBS=yes via MAKE_ENV in order to honor system (pkgsrc)
   packages {C,LD}FLAGS
 - Rewrite the logic to disable lcms2 in patch-ab and inject -DNO_ICC
   directly via CFLAGS

Changes:
MuPDF 1.14.0
------------
* New features:
    * Added "Source Han Serif" CJK fallback font.
    * Added more scripts to the Noto fallback fonts.
    * Multi-page PNM support.
    * "mutool show" now supports a path syntax for selecting objects to show.

* Build system simplifications:
    * Auto-generated CMap, ICC, and JS source files are checked in to git.
    * Embedded CMap resources are now generated by a python script.
    * Embedded font resources are linked directly if using GNU ld or windows.
    * Namegen tool replaced by use of C macros.
    * Simplified Makefile.

* Annotation editing:
    * New annotation editing mode in mupdf-gl.
    * Can create, edit, and delete most annotation types.
    * Can create appearance streams for most annotation types.
    * Can create appearance streams for Tx form fields.
    * Can create appearance streams for Ch form fields.

* Form filling in mupdf-gl:
    * Can click buttons, checkboxes, and radioboxes.
    * Can fill out text fields using dialog box.
    * Can select choice options using dialog box.
    * Can verify and sign digital signatures.

* Improved UI for mupdf-gl:
    * Password dialog.
    * Error dialog.
    * Open/save file dialog.
    * Snap selection to words or lines by holding control or control+shift.
    * Save and restore current location, bookmarks, and navigation history.

* Bug fixes:
    * Improved CJK character fallback handling in EPUB.

* API changes:
    * Pass rectangle and matrix structs by value.
    * Replaced PDF_NAME_Xxx macros with PDF_NAME(Xxx).
    * Added PDF_TRUE, PDF_FALSE, and PDF_NULL constant pdf_obj* macros.
    * Added helper functions: pdf_dict_get_int, etc.
    * Removed 'doc' argument in pdf_new_int, etc.
    * Quads instead of rects when highlighting and searching text.
    * mutool run: Pass arguments to script in scriptArgs global.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.19 2018/05/06 13:19:10 leot Exp $
d13 1
a13 1
--- Makefile.orig	2018-09-25 12:39:17.000000000 +0000
d15 1
a15 1
@@@@ -51,68 +51,68 @@@@ ifneq ($(verbose),yes)
d22 3
a24 3
+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 $<
+AR_CMD = $(QUIET_AR) $(MKTGTDIR) ; ${LIBTOOL} --mode=link $(CC) $(LDFLAGS) -o $@@ -version-info 0:0:0 -rpath ${PREFIX}/lib $^
d29 2
a30 2
+LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; ${LIBTOOL} --mode=link $(CC) $(LDFLAGS) -o $@@ $^ $(LIBS)
 TAGS_CMD = $(QUIET_TAGS) ctags $^
a64 4
-$(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
 
d100 1
a100 1
@@@@ -122,14 +122,14 @@@@ MUPDF_SRC += $(sort $(wildcard source/ht
d118 1
a118 1
@@@@ -156,7 +156,7 @@@@ ifeq ($(HAVE_OBJCOPY),yes)
d127 1
a127 1
@@@@ -190,17 +190,17 @@@@ generate: source/pdf/js/util.js.h
d150 1
a150 1
@@@@ -211,7 +211,7 @@@@ MUTOOL_SRC += source/tools/murun.c
d159 8
a166 1
@@@@ -219,28 +219,27 @@@@ INSTALL_APPS += $(MUTOOL_EXE)
a170 1
-  MUVIEW_GLUT_EXE := $(OUT)/mupdf-gl
d172 1
a172 1
+  MUVIEW_GLUT_EXE := $(OUT)/platform/gl/mupdf-gl
d175 1
a175 1
   INSTALL_APPS += $(MUVIEW_GLUT_EXE)
d183 1
a183 1
+  MUVIEW_X11_EXE := $(OUT)/platform/x11/mupdf
d189 2
a190 2
-  INSTALL_APPS += $(MUVIEW_X11_EXE)
 endif
d202 2
a203 4
   INSTALL_APPS += $(MUVIEW_WIN32_EXE)
@@@@ -248,19 +247,19 @@@@ endif
 
 # --- Extra tools and viewers ---
a204 45
-MURASTER_OBJ := $(OUT)/source/tools/muraster.o
+MURASTER_OBJ := $(OUT)/source/tools/muraster.lo
 MURASTER_EXE := $(OUT)/muraster
 $(MURASTER_EXE) : $(MURASTER_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB)
 	$(LINK_CMD) $(THIRD_LIBS) $(THREADING_LIBS)
 EXTRA_APPS += $(MURASTER_EXE)
 
-MJSGEN_OBJ := $(OUT)/source/tools/mjsgen.o
+MJSGEN_OBJ := $(OUT)/source/tools/mjsgen.lo
 MJSGEN_EXE := $(OUT)/mjsgen
 $(MJSGEN_EXE) : $(MJSGEN_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
 	$(LINK_CMD) $(THIRD_LIBS)
 EXTRA_APPS += $(MJSGEN_EXE)
 
-MUJSTEST_OBJ := $(addprefix $(OUT)/platform/x11/, jstest_main.o pdfapp.o)
+MUJSTEST_OBJ := $(addprefix $(OUT)/platform/x11/, jstest_main.lo pdfapp.lo)
 MUJSTEST_EXE := $(OUT)/mujstest
 $(MUJSTEST_EXE) : $(MUJSTEST_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(PKCS7_LIB)
 	$(LINK_CMD) $(THIRD_LIBS) $(LIBCRYPTO_LIBS)
@@@@ -268,33 +267,38 @@@@ EXTRA_APPS += $(MUJSTEST_EXE)
 
 ifeq ($(HAVE_X11),yes)
 ifeq ($(HAVE_CURL),yes)
-  MUVIEW_X11_CURL_EXE := $(OUT)/mupdf-x11-curl
-  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/pdfapp.o
-  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/x11_main.o
-  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/x11_image.o
-  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/curl_stream.o
+  MUVIEW_X11_CURL_EXE := $(OUT)/platform/x11/curl/mupdf
+  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/pdfapp.lo
+  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/x11_main.lo
+  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/x11_image.lo
+  MUVIEW_X11_CURL_OBJ += $(OUT)/platform/x11/curl/curl_stream.lo
   $(MUVIEW_X11_CURL_EXE) : $(MUVIEW_X11_CURL_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(PKCS7_LIB) $(CURL_LIB)
 	$(LINK_CMD) $(THIRD_LIBS) $(X11_LIBS) $(CURL_LIBS) $(LIBCRYPTO_LIBS)
-  EXTRA_APPS += $(MUVIEW_X11_CURL_EXE)
 endif
 endif
 
+ifeq "$(HAVE_CURL)" "yes"
+INSTALL_APPS += $(MUVIEW_X11_CURL_EXE)
+else ifeq "$(HAVE_X11)" "yes"
+INSTALL_APPS += $(MUVIEW_X11_EXE)
+endif
+
a211 1
--include $(CURL_OBJ:%.o=%.d)
a221 1
+-include $(CURL_OBJ:%.lo=%.d)
a228 1
--include $(MUVIEW_X11_CURL_OBJ:%.o=%.d)
a229 1
+-include $(MUVIEW_X11_CURL_OBJ:%.lo=%.d)
d233 1
a233 1
@@@@ -305,10 +309,10 @@@@ $(OUT)/multi-threaded: docs/examples/mul
d248 2
a249 3
@@@@ -336,28 +340,30 @@@@ apps: $(INSTALL_APPS)
 extra-apps: $(EXTRA_APPS)
 extra: extra-libs extra-apps
d251 1
a251 1
-install: libs apps
d255 3
a257 3
-	install include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf
-	install include/mupdf/fitz/*.h $(DESTDIR)$(incdir)/mupdf/fitz
-	install include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf
d260 1
a260 1
-	install $(INSTALL_LIBS) $(DESTDIR)$(libdir)
d263 1
a263 1
-	install $(INSTALL_APPS) $(DESTDIR)$(bindir)
d266 1
a266 1
-	install docs/man/*.1 $(DESTDIR)$(mandir)/man1
d270 6
a275 5
-	install README COPYING CHANGES $(DESTDIR)$(docdir)
-	install docs/*.html docs/*.css docs/*.png $(DESTDIR)$(docdir)
-	install docs/examples/* $(DESTDIR)$(docdir)/examples
+install: libs apps extra-apps
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(incdir) $(DESTDIR)$(incdir)/mupdf $(DESTDIR)$(incdir)/mupdf/fitz $(DESTDIR)$(incdir)/mupdf/pdf
d286 2
a287 2
+	for f in $(INSTALL_APPS) $(EXTRA_APPS); do \
+		${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} $$f $(DESTDIR)$(bindir); \
a292 1
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(docdir)
@


1.19
log
@mupdf: Update print/mupdf to 1.13.0

pkgsrc changes:
 - Directly override VERSION in files/mupdf.pc in the post-build phase
   (to avoid an extra manual step for every mupdf update)
 - Get rid of OPJ_STATIC patch hunk in patches/patch-source_fitz_load-jpx.c (it
   is no more needed, because the `-DOPJ_STATIC' is now passed in Makefile-s
   when the bundled openjpeg is used).
 - Pass HAVE_LIBCRYPTO=no to avoid requiring openssl>=1.1.0.

Changes:
1.13.0
------
* This is primarily a bugfix release.
* New "mutool sign" tool for showing and verifying digital signatures.
* Chinese, Japanese, Korean, Cyrillic, and Greek font support in mutool create.
* Improvements to annotation editing API.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.18 2017/12/18 15:06:34 leot Exp $
d13 1
a13 1
--- Makefile.orig	2018-04-12 13:14:06.000000000 +0000
d15 1
a15 2
@@@@ -72,10 +72,10 @@@@ QUIET_TAGS = @@ echo ' ' ' ' TAGS $@@ ;
 QUIET_WINDRES = @@ echo ' ' ' ' WINDRES $@@ ;
d18 12
a29 10
-CC_CMD = $(QUIET_CC) $(CC) $(CFLAGS) -o $@@ -c $<
-CXX_CMD = $(QUIET_CXX) $(CXX) $(filter-out -Wdeclaration-after-statement,$(CFLAGS)) -o $@@ -c $<
-AR_CMD = $(QUIET_AR) $(AR) cr $@@ $^
-LINK_CMD = $(QUIET_LINK) $(CC) $(LDFLAGS) -o $@@ $^ $(LIBS)
+CC_CMD = $(QUIET_CC) ${LIBTOOL} --mode=compile $(CC) $(CFLAGS) -o $@@ -c $<
+CXX_CMD = $(QUIET_CXX) ${LIBTOOL} --mode=compile $(CXX) $(CFLAGS) -o $@@ -c $<
+AR_CMD = $(QUIET_AR) ${LIBTOOL} --mode=link $(CC) $(LDFLAGS) -o $@@ -version-info 0:0:0 -rpath ${PREFIX}/lib $^
+LINK_CMD = $(QUIET_LINK) ${LIBTOOL} --mode=link $(CC) -o $@@ $^ $(LDFLAGS) $(LIBS)
 MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $@@
 RM_CMD = $(QUIET_RM) rm -f $@@
d31 4
a34 3
@@@@ -86,45 +86,45 @@@@ WINDRES_CMD = $(QUIET_WINDRES) $(WINDRES
 $(ALL_DIR) $(OUT) generated :
 	$(MKDIR_CMD)
a37 1
 	$(RM_CMD)
d41 1
a41 2
-$(OUT)/%.exe: $(OUT)/%.o | $(ALL_DIR)
+$(OUT)/%.exe: $(OUT)/%.lo | $(ALL_DIR)
d44 2
a45 2
-$(OUT)/source/helpers/mu-threads/%.o : source/helpers/mu-threads/%.c | $(ALL_DIR)
+$(OUT)/source/helpers/mu-threads/%.lo : source/helpers/mu-threads/%.c | $(ALL_DIR)
d48 7
a54 7
-$(OUT)/source/helpers/pkcs7/%.o : source/helpers/pkcs7/%.c | $(ALL_DIR)
+$(OUT)/source/helpers/pkcs7/%.lo : source/helpers/pkcs7/%.c | $(ALL_DIR)
 	$(CC_CMD)
 
-$(OUT)/source/tools/%.o : source/tools/%.c | $(ALL_DIR)
+$(OUT)/source/tools/%.lo : source/tools/%.c | $(ALL_DIR)
 	$(CC_CMD) $(THREADING_CFLAGS)
d56 1
a56 1
-$(OUT)/generated/%.o : generated/%.c | $(ALL_DIR)
d58 1
a58 1
+$(OUT)/generated/%.lo : generated/%.c | $(ALL_DIR)
d61 25
a85 3
-$(OUT)/platform/x11/%.o : platform/x11/%.c | $(ALL_DIR)
+$(OUT)/platform/x11/%.lo : platform/x11/%.c | $(ALL_DIR)
 	$(CC_CMD) $(X11_CFLAGS)
d87 2
a88 2
-$(OUT)/platform/x11/%.o: platform/x11/%.rc | $(ALL_DIR)
+$(OUT)/platform/x11/%.lo: platform/x11/%.rc | $(ALL_DIR)
a90 16
-$(OUT)/platform/x11/curl/%.o : platform/x11/%.c | $(ALL_DIR)
+$(OUT)/platform/x11/curl/%.lo : platform/x11/%.c | $(ALL_DIR)
 	$(CC_CMD) $(X11_CFLAGS) $(CURL_CFLAGS) -DHAVE_CURL
 
-$(OUT)/platform/gl/%.o : platform/gl/%.c | $(ALL_DIR)
+$(OUT)/platform/gl/%.lo : platform/gl/%.c | $(ALL_DIR)
 	$(CC_CMD) $(GLUT_CFLAGS)
 
-$(OUT)/%.o : %.c | $(ALL_DIR)
+$(OUT)/%.lo : %.c | $(ALL_DIR)
 	$(CC_CMD)
 
-$(OUT)/%.o : %.cpp | $(ALL_DIR)
+$(OUT)/%.lo : %.cpp | $(ALL_DIR)
 	$(CXX_CMD)
 
d93 1
d97 15
a111 11
@@@@ -153,16 +153,16 @@@@ SVG_SRC_HDR := $(wildcard source/svg/*.h
 HTML_SRC_HDR := $(wildcard source/html/*.h)
 GPRF_SRC_HDR := $(wildcard source/gprf/*.h)
 
-FITZ_OBJ := $(FITZ_SRC:%.c=$(OUT)/%.o)
-PDF_OBJ := $(PDF_SRC:%.c=$(OUT)/%.o)
-XPS_OBJ := $(XPS_SRC:%.c=$(OUT)/%.o)
-SVG_OBJ := $(SVG_SRC:%.c=$(OUT)/%.o)
-CBZ_OBJ := $(CBZ_SRC:%.c=$(OUT)/%.o)
-HTML_OBJ := $(HTML_SRC:%.c=$(OUT)/%.o)
-GPRF_OBJ := $(GPRF_SRC:%.c=$(OUT)/%.o)
d113 4
a117 9
-SIGNATURE_OBJ := $(OUT)/platform/x11/pdfapp.o $(OUT)/source/tools/pdfsign.o
+FITZ_OBJ := $(FITZ_SRC:%.c=$(OUT)/%.lo)
+PDF_OBJ := $(PDF_SRC:%.c=$(OUT)/%.lo)
+XPS_OBJ := $(XPS_SRC:%.c=$(OUT)/%.lo)
+SVG_OBJ := $(SVG_SRC:%.c=$(OUT)/%.lo)
+CBZ_OBJ := $(CBZ_SRC:%.c=$(OUT)/%.lo)
+HTML_OBJ := $(HTML_SRC:%.c=$(OUT)/%.lo)
+GPRF_OBJ := $(GPRF_SRC:%.c=$(OUT)/%.lo)
+THREAD_OBJ := $(THREAD_SRC:%.c=$(OUT)/%.lo)
a118 1
+SIGNATURE_OBJ := $(OUT)/platform/x11/pdfapp.lo $(OUT)/source/tools/pdfsign.lo
d120 8
a127 4
 $(FITZ_OBJ) : $(FITZ_HDR) $(FITZ_SRC_HDR)
 $(PDF_OBJ) : $(FITZ_HDR) $(PDF_HDR) $(PDF_SRC_HDR)
@@@@ -190,7 +190,7 @@@@ ifneq "$(CROSSCOMPILE)" "yes"
 $(NAME_GEN) : $(NAMEDUMP_EXE)
d130 2
a131 51
-$(OUT)/source/pdf/pdf-object.o : source/pdf/pdf-name-table.h
+$(OUT)/source/pdf/pdf-object.lo : source/pdf/pdf-name-table.h
 
 generate: $(NAME_GEN)
 
@@@@ -212,7 +212,7 @@@@ FONT_GEN_SIL := $(subst resources/fonts/
 
 FONT_BIN := $(FONT_BIN_DROID) $(FONT_BIN_NOTO) $(FONT_BIN_HAN) $(FONT_BIN_URW) $(FONT_BIN_SIL)
 FONT_GEN := $(FONT_GEN_DROID) $(FONT_GEN_NOTO) $(FONT_GEN_HAN) $(FONT_GEN_URW) $(FONT_GEN_SIL)
-FONT_OBJ := $(FONT_GEN:%.c=$(OUT)/%.o)
+FONT_OBJ := $(FONT_GEN:%.c=$(OUT)/%.lo)
 
 generated/%.c : resources/fonts/droid/%.ttf $(HEXDUMP_EXE) | generated
 	$(QUIET_GEN) $(HEXDUMP_EXE) -s $@@ $<
@@@@ -242,7 +242,7 @@@@ generate: $(FONT_GEN)
 
 ICC_BIN := resources/icc/gray.icc resources/icc/rgb.icc resources/icc/cmyk.icc resources/icc/lab.icc
 ICC_GEN := generated/icc-profiles.c
-ICC_OBJ := $(ICC_GEN:%.c=$(OUT)/%.o)
+ICC_OBJ := $(ICC_GEN:%.c=$(OUT)/%.lo)
 
 $(ICC_OBJ) : $(ICC_GEN)
 $(ICC_GEN) : $(ICC_BIN) | generated
@@@@ -268,7 +268,7 @@@@ CMAP_GEN := \
 	generated/pdf-cmap-extra.c \
 	generated/pdf-cmap-utf8.c \
 	generated/pdf-cmap-utf32.c
-CMAP_OBJ := $(CMAP_GEN:%.c=$(OUT)/%.o)
+CMAP_OBJ := $(CMAP_GEN:%.c=$(OUT)/%.lo)
 
 generated/pdf-cmap-cjk.c : $(CMAP_CJK_SRC) | generated
 	$(QUIET_GEN) $(CMAPDUMP_EXE) $@@ $(CMAP_CJK_SRC)
@@@@ -287,7 +287,7 @@@@ endif
 
 generate: $(CMAP_GEN)
 
-$(OUT)/scripts/cmapdump.o : \
+$(OUT)/scripts/cmapdump.lo : \
 	$(NAME_GEN) \
 	include/mupdf/pdf/cmap.h \
 	source/fitz/context.c \
@@@@ -310,7 +310,7 @@@@ $(OUT)/scripts/cmapdump.o : \
 
 JAVASCRIPT_SRC := source/pdf/pdf-js-util.js
 JAVASCRIPT_GEN := generated/pdf-js-util.c
-JAVASCRIPT_OBJ := $(JAVASCRIPT_GEN:%.c=$(OUT)/%.o)
+JAVASCRIPT_OBJ := $(JAVASCRIPT_GEN:%.c=$(OUT)/%.lo)
 
 $(JAVASCRIPT_GEN) : $(JAVASCRIPT_SRC) | generated
 	$(QUIET_GEN) $(HEXDUMP_EXE) -0 $@@ $(JAVASCRIPT_SRC)
@@@@ -325,10 +325,10 @@@@ generate: $(JAVASCRIPT_GEN)
d136 3
a138 3
-THIRD_LIB = $(OUT)/libmupdfthird.a
-THREAD_LIB = $(OUT)/libmuthreads.a
-PKCS7_LIB = $(OUT)/libmupkcs7.a
d140 6
a145 7
+THIRD_LIB = $(OUT)/libmupdfthird.la
+THREAD_LIB = $(OUT)/libmuthreads.la
+PKCS7_LIB = $(OUT)/libmupkcs7.la
 
 MUPDF_OBJ := \
 	$(FITZ_OBJ) \
@@@@ -360,46 +360,46 @@@@ $(THIRD_LIB) : $(THIRD_OBJ)
d152 1
a152 1
 # --- Tools and Apps ---
d154 3
a156 2
 MUTOOL_EXE := $(OUT)/mutool
 MUTOOL_SRC := source/tools/mutool.c source/tools/muconvert.c source/tools/mudraw.c source/tools/murun.c source/tools/mutrace.c
d160 44
a203 3
 $(MUTOOL_OBJ) : $(FITZ_HDR) $(PDF_HDR)
 $(MUTOOL_EXE) : $(MUTOOL_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) $(PKCS7_LIB)
 	$(LINK_CMD) $(THREADING_LIBS)
a204 1
 MURASTER_EXE := $(OUT)/muraster
d207 1
a207 1
 $(MURASTER_OBJ) : $(FITZ_HDR)
d209 2
a210 1
 	$(LINK_CMD) $(THREADING_LIBS)
a211 1
 MJSGEN_EXE := $(OUT)/mjsgen
d214 1
a214 1
 $(MJSGEN_OBJ) : $(FITZ_HDR) $(PDF_HDR)
d216 2
a217 1
 	$(LINK_CMD)
a218 1
 MUJSTEST_EXE := $(OUT)/mujstest
d221 1
a221 1
 $(MUJSTEST_OBJ) : $(FITZ_HDR) $(PDF_HDR)
d223 2
a224 1
 	$(LINK_CMD)
d226 16
a241 18
 ifeq "$(HAVE_X11)" "yes"
-MUVIEW_X11_EXE := $(OUT)/mupdf-x11
-MUVIEW_X11_OBJ := $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o)
+MUVIEW_X11_EXE := $(OUT)/platform/x11/mupdf
+MUVIEW_X11_OBJ := $(addprefix $(OUT)/platform/x11/, x11_main.lo x11_image.lo pdfapp.lo)
 $(MUVIEW_X11_OBJ) : $(FITZ_HDR) $(PDF_HDR)
 $(MUVIEW_X11_EXE) : $(MUVIEW_X11_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(PKCS7_LIB)
 	$(LINK_CMD) $(X11_LIBS)
 
 ifeq "$(HAVE_CURL)" "yes"
-MUVIEW_X11_CURL_EXE := $(OUT)/mupdf-x11-curl
-MUVIEW_X11_CURL_OBJ := $(addprefix $(OUT)/platform/x11/curl/, x11_main.o x11_image.o pdfapp.o curl_stream.o)
+MUVIEW_X11_CURL_EXE := $(OUT)/platform/x11/curl/mupdf
+MUVIEW_X11_CURL_OBJ := $(addprefix $(OUT)/platform/x11/curl/, x11_main.lo x11_image.lo pdfapp.lo curl_stream.lo)
 $(MUVIEW_X11_CURL_OBJ) : $(FITZ_HDR) $(PDF_HDR)
 $(MUVIEW_X11_CURL_EXE) : $(MUVIEW_X11_CURL_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(CURL_LIB) $(PKCS7_LIB)
 	$(LINK_CMD) $(X11_LIBS) $(CURL_LIBS) $(SYS_CURL_DEPS)
@@@@ -407,8 +407,8 @@@@ endif
a243 29
 ifeq "$(HAVE_GLUT)" "yes"
-MUVIEW_GLUT_EXE := $(OUT)/mupdf-gl
-MUVIEW_GLUT_OBJ := $(addprefix $(OUT)/platform/gl/, gl-font.o gl-input.o gl-main.o)
+MUVIEW_GLUT_EXE := $(OUT)/platform/gl/mupdf-gl
+MUVIEW_GLUT_OBJ := $(addprefix $(OUT)/platform/gl/, gl-font.lo gl-input.lo gl-main.lo)
 $(MUVIEW_GLUT_OBJ) : $(FITZ_HDR) $(PDF_HDR) platform/gl/gl-app.h
 $(MUVIEW_GLUT_EXE) : $(MUVIEW_GLUT_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(GLUT_LIB)
 	$(LINK_CMD) $(GLUT_LIB) $(GLUT_LIBS)
@@@@ -416,7 +416,7 @@@@ endif
 
 ifeq "$(HAVE_WIN32)" "yes"
 MUVIEW_WIN32_EXE := $(OUT)/mupdf
-MUVIEW_WIN32_OBJ := $(addprefix $(OUT)/platform/x11/, win_main.o pdfapp.o win_res.o)
+MUVIEW_WIN32_OBJ := $(addprefix $(OUT)/platform/x11/, win_main.lo pdfapp.lo win_res.lo)
 $(MUVIEW_WIN32_OBJ) : $(FITZ_HDR) $(PDF_HDR)
 $(MUVIEW_WIN32_EXE) : $(MUVIEW_WIN32_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(PKCS7_LIB)
 	$(LINK_CMD) $(WIN32_LIBS)
@@@@ -425,11 +425,21 @@@@ endif
 MUVIEW_EXE := $(MUVIEW_X11_EXE) $(MUVIEW_WIN32_EXE) $(MUVIEW_GLUT_EXE)
 MUVIEW_CURL_EXE := $(MUVIEW_X11_CURL_EXE) $(MUVIEW_WIN32_CURL_EXE)
 
-INSTALL_APPS := $(MUTOOL_EXE) $(MUVIEW_EXE)
+INSTALL_APPS := $(MUTOOL_EXE)
 EXTRA_APPS += $(MURASTER_EXE)
-EXTRA_APPS += $(MUVIEW_CURL_EXE)
 EXTRA_APPS += $(MUJSTEST_EXE)
 EXTRA_APPS += $(MJSGEN_EXE)
+INSTALL_APPS += $(EXTRA_APPS)
+ 
d245 1
a245 1
+INSTALL_APPS += $(MUVIEW_CURL_EXE)
d247 1
a247 1
+INSTALL_APPS += $(MUVIEW_EXE)
d250 29
a278 3
+ifeq "$(HAVE_GLUT)" "yes"
+INSTALL_APPS += $(MUVIEW_GLUT_EXE)
+endif
d282 1
a282 1
@@@@ -442,10 +452,10 @@@@ $(OUT)/multi-threaded: docs/examples/mul
d297 2
a298 1
@@@@ -474,27 +484,29 @@@@ extra-apps: $(EXTRA_APPS)
d301 1
a301 1
 install: libs apps
d323 1
d335 1
a335 1
+	for f in $(INSTALL_APPS); do \
@


1.18
log
@mupdf: Update print/mupdf to 1.12.0

pkgsrc changes:
 - Add support for the `opengl' option via graphics/glut and remove the `glfw'
   option to follow upstream changes. Adjust options.mk and buildlink3.mk
   accordingly.
 - Add patches/patch-platform_gl_gl-app.h to not force freeglut GLUT
   implementation to every non-APPLE platforms (glut also works!) and adjust the
   glut.h include.
 - Add a commented out lcms2 bl3 inclusion entry, lcms2>=2.9 is needed (due
   "lcms2art.h" et al. inclusion, so disable it for now)
 - Explain the OPJ_STATIC comment in patches/patch-source_fitz_load-jpx.c
   a bit more in depth... ...this will hopefully save some time to
   debug opj_* undefined symbols when trying to link libmupdf and
   accidently omitting the patches/patch-source_fitz_load-jpx.c
   hunk (for extra debugging stories fun, if OPJ_STATIC is defined
   some opj_* symbols are defined while others are not defined,
   making the debugging of that problem more naughty!).
 - Inject HAVE_{CURL,GLUT} variables via MAKE_ENV in options.mk to avoid
   depending on www/curl and graphics/glut (yes, that's a bit kludgy
   but unfortunately mupdf doesn't have a configure and so there
   isn't a more sensible way to do it).  This is needed to avoid
   building mupdf-gl for native X.org where the glut.pc pkg-config
   file is available at build time.  Also adjust patches/patch-ab
   accordingly.
 - Remove patches/patch-CVE*, they are no longer needed (all applied in 1.12.0)
 - Bump BUILDLINK_API_DEPENDS.mupdf to 1.12.0 (there were several API changes
   from 1.11 to 1.12.0) and remove the now redundant and no longer needed
   BUILDLINK_ABI_DEPENDS.mupdf.

Changes:
List of changes in MuPDF 1.12.0

* Color management:
   * LCMS2 library for color management.
   * CMYK rendering with overprint simulation.
   * Spot color rendering.
   * Transparency rendering fixes.

* Structured text output improvements:
   * Reworked structured text API.
   * Faster text searching.
   * Highlight and copy text by selecting lines instead of by area.
   * New semantic XHTML output format.
   * New layout preserving HTML output format.

* Features and improvements:
   * Improved non-AA rendering with new scan converter.
   * Improved LARGEFILE support.
   * Improved TIFF support.
   * Improved documentation.
   * PCLm output.
   * PSD output.
   * New "mutool trace" tool.
   * New "mutool sign" tool (work in progress).
   * Text redaction (work in progress).

* Lots of bug fixes.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.17 2017/07/16 08:29:53 leot Exp $
d5 1
a5 1
- Also install muthreads library (needed by various tools)
d11 1
d13 1
a13 1
--- Makefile.orig	2017-11-23 11:42:45.000000000 +0000
d15 1
a15 1
@@@@ -71,10 +71,10 @@@@ QUIET_TAGS = @@ echo ' ' ' ' TAGS $@@ ;
d20 1
a20 1
-CXX_CMD = $(QUIET_CXX) $(CXX) $(CFLAGS) -o $@@ -c $<
d30 1
a30 1
@@@@ -85,42 +85,42 @@@@ WINDRES_CMD = $(QUIET_WINDRES) $(WINDRES
d44 2
a45 2
-$(OUT)/source/helpers/%.o : source/helpers/%.c | $(ALL_DIR)
+$(OUT)/source/helpers/%.lo : source/helpers/%.c | $(ALL_DIR)
d48 4
d90 1
a90 1
@@@@ -144,14 +144,14 @@@@ SVG_SRC_HDR := $(wildcard source/svg/*.h
d102 2
d112 2
d117 1
a117 1
@@@@ -177,7 +177,7 @@@@ ifneq "$(CROSSCOMPILE)" "yes"
d126 1
a126 1
@@@@ -199,7 +199,7 @@@@ FONT_GEN_SIL := $(subst resources/fonts/
d135 1
a135 1
@@@@ -229,7 +229,7 @@@@ generate: $(FONT_GEN)
d144 1
a144 1
@@@@ -255,7 +255,7 @@@@ CMAP_GEN := \
d153 1
a153 1
@@@@ -274,7 +274,7 @@@@ endif
d162 1
a162 1
@@@@ -297,7 +297,7 @@@@ $(OUT)/scripts/cmapdump.o : \
d171 1
a171 1
@@@@ -312,9 +312,9 @@@@ generate: $(JAVASCRIPT_GEN)
d178 1
d182 1
d186 1
a186 2
@@@@ -347,46 +347,46 @@@@ $(MUPDF_LIB) : $(MUPDF_OBJ)
 $(THIRD_LIB) : $(THIRD_OBJ)
d188 1
d191 1
a191 1
+INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB)
d201 1
a201 1
 $(MUTOOL_EXE) : $(MUTOOL_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB)
d222 1
a222 1
 $(MUJSTEST_EXE) : $(MUJSTEST_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
d231 1
a231 1
 $(MUVIEW_X11_EXE) : $(MUVIEW_X11_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
d240 1
a240 1
 $(MUVIEW_X11_CURL_EXE) : $(MUVIEW_X11_CURL_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(CURL_LIB)
d242 1
a242 1
@@@@ -394,8 +394,8 @@@@ endif
d253 1
a253 1
@@@@ -403,7 +403,7 @@@@ endif
d260 1
a260 1
 $(MUVIEW_WIN32_EXE) : $(MUVIEW_WIN32_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
d262 1
a262 1
@@@@ -412,11 +412,20 @@@@ endif
d268 5
a272 4
 INSTALL_APPS += $(MURASTER_EXE)
-INSTALL_APPS += $(MUVIEW_CURL_EXE)
 INSTALL_APPS += $(MUJSTEST_EXE)
 INSTALL_APPS += $(MJSGEN_EXE)
d286 1
a286 1
@@@@ -429,10 +438,10 @@@@ $(OUT)/multi-threaded: docs/examples/mul
d301 2
a302 2
@@@@ -459,27 +468,29 @@@@ libs: $(INSTALL_LIBS)
 apps: $(INSTALL_APPS)
@


1.17
log
@Do not possibly (re)initialize LDFLAGS and pass it also to AR_CMD.
This fixes RELRO build.

Bump PKGREVISION
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.16 2017/04/12 13:03:08 leot Exp $
d3 5
a7 5
o libtool support 
o Install target cleanup
o Also install muthreads library (needed by various tools)
o Do not force `-O0' flag when building
o Get rid of unused VERSION variable and `version:' target (otherwise `git' can
d9 2
a10 2
o Install only one "mupdf" binary, prefer the featureful one and always
  install it as "mupdf"
d12 1
a12 1
--- Makefile.orig	2017-04-05 11:02:21.000000000 +0000
d14 3
a16 3
@@@@ -57,65 +57,51 @@@@ ALL_DIR += $(OUT)/platform/gl
 
 # --- Commands ---
a17 12
-ifneq "$(verbose)" "yes"
-QUIET_AR = @@ echo ' ' ' ' AR $@@ ;
-QUIET_CC = @@ echo ' ' ' ' CC $@@ ;
-QUIET_CXX = @@ echo ' ' ' ' CXX $@@ ;
-QUIET_GEN = @@ echo ' ' ' ' GEN $@@ ;
-QUIET_LINK = @@ echo ' ' ' ' LINK $@@ ;
-QUIET_MKDIR = @@ echo ' ' ' ' MKDIR $@@ ;
-QUIET_RM = @@ echo ' ' ' ' RM $@@ ;
-QUIET_TAGS = @@ echo ' ' ' ' TAGS $@@ ;
-QUIET_WINDRES = @@ echo ' ' ' ' WINDRES $@@ ;
-endif
-
d22 8
a29 13
-MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $@@
-RM_CMD = $(QUIET_RM) rm -f $@@
-TAGS_CMD = $(QUIET_TAGS) ctags $^
-WINDRES_CMD = $(QUIET_WINDRES) $(WINDRES) $< $@@
+CC_CMD = ${LIBTOOL} --mode=compile $(CC) $(CFLAGS) -o $@@ -c $<
+CXX_CMD = ${LIBTOOL} --mode=compile $(CXX) $(CFLAGS) -o $@@ -c $<
+AR_CMD = ${LIBTOOL} --mode=link $(CC) $(LDFLAGS) -o $@@ -version-info 0:0:0 -rpath ${PREFIX}/lib $^
+LINK_CMD = ${LIBTOOL} --mode=link $(CC) -o $@@ $^ $(LDFLAGS) $(LIBS)
+MKDIR_CMD = mkdir -p $@@
+RM_CMD = rm -f $@@
 
 # --- Rules ---
 
a42 8
-$(OUT)/%.o : %.c | $(ALL_DIR)
+$(OUT)/%.lo : %.c | $(ALL_DIR)
 	$(CC_CMD)
 
-$(OUT)/%.o : %.cpp | $(ALL_DIR)
+$(OUT)/%.lo : %.cpp | $(ALL_DIR)
 	$(CXX_CMD)
 
d45 5
a49 1
 	$(CC_CMD) $(PTHREAD_CFLAGS) -DHAVE_PTHREAD
d70 9
a78 1
 	$(CC_CMD) $(GLFW_CFLAGS)
d85 1
a85 1
@@@@ -141,14 +127,14 @@@@ SVG_SRC_HDR := $(wildcard source/svg/*.h
d108 1
a108 1
@@@@ -172,7 +158,7 @@@@ ifneq "$(CROSSCOMPILE)" "yes"
d117 1
a117 1
@@@@ -194,7 +180,7 @@@@ FONT_GEN_SIL := $(subst resources/fonts/
d125 22
a146 4
 	$(QUIET_GEN) $(HEXDUMP_EXE) $@@ $<
@@@@ -244,7 +230,7 @@@@ ifneq "$(CROSSCOMPILE)" "yes"
 $(CMAP_GEN) : $(CMAPDUMP_EXE)
 endif
d153 1
a153 3
@@@@ -264,7 +250,7 @@@@ $(OUT)/scripts/cmapdump.o : \
 	source/pdf/pdf-cmap.c \
 	source/pdf/pdf-cmap-parse.c \
d155 8
a162 22
-$(OUT)/source/pdf/pdf-cmap-table.o : $(CMAP_GEN)
+$(OUT)/source/pdf/pdf-cmap-table.lo : $(CMAP_GEN)
 
 generate: $(CMAP_GEN)
 
@@@@ -279,7 +265,7 @@@@ ifneq "$(CROSSCOMPILE)" "yes"
 $(ADOBECA_GEN) : $(HEXDUMP_EXE)
 endif
 
-$(OUT)/source/pdf/pdf-pkcs7.o : $(ADOBECA_GEN)
+$(OUT)/source/pdf/pdf-pkcs7.lo : $(ADOBECA_GEN)
 
 generate: $(ADOBECA_GEN)
 
@@@@ -294,15 +280,15 @@@@ ifneq "$(CROSSCOMPILE)" "yes"
 $(JAVASCRIPT_GEN) : $(HEXDUMP_EXE)
 endif
 
-$(OUT)/source/pdf/pdf-js.o : $(JAVASCRIPT_GEN)
+$(OUT)/source/pdf/pdf-js.lo : $(JAVASCRIPT_GEN)
 
 generate: $(JAVASCRIPT_GEN)
d173 3
a175 3
 MUPDF_OBJ := $(FITZ_OBJ) $(FONT_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(SVG_OBJ) $(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ)
 THIRD_OBJ := $(FREETYPE_OBJ) $(HARFBUZZ_OBJ) $(JBIG2DEC_OBJ) $(LIBJPEG_OBJ) $(JPEGXR_OBJ) $(LURATECH_OBJ) $(MUJS_OBJ) $(OPENJPEG_OBJ) $(ZLIB_OBJ)
@@@@ -312,46 +298,46 @@@@ $(MUPDF_LIB) : $(MUPDF_OBJ)
d185 2
a186 2
 MUTOOL_SRC := source/tools/mutool.c source/tools/muconvert.c source/tools/mudraw.c source/tools/murun.c
 MUTOOL_SRC += $(wildcard source/tools/pdf*.c)
d191 1
a191 1
 	$(LINK_CMD) $(PTHREAD_LIBS)
d198 1
a198 1
 	$(LINK_CMD) $(PTHREAD_LIBS)
d231 1
a231 1
@@@@ -359,8 +345,8 @@@@ endif
d234 9
a242 9
 ifeq "$(HAVE_GLFW)" "yes"
-MUVIEW_GLFW_EXE := $(OUT)/mupdf-gl
-MUVIEW_GLFW_OBJ := $(addprefix $(OUT)/platform/gl/, gl-font.o gl-input.o gl-main.o)
+MUVIEW_GLFW_EXE := $(OUT)/platform/gl/mupdf-gl
+MUVIEW_GLFW_OBJ := $(addprefix $(OUT)/platform/gl/, gl-font.lo gl-input.lo gl-main.lo)
 $(MUVIEW_GLFW_OBJ) : $(FITZ_HDR) $(PDF_HDR) platform/gl/gl-app.h
 $(MUVIEW_GLFW_EXE) : $(MUVIEW_GLFW_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(GLFW_LIB)
 	$(LINK_CMD) $(GLFW_LIBS)
@@@@ -368,7 +354,7 @@@@ endif
d251 2
a252 2
@@@@ -377,11 +363,20 @@@@ endif
 MUVIEW_EXE := $(MUVIEW_X11_EXE) $(MUVIEW_WIN32_EXE) $(MUVIEW_GLFW_EXE)
d260 2
a261 1
 
d268 2
a269 2
+ifeq "$(HAVE_GLFW)" "yes"
+INSTALL_APPS += $(MUVIEW_GLFW_EXE)
d271 1
a271 1
+
d274 1
a274 2
 examples: $(OUT)/example $(OUT)/multi-threaded
@@@@ -393,10 +388,10 @@@@ $(OUT)/multi-threaded: docs/multi-thread
d289 1
a289 1
@@@@ -423,24 +418,26 @@@@ libs: $(INSTALL_LIBS)
d305 9
d328 1
a328 3
 
-	install -d $(DESTDIR)$(mandir)/man1
-	install docs/man/*.1 $(DESTDIR)$(mandir)/man1
d331 1
a331 3
 
-	install -d $(DESTDIR)$(docdir)
-	install README COPYING CHANGES docs/*.txt $(DESTDIR)$(docdir)
d333 4
a336 1
+	${BSD_INSTALL_DATA} README COPYING CHANGES docs/*.txt $(DESTDIR)$(docdir)
@


1.16
log
@Update print/mupdf to 1.11

Changes:
List of changes in MuPDF 1.11
-----------------------------
* This is primarily a bug fix release.
* Split Android and iOS viewers into separate projects:
   - mupdf-viewer-ios.git has the iOS viewer.
   - mupdf-viewer-android-old.git has the Android viewer.
   - mupdf-viewer-android-nui.git has a new advanced Android viewer.
   - mupdf-viewer-android-mini.git has a new minimalist Android viewer.
* PDF portfolio support with command line tool "mutool portfolio".
* Add callbacks to load fallback fonts from the system.
* Use system fonts in Android to reduce install size.
* Flag to disable publisher styles in EPUB layout.
* Improved SVG output.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.15 2016/11/28 14:40:42 leot Exp $
d12 1
a12 1
--- Makefile.orig	2017-03-31 14:23:45.000000000 +0000
d40 1
a40 1
+AR_CMD = ${LIBTOOL} --mode=link $(CC) -o $@@ -version-info 0:0:0 -rpath ${PREFIX}/lib $^
@


1.15
log
@Update print/mupdf to mupdf-1.10

pkgsrc changes:
 * Update DESCR and COMMENT to better reflect current status of MuPDF
 * Delete security patches addressing CVE-2016-6265 and CVE-2016-6525,
   fixed upstream.
 * Bump BUILDLINK_A[BP]I_DEPENDS.mupdf (no longer compatible with 1.9 API)

Changes:
List of changes in MuPDF 1.10

* Headline changes:
  * FictionBook (FB2) e-book support.
  * Simple SVG parser (a small subset of SVG only).
  * mutool convert: a new document conversion tool and interface.
  * Multi-threaded rendering in mudraw.
  * Luratech decoders for JBIG2 and JPEG2000 (commercial releases only).
  * Optional JPEG-XR support (not included by default for security reasons).
  * Updated base 14 fonts from URW.
  * New CJK font with language specific variants.
  * Hyperlink support in EPUB.

* Reduced memory use:
  * New tool muraster: example printer driver with limited RAM usage and automatic banding.
  * Alpha channel is now optional in pixmaps.
  * More aggressive purging of cached objects.
  * Partial image decoding for lower memory use when banding.

* Reduced code size when building with a subset of features:
  * Reduced default set of built-in CMap tables to the minimum required.
  * FZ_ENABLE_PDF, _XPS, _JS, to disable features at compile time.
  * Function level linking.

* Interface changes and cleanups:
  * Dropped pdf object generation numbers from public interfaces.
  * Simplified PDF page, xobject, and annotation internals.
  * Closing and freeing devices and writers are now separate steps.
  * Improved PDF annotation editing interface (still a work in progress).
  * Document writer interface.
  * Banded image writer interface.

* Mobile viewers:
  * New JNI interfaces to match capabilities of 'mutool run' javascript.
  * New android and desktop java examples using new JNI interface.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.14 2016/04/27 12:34:58 leot Exp $
d5 1
d7 2
a8 1
o Install MUTOOL_LIB as part of INSTALL_LIBS
d12 1
a12 1
--- Makefile.orig	2016-11-21 10:21:11.000000000 +0000
d14 1
a14 1
@@@@ -42,26 +42,12 @@@@ CFLAGS += $(ZLIB_CFLAGS)
d45 1
a45 40
 # --- File lists ---
 
@@@@ -98,13 +84,13 @@@@ SVG_SRC_HDR := $(wildcard source/svg/*.h
 HTML_SRC_HDR := $(wildcard source/html/*.h)
 GPRF_SRC_HDR := $(wildcard source/gprf/*.h)
 
-FITZ_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(FITZ_SRC))))
-PDF_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(PDF_SRC))))
-XPS_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(XPS_SRC))))
-SVG_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(SVG_SRC))))
-CBZ_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(CBZ_SRC))))
-HTML_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(HTML_SRC))))
-GPRF_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(GPRF_SRC))))
+FITZ_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(FITZ_SRC))))
+PDF_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(PDF_SRC))))
+XPS_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(XPS_SRC))))
+SVG_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(SVG_SRC))))
+CBZ_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(CBZ_SRC))))
+HTML_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(HTML_SRC))))
+GPRF_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(GPRF_SRC))))
 
 $(FITZ_OBJ) : $(FITZ_HDR) $(FITZ_SRC_HDR)
 $(PDF_OBJ) : $(FITZ_HDR) $(PDF_HDR) $(PDF_SRC_HDR)
@@@@ -130,7 +116,7 @@@@ FONT_GEN_SIL := $(subst resources/fonts/
 
 FONT_BIN := $(FONT_BIN_DROID) $(FONT_BIN_NOTO) $(FONT_BIN_HAN) $(FONT_BIN_URW) $(FONT_BIN_SIL)
 FONT_GEN := $(FONT_GEN_DROID) $(FONT_GEN_NOTO) $(FONT_GEN_HAN) $(FONT_GEN_URW) $(FONT_GEN_SIL)
-FONT_OBJ := $(subst $(GEN)/, $(OUT)/fonts/, $(addsuffix .o, $(basename $(FONT_GEN))))
+FONT_OBJ := $(subst $(GEN)/, $(OUT)/fonts/, $(addsuffix .lo, $(basename $(FONT_GEN))))
 
 $(GEN)/%.c : resources/fonts/droid/%.ttf $(FONTDUMP)
 	$(QUIET_GEN) $(FONTDUMP) $@@ $<
@@@@ -152,8 +138,8 @@@@ $(FONT_GEN_SIL) : $(FONT_BIN_SIL)
 
 # --- Library ---
 
-MUPDF_LIB = $(OUT)/libmupdf.a
-THIRD_LIB = $(OUT)/libmupdfthird.a
+MUPDF_LIB = $(OUT)/libmupdf.la
+THIRD_LIB = $(OUT)/libmupdfthird.la
d47 1
a47 4
 MUPDF_OBJ := $(FITZ_OBJ) $(FONT_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(SVG_OBJ) $(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ)
 THIRD_OBJ := $(FREETYPE_OBJ) $(HARFBUZZ_OBJ) $(JBIG2DEC_OBJ) $(JPEG_OBJ) $(JPEGXR_OBJ) $(LURATECH_OBJ) $(MUJS_OBJ) $(OPENJPEG_OBJ) $(ZLIB_OBJ)
@@@@ -168,39 +154,39 @@@@ INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB
 $(ALL_DIR) $(OUT) $(GEN) :
d56 2
a57 2
-$(OUT)/%: $(OUT)/%.o
+$(OUT)/%: $(OUT)/%.lo
d60 2
a61 2
-$(OUT)/%.o : source/%.c | $(ALL_DIR)
+$(OUT)/%.lo : source/%.c | $(ALL_DIR)
d64 2
a65 2
-$(OUT)/%.o : source/%.cpp | $(ALL_DIR)
+$(OUT)/%.lo : source/%.cpp | $(ALL_DIR)
d68 3
a70 3
-$(OUT)/%.o : scripts/%.c | $(OUT)
+$(OUT)/%.lo : scripts/%.c | $(OUT)
 	$(CC_CMD)
d72 1
a72 1
-$(OUT)/fonts/%.o : $(GEN)/%.c | $(ALL_DIR)
d74 1
a74 1
+$(OUT)/fonts/%.lo : $(GEN)/%.c | $(ALL_DIR)
d81 2
a82 2
-$(OUT)/platform/x11/%.o: platform/x11/%.rc | $(OUT)
+$(OUT)/platform/x11/%.lo: platform/x11/%.rc | $(OUT)
d96 64
a159 1
 # --- Generated CMap and JavaScript files ---
d161 2
a162 1
@@@@ -251,51 +237,53 @@@@ endif
d164 1
a164 1
 generate: $(CMAP_GEN) $(FONT_GEN) $(JAVASCRIPT_GEN) $(ADOBECA_GEN) $(NAME_GEN)
d166 17
a182 10
-$(OUT)/pdf/pdf-cmap-table.o : $(CMAP_GEN)
-$(OUT)/pdf/pdf-pkcs7.o : $(ADOBECA_GEN)
-$(OUT)/pdf/pdf-js.o : $(JAVASCRIPT_GEN)
-$(OUT)/pdf/pdf-object.o : source/pdf/pdf-name-table.h
-$(OUT)/cmapdump.o : include/mupdf/pdf/cmap.h source/fitz/context.c source/fitz/error.c source/fitz/memory.c source/fitz/output.c source/fitz/string.c source/fitz/buffer.c source/fitz/stream-open.c source/fitz/stream-read.c source/fitz/strtod.c source/fitz/strtof.c source/fitz/ftoa.c source/fitz/printf.c source/fitz/time.c source/pdf/pdf-lex.c source/pdf/pdf-cmap.c source/pdf/pdf-cmap-parse.c source/pdf/pdf-name-table.h
+$(OUT)/pdf/pdf-cmap-table.lo : $(CMAP_GEN)
+$(OUT)/pdf/pdf-pkcs7.lo : $(ADOBECA_GEN)
+$(OUT)/pdf/pdf-js.lo : $(JAVASCRIPT_GEN)
+$(OUT)/pdf/pdf-object.lo : source/pdf/pdf-name-table.h
+$(OUT)/cmapdump.lo : include/mupdf/pdf/cmap.h source/fitz/context.c source/fitz/error.c source/fitz/memory.c source/fitz/output.c source/fitz/string.c source/fitz/buffer.c source/fitz/stream-open.c source/fitz/stream-read.c source/fitz/strtod.c source/fitz/strtof.c source/fitz/ftoa.c source/fitz/printf.c source/fitz/time.c source/pdf/pdf-lex.c source/pdf/pdf-cmap.c source/pdf/pdf-cmap-parse.c source/pdf/pdf-name-table.h
d184 5
a188 1
 # --- Tools and Apps ---
d190 2
a191 11
 MUTOOL := $(OUT)/mutool
-MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.o muconvert.o mudraw.o murun.o)
-MUTOOL_OBJ += $(addprefix $(OUT)/tools/, pdfclean.o pdfcreate.o pdfextract.o pdfinfo.o pdfmerge.o pdfposter.o pdfpages.o pdfshow.o)
+MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.lo muconvert.lo mudraw.lo murun.lo)
+MUTOOL_OBJ += $(addprefix $(OUT)/tools/, pdfclean.lo pdfcreate.lo pdfextract.lo pdfinfo.lo pdfmerge.lo pdfposter.lo pdfpages.lo pdfshow.lo)
 $(MUTOOL_OBJ): $(FITZ_HDR) $(PDF_HDR)
-MUTOOL_LIB = $(OUT)/libmutools.a
+MUTOOL_LIB = $(OUT)/libmutools.la
 $(MUTOOL_LIB) : $(MUTOOL_OBJ)
 $(MUTOOL) : $(MUTOOL_LIB) $(MUPDF_LIB) $(THIRD_LIB)
 	$(LINK_CMD)
d193 1
a193 8
+INSTALL_LIBS += $(MUTOOL_LIB)
+
 MURASTER := $(OUT)/muraster
-MURASTER_OBJ := $(addprefix $(OUT)/tools/, muraster.o)
+MURASTER_OBJ := $(addprefix $(OUT)/tools/, muraster.lo)
 $(MURASTER_OBJ): $(FITZ_HDR)
 $(MURASTER) : $(MURASTER_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
 	$(LINK_CMD)
d195 21
a215 5
 MJSGEN := $(OUT)/mjsgen
-MJSGEN_OBJ := $(addprefix $(OUT)/tools/, mjsgen.o)
+MJSGEN_OBJ := $(addprefix $(OUT)/tools/, mjsgen.lo)
 $(MUTOOL_OBJ): $(FITZ_HDR) $(PDF_HDR)
 $(MJSGEN) : $(MJSGEN_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
d218 1
a218 1
 MUJSTEST := $(OUT)/mujstest
d222 1
a222 1
 $(MUJSTEST) : $(MUJSTEST_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
d226 1
a226 1
-MUVIEW_X11 := $(OUT)/mupdf-x11
d228 1
a228 1
+MUVIEW_X11 := $(OUT)/platform/x11/mupdf
d231 1
a231 1
 $(MUVIEW_X11) : $(MUVIEW_X11_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
d235 1
a235 1
-MUVIEW_X11_CURL := $(OUT)/mupdf-x11-curl
d237 1
a237 1
+MUVIEW_X11_CURL := $(OUT)/platform/x11/curl/mupdf
d240 1
a240 1
 $(MUVIEW_X11_CURL) : $(MUVIEW_X11_CURL_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(CURL_LIB)
d242 1
a242 1
@@@@ -303,8 +291,8 @@@@ endif
d246 1
a246 1
-MUVIEW_GLFW := $(OUT)/mupdf-gl
d248 1
a248 1
+MUVIEW_GLFW := $(OUT)/platform/gl/mupdf-gl
d251 1
a251 1
 $(MUVIEW_GLFW) : $(MUVIEW_GLFW_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(GLFW_LIB)
d253 1
a253 1
@@@@ -312,16 +300,25 @@@@ endif
d256 1
a256 1
 MUVIEW_WIN32 := $(OUT)/mupdf
d260 1
a260 1
 $(MUVIEW_WIN32) : $(MUVIEW_WIN32_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
d262 9
a270 1
 endif
a271 6
-MUVIEW := $(MUVIEW_X11) $(MUVIEW_WIN32) $(MUVIEW_GLFW)
+MUVIEW := $(MUVIEW_X11) $(MUVIEW_WIN32)
 MUVIEW_CURL := $(MUVIEW_X11_CURL) $(MUVIEW_WIN32_CURL)
 
-INSTALL_APPS := $(MUTOOL) $(MUVIEW) $(MURASTER) $(MUJSTEST) $(MUVIEW_CURL)
+INSTALL_APPS := $(MUTOOL) $(MURASTER) $(MUJSTEST)
d273 1
a273 1
+INSTALL_APPS += $(MUVIEW_CURL)
d275 1
a275 1
+INSTALL_APPS += $(MUVIEW)
d279 1
a279 1
+INSTALL_APPS += $(MUVIEW_GLFW)
d281 5
d287 12
a298 1
 # --- Examples ---
d300 1
a300 1
@@@@ -364,24 +361,26 @@@@ libs: $(INSTALL_LIBS)
@


1.14
log
@Update print/mupdf to 1.9a.

pkgsrc changes:
 o Update MASTER_SITES (archive/ subdirectory contains all the distfiles,
   latest stable version and also older ones)
 o Bump BUILDLINK_A[BP]I_DEPENDS.mupdf to 1.9a due to several API and ABI
   changes

Changes:
MuPDF 1.9a (2016-04-26)
-----------------------
Version 1.9a is a bug fix release. If you run into issues with selecting or
searching for text with ligatures, you should upgrade from 1.9.

MuPDF 1.9 (2016-04-18)
-----------------------
The 1.9 release is here!

Headline changes:

  * New command line tools: create and run.
  * New low-level Java interface for desktop and android.
  * Bidirectional layout for Arabic and Hebrew scripts.
  * Shaping complex scripts for EPUB text layout.
  * Noto fallback fonts for EPUB layout.

mutool create:

  * Create new PDF files from scratch.
  * Read an annotated content stream in a text file and write a PDF file,
    automatically embedding font and image resources.

mutool run:

  * Run javascript scripts with MuPDF bindings.
  * The interface is similar to the new Java interface.

mutool draw:

  * Optional multi-threaded operation (Windows and pthreads).
  * Optional low memory mode (primarily for testing).
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.13 2016/02/04 11:50:24 leot Exp $
d6 1
d10 1
a10 1
--- Makefile.orig	2016-04-21 11:14:32.000000000 +0000
d12 1
a12 1
@@@@ -38,22 +38,12 @@@@ CFLAGS += $(ZLIB_CFLAGS)
d24 2
d34 2
d45 1
a45 1
@@@@ -89,17 +79,17 @@@@ XPS_SRC_HDR := $(wildcard source/xps/*.h
d52 1
d59 1
a63 8
 ifeq "$(HAVE_MUJS)" "yes"
-PDF_OBJ += $(OUT)/pdf/js/pdf-js.o
+PDF_OBJ += $(OUT)/pdf/js/pdf-js.lo
 else
-PDF_OBJ += $(OUT)/pdf/js/pdf-js-none.o
+PDF_OBJ += $(OUT)/pdf/js/pdf-js-none.lo
 endif
 
d65 2
a66 1
@@@@ -123,7 +113,7 @@@@ FONT_GEN_SIL := $(subst resources/fonts/
d68 2
a69 2
 FONT_BIN := $(FONT_BIN_DROID) $(FONT_BIN_NOTO) $(FONT_BIN_URW) $(FONT_BIN_SIL)
 FONT_GEN := $(FONT_GEN_DROID) $(FONT_GEN_NOTO) $(FONT_GEN_URW) $(FONT_GEN_SIL)
d73 1
a73 1
 $(GEN)/%.c : resources/fonts/droid/%.ttc $(FONTDUMP)
d75 1
a75 1
@@@@ -141,8 +131,8 @@@@ $(FONT_GEN_URW) : $(FONT_BIN_URW)
d84 3
a86 3
 MUPDF_OBJ := $(FITZ_OBJ) $(FONT_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ)
 THIRD_OBJ := $(FREETYPE_OBJ) $(HARFBUZZ_OBJ) $(JBIG2DEC_OBJ) $(JPEG_OBJ) $(MUJS_OBJ) $(OPENJPEG_OBJ) $(ZLIB_OBJ)
@@@@ -157,39 +147,39 @@@@ INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB
d123 1
a123 1
 	windres $< $@@
d138 1
a138 1
@@@@ -240,16 +230,16 @@@@ endif
d144 1
a144 1
-$(OUT)/pdf/js/pdf-js.o : $(JAVASCRIPT_GEN)
d146 1
a146 1
-$(OUT)/cmapdump.o : include/mupdf/pdf/cmap.h source/pdf/pdf-cmap.c source/pdf/pdf-cmap-parse.c source/pdf/pdf-name-table.h
d149 1
a149 1
+$(OUT)/pdf/js/pdf-js.lo : $(JAVASCRIPT_GEN)
d151 1
a151 1
+$(OUT)/cmapdump.lo : include/mupdf/pdf/cmap.h source/pdf/pdf-cmap.c source/pdf/pdf-cmap-parse.c source/pdf/pdf-name-table.h
d155 5
a159 3
 MUTOOL := $(addprefix $(OUT)/, mutool)
-MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.o mudraw.o murun.o pdfclean.o pdfcreate.o pdfextract.o pdfinfo.o pdfposter.o pdfshow.o pdfpages.o pdfmerge.o)
+MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.lo mudraw.lo murun.lo pdfclean.lo pdfcreate.lo pdfextract.lo pdfinfo.lo pdfposter.lo pdfshow.lo pdfpages.lo pdfmerge.lo)
d161 14
a174 3
 $(MUTOOL) : $(MUPDF_LIB) $(THIRD_LIB)
 $(MUTOOL) : $(MUTOOL_OBJ)
@@@@ -257,27 +247,27 @@@@ $(MUTOOL) : $(MUTOOL_OBJ)
d177 4
a180 3
 $(MJSGEN) : $(MUPDF_LIB) $(THIRD_LIB)
-$(MJSGEN) : $(addprefix $(OUT)/tools/, mjsgen.o)
+$(MJSGEN) : $(addprefix $(OUT)/tools/, mjsgen.lo)
d187 1
a187 2
 $(MUJSTEST) : $(MUPDF_LIB) $(THIRD_LIB)
 $(MUJSTEST) : $(MUJSTEST_OBJ)
d196 1
a196 2
 $(MUVIEW_X11) : $(MUPDF_LIB) $(THIRD_LIB)
 $(MUVIEW_X11) : $(MUVIEW_X11_OBJ)
d199 11
d216 3
a218 14
 $(MUVIEW_GLFW) : $(MUPDF_LIB) $(THIRD_LIB) $(GLFW_LIB)
 $(MUVIEW_GLFW) : $(MUVIEW_GLFW_OBJ)
@@@@ -285,8 +275,8 @@@@ $(MUVIEW_GLFW) : $(MUVIEW_GLFW_OBJ)
 endif
 
 ifeq "$(HAVE_CURL)" "yes"
-MUVIEW_X11_CURL := $(OUT)/mupdf-x11-curl
-MUVIEW_X11_CURL_OBJ := $(addprefix $(OUT)/platform/x11/curl/, x11_main.o x11_image.o pdfapp.o curl_stream.o)
+MUVIEW_X11_CURL := $(OUT)/platform/x11/curl/mupdf
+MUVIEW_X11_CURL_OBJ := $(addprefix $(OUT)/platform/x11/curl/, x11_main.lo x11_image.lo pdfapp.lo curl_stream.lo)
 $(MUVIEW_X11_CURL_OBJ) : $(FITZ_HDR) $(PDF_HDR)
 $(MUVIEW_X11_CURL) : $(MUPDF_LIB) $(THIRD_LIB) $(CURL_LIB)
 $(MUVIEW_X11_CURL) : $(MUVIEW_X11_CURL_OBJ)
@@@@ -296,17 +286,26 @@@@ endif
d225 1
a225 2
 $(MUVIEW_WIN32) : $(MUPDF_LIB) $(THIRD_LIB)
 $(MUVIEW_WIN32) : $(MUVIEW_WIN32_OBJ)
d233 2
a234 2
-INSTALL_APPS := $(MUTOOL) $(MUVIEW) $(MUJSTEST) $(MUVIEW_CURL)
+INSTALL_APPS := $(MUTOOL) $(MUJSTEST)
d247 1
a247 1
@@@@ -349,24 +348,26 @@@@ libs: $(INSTALL_LIBS)
@


1.13
log
@Add glfw option to mupdf (disabled by default).

Bump PKGREVISION++.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.12 2015/11/12 21:11:31 leot Exp $
d5 1
d7 1
a7 2
 install it as "mupdf"
o libmujs support: install like a non-thirdparty mupdf's library
d9 1
a9 1
--- Makefile.orig	2015-11-10 16:19:51.000000000 +0000
d11 1
a11 1
@@@@ -41,22 +41,12 @@@@ CFLAGS += $(ZLIB_CFLAGS)
d40 1
a40 1
@@@@ -91,33 +81,33 @@@@ XPS_SRC_HDR := $(wildcard source/xps/*.h
a56 2
 # --- Choice of Javascript library ---
 
a58 16
-PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-mu.o
+PDF_OBJ += $(OUT)/pdf/js/pdf-js.lo
+PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-mu.lo
 THIRD_LIBS += $(MUJS_LIB)
 LIBS += $(MUJS_LIBS)
 CFLAGS += $(MUJS_CFLAGS)
 else ifeq "$(HAVE_JSCORE)" "yes"
-PDF_OBJ += $(OUT)/pdf/js/pdf-js.o
-PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-jscore.o
+PDF_OBJ += $(OUT)/pdf/js/pdf-js.lo
+PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-jscore.lo
 LIBS += $(JSCORE_LIBS)
 CFLAGS += $(JSCORE_CFLAGS)
 else ifeq "$(HAVE_V8)" "yes"
-PDF_OBJ += $(OUT)/pdf/js/pdf-js.o
-PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-cpp.o $(OUT)/pdf/js/pdf-jsimp-v8.o
a59 3
+PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-cpp.lo $(OUT)/pdf/js/pdf-jsimp-v8.lo
 LIBS += $(V8_LIBS)
 CFLAGS += $(V8_CFLAGS)
d66 10
a75 1
@@@@ -129,47 +119,50 @@@@ $(GPRF_OBJ) : $(FITZ_HDR) $(GPRF_HDR) $(
d79 8
a86 12
-MUPDF_LIB := $(OUT)/libmupdf.a
+MUPDF_LIB := $(OUT)/libmupdf.la
 
 $(MUPDF_LIB) : $(FITZ_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ)
 
 INSTALL_LIBS := $(MUPDF_LIB)
+ifeq "$(HAVE_MUJS)" "yes"
+INSTALL_LIBS += $(MUJS_LIB)
+endif
 
 # --- Rules ---
 
d112 5
d136 1
a136 1
 # --- Generated CMAP, FONT and JAVASCRIPT files ---
d138 1
a138 1
@@@@ -233,17 +226,17 @@@@ endif
a142 1
-$(OUT)/pdf/pdf-fontfile.o : $(FONT_GEN)
a147 1
+$(OUT)/pdf/pdf-fontfile.lo : $(FONT_GEN)
d156 2
a157 2
-MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.o mudraw.o pdfclean.o pdfextract.o pdfinfo.o pdfposter.o pdfshow.o pdfpages.o)
+MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.lo mudraw.lo pdfclean.lo pdfextract.lo pdfinfo.lo pdfposter.lo pdfshow.lo pdfpages.lo)
d159 1
a159 1
 $(MUTOOL) : $(MUPDF_LIB) $(THIRD_LIBS)
d161 1
a161 1
@@@@ -251,27 +244,27 @@@@ $(MUTOOL) : $(MUTOOL_OBJ)
d164 1
a164 1
 $(MJSGEN) : $(MUPDF_LIB) $(THIRD_LIBS)
d173 1
a173 1
 $(MUJSTEST) : $(MUPDF_LIB) $(THIRD_LIBS)
d183 1
a183 1
 $(MUVIEW_X11) : $(MUPDF_LIB) $(THIRD_LIBS)
d193 1
a193 1
 $(MUVIEW_GLFW) : $(MUPDF_LIB) $(THIRD_LIBS) $(GLFW_LIB)
d195 1
a195 1
@@@@ -279,8 +272,8 @@@@ $(MUVIEW_GLFW) : $(MUVIEW_GLFW_OBJ)
d204 1
a204 1
 $(MUVIEW_X11_CURL) : $(MUPDF_LIB) $(THIRD_LIBS) $(CURL_LIB)
d206 1
a206 1
@@@@ -290,17 +283,27 @@@@ endif
d213 1
a213 1
 $(MUVIEW_WIN32) : $(MUPDF_LIB) $(THIRD_LIBS)
d221 2
a222 2
+MUVIEW_GLFW := $(MUVIEW_GLFW)
+
d229 1
a229 2
 
-INSTALL_APPS := $(MUTOOL) $(MUVIEW) $(MUJSTEST) $(MUVIEW_CURL)
d236 1
a236 1
@@@@ -343,24 +346,26 @@@@ libs: $(INSTALL_LIBS)
@


1.12
log
@Fix various installation and build issues.

o Add a lost hunk of patches/patch-ac in order to build and install "mupdf-x11"
  simply as "mupdf" (like previous mupdf releases)
o Threat glfw like any other thirdparty library (and avoid to accidently build
  "mupdf-gl")

Thanks to Thomas Klausner and Yorick Hardy for noticing that.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.11 2015/11/11 17:08:25 leot Exp $
d174 1
a174 1
@@@@ -251,19 +244,19 @@@@ $(MUTOOL) : $(MUTOOL_OBJ)
d198 1
a198 1
@@@@ -271,7 +264,7 @@@@ $(MUVIEW_X11) : $(MUVIEW_X11_OBJ)
d201 1
a201 1
 MUVIEW_GLFW := $(OUT)/mupdf-gl
d203 1
d219 1
a219 1
@@@@ -290,7 +283,7 @@@@ endif
d228 5
a232 2
@@@@ -300,7 +293,12 @@@@ endif
 MUVIEW := $(MUVIEW_X11) $(MUVIEW_WIN32) $(MUVIEW_GLFW)
d234 2
a235 2
 
-INSTALL_APPS := $(MUTOOL) $(MUVIEW) $(MUJSTEST) $(MUVIEW_CURL)
d243 5
d250 1
a250 1
@@@@ -343,24 +341,26 @@@@ libs: $(INSTALL_LIBS)
@


1.11
log
@Update print/mupdf to 1.8.

pkgsrc changes:
 * Bump BUILDLINK_API_DEPENDS (spotted and tested via the only print/mupdf
   consumer wip/zathura-mupdf)
 * OpenGL-based desktop viewer is still not enabled by default neither upstream
   nor in pkgsrc

Changes:
List of changes in MuPDF 1.8
* Headline changes:
	* New OpenGL-based barebones desktop viewer.
	* New URW fonts with greek and cyrillic.
	* 64-bit file support.
	* Ghostscript proofing mode (source only; not in shipped binaries).
* EPUB improvements:
	* User style sheets.
	* GIF images (also for CBZ).
	* Table of contents.
	* CJK text.
	* Page margins.
	* Many bug fixes.
* Bug fixes:
	* Updated FreeType to version 2.6.1.
	* Various font substitution bug fixes.
	* Fix setjmp/longjmp behaviour which could cause optimizing compilers to misbehave.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.10 2015/04/17 07:18:21 wiz Exp $
d9 1
a9 1
--- Makefile.orig	2015-10-21 14:45:11.000000000 +0000
d174 1
a174 1
@@@@ -251,11 +244,11 @@@@ $(MUTOOL) : $(MUTOOL_OBJ)
d188 1
a188 1
@@@@ -263,7 +256,7 @@@@ $(MUJSTEST) : $(MUJSTEST_OBJ)
d191 1
a191 1
 MUVIEW_X11 := $(OUT)/mupdf-x11
d193 1
@


1.10
log
@Update print/mupdf to 1.7, provided by Leonardo Taccari in PR 49843.

Changes:
MuPDF 1.7 (2015-04-16)

   The 1.7 release is here!

MuPDF 1.7 RC1 (2015-04-08)

   The 1.7 release is almost here!

   Headline changes:
     * New 'Indie dev' licensing options - contact sales@@artifex.com
       for more details.
     * New HTML layout engine, and (DRM-free) EPUB viewer.
     * Reduced memory usage - displaylists and internal PDF representation
       take much less memory, reducing total memory use on some files by
       over 60%.

   Important API changes:
     * Bound contexts have been removed; we now pass fz_contexts
       explicitly.
     * Reference counting of paths and text structures.

   Features:
     * Add mutool pages option.
     * Tweaked rendering to prevent feature dropout in common cases.
     * Viewer tweaks
          + Better mouse wheel handling
          + Shift-space support
          + Mouse button control of presentation mode
          + Failed reloads do not close document

   Internal changes:
     * PDF filter revamp - simpler interface.
     * Devices use derived structures rather than user pointer.
     * Sparse PDF xrefs held in more compact form.
     * New gsview viewer split out to its own repository.

   Bug fixes
     * Improved handling of broken files.
     * Fix BBoxes of Type 3 fonts.
     * Updated fonts (including greek and cyrillic).
     * Various memory leaks and crashes.
     * And many more.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.9 2014/06/15 14:14:18 wiz Exp $
d9 1
a9 1
--- Makefile.orig	2015-04-08 15:04:10.000000000 +0000
d40 1
a40 2
@@@@ -87,32 +77,32 @@@@ PDF_SRC_HDR := $(wildcard source/pdf/*.h
 XPS_SRC_HDR := $(wildcard source/xps/*.h)
d42 1
d49 1
d55 1
d87 1
a87 1
@@@@ -123,44 +113,47 @@@@ $(HTML_OBJ) : $(FITZ_HDR) $(HTML_HDR) $(
d94 1
a94 1
 $(MUPDF_LIB) : $(FITZ_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(HTML_OBJ)
d140 4
d149 1
a149 1
@@@@ -224,24 +217,24 @@@@ endif
a167 8
 MUDRAW := $(addprefix $(OUT)/, mudraw)
-MUDRAW_OBJ := $(addprefix $(OUT)/tools/, mudraw.o)
+MUDRAW_OBJ := $(addprefix $(OUT)/tools/, mudraw.lo)
 $(MUDRAW_OBJ) : $(FITZ_HDR) $(PDF_HDR)
 $(MUDRAW) : $(MUPDF_LIB) $(THIRD_LIBS)
 $(MUDRAW) : $(MUDRAW_OBJ)
 	$(LINK_CMD)
 
d169 2
a170 2
-MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.o pdfclean.o pdfextract.o pdfinfo.o pdfposter.o pdfshow.o pdfpages.o)
+MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.lo pdfclean.lo pdfextract.lo pdfinfo.lo pdfposter.lo pdfshow.lo pdfpages.lo)
d174 1
a174 1
@@@@ -249,27 +242,27 @@@@ $(MUTOOL) : $(MUTOOL_OBJ)
d188 1
a188 1
 	$(LINK_CMD)
d191 1
a191 1
-MUVIEW_X11 := $(OUT)/mupdf-x11
a192 1
+MUVIEW_X11 := $(OUT)/platform/x11/mupdf
d197 11
a207 1
 	$(LINK_CMD) $(X11_LIBS)
d217 1
a217 1
@@@@ -279,7 +272,7 @@@@ endif
d226 2
a227 2
@@@@ -289,7 +282,12 @@@@ endif
 MUVIEW := $(MUVIEW_X11) $(MUVIEW_WIN32)
d230 2
a231 2
-INSTALL_APPS := $(MUDRAW) $(MUTOOL) $(MUVIEW) $(MUJSTEST) $(MUVIEW_CURL)
+INSTALL_APPS := $(MUDRAW) $(MUTOOL) $(MUJSTEST)
d240 1
a240 1
@@@@ -331,24 +329,26 @@@@ libs: $(INSTALL_LIBS)
@


1.9
log
@Update to 1.5:
This is a bugfix release: dozens of bugs have been found and
exterminated!

A typo resulting in a potential stack overflow that could corrupt
files when saving edits to a PDF has been fixed. Another bug which
caused a significant slowdown has also been fixed.

We strongly recommend that you upgrade â especially if you are
using version 1.4.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.8 2014/04/21 16:14:40 wiz Exp $
d9 1
a9 1
--- Makefile.orig	2014-06-10 15:09:28.000000000 +0000
d40 3
a42 3
@@@@ -90,33 +80,33 @@@@ CBZ_SRC_HDR := $(wildcard source/cbz/*.h
 IMG_SRC_HDR := $(wildcard source/img/*.h)
 TIFF_SRC_HDR := $(wildcard source/tiff/*.h)
d48 1
a48 2
-IMG_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(IMG_SRC))))
-TIFF_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(TIFF_SRC))))
d53 1
a53 2
+IMG_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(IMG_SRC))))
+TIFF_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(TIFF_SRC))))
d85 1
a85 1
@@@@ -128,41 +118,44 @@@@ $(TIFF_OBJ) : $(FITZ_HDR) $(IMG_HDR) $(T
d92 1
a92 1
 $(MUPDF_LIB) : $(FITZ_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(IMG_OBJ) $(TIFF_OBJ)
d94 1
a94 2
-INSTALL_LIBS := $(MUPDF_LIB)
+INSTALL_LIBS := $(MUPDF_LIB) 
d130 4
d143 1
a143 1
@@@@ -222,23 +215,23 @@@@ endif
d145 1
a145 1
 generate: $(CMAP_GEN) $(FONT_GEN) $(JAVASCRIPT_GEN) $(ADOBECA_GEN)
d151 2
a152 1
-$(OUT)/cmapdump.o : include/mupdf/pdf/cmap.h source/pdf/pdf-cmap.c source/pdf/pdf-cmap-parse.c
d157 2
a158 1
+$(OUT)/cmapdump.lo : include/mupdf/pdf/cmap.h source/pdf/pdf-cmap.c source/pdf/pdf-cmap-parse.c
d165 1
a165 1
 $(MUDRAW_OBJ) : $(FITZ_HDR)
d171 2
a172 2
-MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.o pdfclean.o pdfextract.o pdfinfo.o pdfposter.o pdfshow.o)
+MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.lo pdfclean.lo pdfextract.lo pdfinfo.lo pdfposter.lo pdfshow.lo)
d176 1
a176 1
@@@@ -246,25 +239,25 @@@@ $(MUTOOL) : $(MUTOOL_OBJ)
d185 3
d189 1
a189 2
-$(MUJSTEST) : $(addprefix $(OUT)/platform/x11/, jstest_main.o pdfapp.o)
+$(MUJSTEST) : $(addprefix $(OUT)/platform/x11/, jstest_main.lo pdfapp.lo)
d210 12
a221 3
@@@@ -275,7 +268,12 @@@@ endif
 MUVIEW := $(MUVIEW_X11)
 MUVIEW_CURL := $(MUVIEW_X11_CURL)
d231 1
a231 1
 # --- Update version string header ---
d233 1
a233 1
@@@@ -308,24 +306,26 @@@@ libs: $(INSTALL_LIBS)
@


1.8
log
@Update to 1.4, provided by Leonardo Taccari in PR 48759.

List of changes on master since MuPDF 1.3

* Headline changes:
	* CMYK rendering (mudraw PWG and PAM formats)
	* TIFF viewer (with multi-page support).
	* Added MuJS Javascript interpreter.
		* MuJS is the default, V8 and JavaScriptCore are compile time options.
		* Javascript support has to be explicitly enabled with pdf_enable_js.
		* All viewers now have JavaScript enabled in the default builds.
* Viewers:
	* X11: Horizontal scroll wheel support.
	* X11: Status bar display with warnings.
	* Android: Digital signatures.
	* iOS: Links, form filling, annotation editing, and javascript.
	* iOS: Reflow mode.
	* WinRT: Printing.
	* WinRT: Improved zooming behaviour.
* Tools:
	* mudraw: Banded rendering with -B /band-height/.
	* mudraw: Select output format with -F /format/.
	* mudraw: Write to stdout if you use '-' as the output file name.
	* mudraw: Add TGA output format.
	* mudraw: Improved SVG output.
	* mutool show: Write output to file instead of stdout with -o /filename/.
	* mutool clean: Clean content streams with -s option.
* Annotations:
	* Improved font handling.
	* Form fields.
	* Free text.
	* Sticky notes.
* Optimizations:
	* glyph cache: Partial eviction.
	* glyph cache: Run-length compressed glyphs.
	* Smarter handling of subpixel metrics in text rendering.
	* Optimized blitting functions.
	* Optimized gradient mesh drawing.
* API changes and additions:
	* fz_stream API reworked: replace "read" function with "next".
	* "Rebind" functions to associate context bound objects with another context:
		fz_output, fz_stream, fz_device and fz_document.
	* Introduce "document handlers" to detect and open different file types.
		* Must now call fz_register_document_handlers() to register the defaults.
		* May register your own handlers as well to work with fz_open_document.
	* Hook to load system fonts: fz_install_load_system_font_funcs.
	* PDF xref cache flushing functions (mark/clear/clear-to-mark).
	* Add our own "printf" set of functions to format strings and write to fz_output:
		* Format %f as short as possible while preserving precision.
		* Has %C for formatting a unicode character as UTF-8.
		* Has %M to format fz_matrix.
		* Has %R to format fz_rect.
		* Has %q and %( to format strings with escaped characters.
	* PDF process interface: allow PDF interpreter to do more than just draw!
		* Content stream state cleaning filter.
		* Content stream rewriting filter.
	* PDF digital signatures.
	* Stroke states may now be stored on the stack.
	* Improved fz_path internals.
	* Gradient mesh drawing interface has been improved.
	* Save files with incremental updates.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.7 2014/02/20 23:15:27 wiz Exp $
d9 1
a9 1
--- Makefile.orig	2014-04-11 15:10:41.000000000 +0000
d150 1
a150 1
-$(OUT)/cmapdump.o : source/pdf/pdf-cmap.c source/pdf/pdf-cmap-parse.c
d155 1
a155 1
+$(OUT)/cmapdump.lo : source/pdf/pdf-cmap.c source/pdf/pdf-cmap-parse.c
d173 1
a173 1
@@@@ -246,24 +239,24 @@@@ $(MUTOOL) : $(MUTOOL_OBJ)
d189 1
d191 2
d194 1
a194 2
-$(MUVIEW_X11) : $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o)
+$(MUVIEW_X11) : $(addprefix $(OUT)/platform/x11/, x11_main.lo x11_image.lo pdfapp.lo)
d199 1
d201 2
d204 2
a205 6
-$(MUVIEW_X11_CURL) : $(addprefix $(OUT)/platform/x11/curl/, x11_main.o x11_image.o pdfapp.o curl_stream.o)
+$(MUVIEW_X11_CURL) : $(addprefix $(OUT)/platform/x11/curl/, x11_main.lo x11_image.lo pdfapp.lo curl_stream.lo)
 	$(LINK_CMD) $(X11_LIBS) $(CURL_LIBS)
 endif
 endif
@@@@ -271,7 +264,12 @@@@ endif
d219 1
a219 1
@@@@ -304,24 +302,26 @@@@ libs: $(INSTALL_LIBS)
@


1.7
log
@Add a missing DESTDIR. From Leonardo Taccari <iamleot@@gmail.com>
on pkgsrc-bulk.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.6 2014/01/09 14:25:23 mef Exp $
d7 1
d9 1
a9 1
--- Makefile.orig	2013-08-14 12:41:20.000000000 +0000
d15 1
a15 1
-ifeq "$(verbose)" ""
d40 1
a40 10
@@@@ -67,6 +57,7 @@@@ ALL_DIR += $(OUT)/cbz
 ALL_DIR += $(OUT)/img
 ALL_DIR += $(OUT)/tools
 ALL_DIR += $(OUT)/platform/x11
+ALL_DIR += $(OUT)/platform/x11/curl
 
 FITZ_HDR := include/mupdf/fitz.h $(wildcard include/mupdf/fitz/*.h)
 PDF_HDR := include/mupdf/pdf.h $(wildcard include/mupdf/pdf/*.h)
@@@@ -86,14 +77,14 @@@@ XPS_SRC_HDR := $(wildcard source/xps/*.h
 CBZ_SRC_HDR := $(wildcard source/cbz/*.h)
d42 1
d49 1
d55 1
d57 28
a84 4
-PDF_JS_V8_OBJ := $(OUT)/pdf/js/pdf-js.o $(OUT)/pdf/js/pdf-jsimp-cpp.o $(OUT)/pdf/js/pdf-jsimp-v8.o
-PDF_JS_NONE_OBJ := $(OUT)/pdf/js/pdf-js-none.o
+PDF_JS_V8_OBJ := $(OUT)/pdf/js/pdf-js.lo $(OUT)/pdf/js/pdf-jsimp-cpp.lo $(OUT)/pdf/js/pdf-jsimp-v8.lo
+PDF_JS_NONE_OBJ := $(OUT)/pdf/js/pdf-js-none.lo
d87 1
a87 2
 $(PDF_OBJ) : $(FITZ_HDR) $(PDF_HDR) $(PDF_SRC_HDR)
@@@@ -106,14 +97,14 @@@@ $(PDF_JS_NONE_OBJ) :=  $(FITZ_HDR) $(PDF
a91 1
-MUPDF_JS_NONE_LIB := $(OUT)/libmupdf-js-none.a
a92 1
+MUPDF_JS_NONE_LIB := $(OUT)/libmupdf-js-none.la
d94 1
a94 2
 $(MUPDF_LIB) : $(FITZ_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(IMG_OBJ)
 $(MUPDF_JS_NONE_LIB) : $(PDF_JS_NONE_OBJ)
d96 7
a102 5
 ifeq "$(V8_PRESENT)" "yes"
-MUPDF_JS_V8_LIB := $(OUT)/libmupdf-js-v8.a
+MUPDF_JS_V8_LIB := $(OUT)/libmupdf-js-v8.la
 $(MUPDF_JS_V8_LIB) : $(PDF_JS_V8_OBJ)
 endif
a103 1
@@@@ -124,31 +115,29 @@@@ INSTALL_LIBS := $(MUPDF_LIB) $(MUPDF_JS_
d111 1
a111 1
-	$(RANLIB_CMD)
d131 1
a131 1
 	$(CC_CMD) $(X11_CFLAGS) $(CURL_CFLAGS)
a133 1
-	mkdir -p $(OUT)/platform/x11/curl
d142 1
a142 1
@@@@ -208,41 +197,41 @@@@ endif
d160 5
a164 3
 $(MUDRAW) : $(MUPDF_LIB) $(MUPDF_JS_NONE_LIB) $(THIRD_LIBS)
-$(MUDRAW) : $(addprefix $(OUT)/tools/, mudraw.o)
+$(MUDRAW) : $(addprefix $(OUT)/tools/, mudraw.lo)
d168 11
a178 3
 $(MUTOOL) : $(MUPDF_LIB) $(MUPDF_JS_NONE_LIB) $(THIRD_LIBS)
-$(MUTOOL) : $(addprefix $(OUT)/tools/, mutool.o pdfclean.o pdfextract.o pdfinfo.o pdfposter.o pdfshow.o)
+$(MUTOOL) : $(addprefix $(OUT)/tools/, mutool.lo pdfclean.lo pdfextract.lo pdfinfo.lo pdfposter.lo pdfshow.lo)
d181 5
a185 7
 ifeq "$(V8_PRESENT)" "yes"
 MUJSTEST_V8 := $(OUT)/mujstest-v8
 $(MUJSTEST_V8) : $(MUPDF_LIB) $(MUPDF_JS_V8_LIB) $(THIRD_LIBS)
-$(MUJSTEST_V8) : $(addprefix $(OUT)/platform/x11/, jstest_main.o pdfapp.o)
+$(MUJSTEST_V8) : $(addprefix $(OUT)/platform/x11/, jstest_main.lo pdfapp.lo)
 	$(LINK_CMD) $(V8_LIBS)
 endif
d187 1
a187 1
 ifeq "$(NOX11)" ""
d190 1
a190 1
 $(MUVIEW_X11) : $(MUPDF_LIB) $(MUPDF_JS_NONE_LIB) $(THIRD_LIBS)
d195 1
a195 1
 ifeq "$(NOCURL)" ""
d198 1
a198 1
 $(MUVIEW_X11_CURL) : $(MUPDF_LIB) $(MUPDF_JS_NONE_LIB) $(THIRD_LIBS) $(CURL_LIB)
d204 2
a205 11
@@@@ -251,7 +240,7 @@@@ ifeq "$(V8_PRESENT)" "yes"
 ifeq "$(NOX11)" ""
 MUVIEW_X11_V8 := $(OUT)/mupdf-x11-v8
 $(MUVIEW_X11_V8) : $(MUPDF_LIB) $(MUPDF_JS_V8_LIB) $(THIRD_LIBS)
-$(MUVIEW_X11_V8) : $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o)
+$(MUVIEW_X11_V8) : $(addprefix $(OUT)/platform/x11/, x11_main.lo x11_image.lo pdfapp.lo)
 	$(LINK_CMD) $(X11_LIBS) $(V8_LIBS)
 endif
 endif
@@@@ -260,7 +249,12 @@@@ MUVIEW := $(MUVIEW_X11)
 MUVIEW_V8 := $(MUVIEW_X11_V8)
d208 3
a210 3
-INSTALL_APPS := $(MUDRAW) $(MUTOOL) $(MUVIEW) $(MUJSTEST_V8) $(MUVIEW_V8) $(MUVIEW_CURL)
+INSTALL_APPS := $(MUDRAW) $(MUTOOL)
+ifeq "$(NOCURL)" ""
d212 1
a212 1
+else ifeq "$(NOX11)" ""
d216 1
a216 1
 # --- Format man pages ---
d218 1
a218 1
@@@@ -286,24 +280,26 @@@@ libs: $(INSTALL_LIBS)
@


1.6
log
@Update print/mupdf to 1.3 (via pkgsrc-wip by Leonardo Taccari, thanks)
=============================================================================
Notes on updating mupdf to mupdf-1.3 (maybe useful for future updates too)

 * mupdf-1.3 depends on openjpeg-2.0 (previously mupdf-1.1 depended on
   openjpeg-1.5). ${WRKSRC}/Makerules is NOT correct and still looks for
   openjpeg-1.5 so patches/patch-ab was modified in order to fix this
   behaviour. Please also note the SUBST.makerules class in Makefile.
 * mupdf should be build with "build=release" (the default is "build=debug" and
   that may be indesiderable for the common user).
 * In order to completely disable the building of third party libraries (it is
   better to use the ones provided/handled by pkgsrc) a brutal ${RM} -fr completely
   remove the ${WRKSRC}/thirdparty directory. For more information please read
   ${WRKSRC}/Makethird and the post-extract target in Makefile.
 * ${WRKSRC}/docs/thirdparty.txt may help for adding correct version of the
   dependencies.
 * To add libcurl support (www/curl) patches/patch-Makethird was introduced and
   patches/patch-ab was modified in order to use pkg-config for
   $(SYS_CURL_CFLAGS) and $(SYS_CURL_LIBS).
 * By default now mupdf install different binaries, e.g. mupdf-x11 (previous it
   was just "mupdf"), mupdf-x11-curl, etc.. In pkgsrc we install *only* the
   featureful version of mupdf simply as "mupdf". For more information please
   give a look to patches/patch-ac.

=============================================================================
(Upstream) List of changes on master since MuPDF 1.2

 * Windows RT viewer app for MuPDF.
 * Library changes to support progressive loading (display PDF files as
   they download). Windows/Linux/MacOS viewer supports this using curl.
 * Incremental updates to PDF files are now (optionally) preserved on
   loading/saving.
 * Prototype support for checking PDF Digital Signatures.
 * Initial annotation support (strike-out, underline, highlight and ink)
   (library and android builds only).
 * Fix operation on Android API level 8.
 * Android redraw optimisations.
 * Android app now supports Google Cloud Print.
 * Android app translated into many languages.
 * Android support for more architectures.
 * Improvements to store (avoid collisions causing unnecessary evictions).
 * Windows apps use Unicode filenames now.
 * PDF function handling improved; functions can now be passed to devices
   without 'sampling'.
 * PDF image handling improved; images can now be passed to devices
   without decompression.
 * Indexed images are no longer uncompressed at load time, saving memory.
 * Caching of rendered tiles for speed.
 * Improved text analysis mode, capable of spotting columns/indents,
   right-to-left text etc.
 * HTML output mode now includes image output.
 * PDF password encoding handling improved.
 * MuPDF now opens Jpeg, Tiff and PNG files directly.
 * Bug preventing OpenXPS files from being opened fixed.
 * Initial (feature incomplete) SVG and PDF output devices.
 * PWG raster (mono/grey/RGB) and PCL (mono) output devices.
 * Various performance improvements (including tilings and mesh based
   shadings).
 * Revamped directory structure to reflect recent changes.
 * Various potential SEGV, SoftMask and rendering fixes.
 * Many potential crashes in Jpeg2000 and JBIG2 images fixed.

List of changes on master since MuPDF 1.1

 * Important API changes:
    * fz_bbox is now fz_irect.
    * APIs (including fz_device) now pass fz_rect/fz_matrix by reference.
    * fz_device API is now more consistent with regards to use of
      fz_rect rather than fz_bbox.
 * Add support for Javascript and forms handling.
 * Fix many SEGVs with out of spec files. Many thanks to Mateusz "j00ru"
   Jurczyk and Gynvael Coldwind of the Google Security team, zeniko,
   Sebastian Rasmussen and all other contributors.
 * Add fz_open_document_with_stream to allow non-file based operation.
 * Move to using git submodules for third party libraries.
 * Much enhanced Android application. Now on Google Play!
 * Oversized and stroke text clipping implemented.
 * Change shadings to decompose at render times; massive memory savings.
 * Renamed 'mubusy' to 'mutool'.
 * PDF 1.7 Extension Level 8 encryption implemented.
 * Added consts to various parts of the API to help C++ interworking.
 * Prototype transition support.
 * Text searching API moved to fitz.
 * Highlight and copy text selections.
 * Performance enhancements for color conversion and fax decompression.
 * ARM optimisations for color conversion and bitmap scaling.
 * Bitmap subsampling stage introduced, with ARM optimisations.
 * Type 3 fonts; glyphs are now handled as display lists.
 * Scan converter performance improvements.
 * Various rendering fixes.
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.5 2012/08/21 19:50:54 drochner Exp $
d230 1
a230 1
+	${BSD_INSTALL_PROGRAM_DIR} $(bindir)
@


1.5
log
@update to 1.1, from Leonardo Taccari per PR pkg/46823
changes:
The command line tools have been combined into one tool that does all:
 mubusy. Where previously you would have called "mupdfclean blah blah
 blah", now call "mubusy clean blah blah blah" instead.
Support for UserUnits
bugfixes and optimisations
@
text
@d1 1
a1 1
$NetBSD$
d3 4
a6 1
libtool support and install target cleanup.
d8 1
a8 1
--- Makefile.orig	2012-08-16 13:55:20.000000000 +0000
d10 3
a12 3
@@@@ -24,18 +24,10 @@@@ THIRD_LIBS += $(JPEG_LIB)
 THIRD_LIBS += $(OPENJPEG_LIB)
 THIRD_LIBS += $(ZLIB_LIB)
d17 1
d21 1
d25 1
d29 1
d31 1
d35 3
d39 47
a85 1
 # --- Rules ---
d87 2
a88 2
@@@@ -47,33 +39,32 @@@@ MUCBZ_HDR := $(FITZ_HDR) cbz/mucbz.h
 $(OUT) $(GEN) :
d93 1
d97 2
a98 2
-$(OUT)/% : $(OUT)/%.o
+$(OUT)/% : $(OUT)/%.lo
d101 2
a102 17
-$(OUT)/%.o : fitz/%.c $(FITZ_HDR) | $(OUT)
+$(OUT)/%.lo : fitz/%.c $(FITZ_HDR) | $(OUT)
 	$(CC_CMD)
-$(OUT)/%.o : draw/%.c $(FITZ_HDR) | $(OUT)
+$(OUT)/%.lo : draw/%.c $(FITZ_HDR) | $(OUT)
 	$(CC_CMD)
-$(OUT)/%.o : pdf/%.c $(MUPDF_HDR) | $(OUT)
+$(OUT)/%.lo : pdf/%.c $(MUPDF_HDR) | $(OUT)
 	$(CC_CMD)
-$(OUT)/%.o : xps/%.c $(MUXPS_HDR) | $(OUT)
+$(OUT)/%.lo : xps/%.c $(MUXPS_HDR) | $(OUT)
 	$(CC_CMD)
-$(OUT)/%.o : cbz/%.c $(MUCBZ_HDR) | $(OUT)
+$(OUT)/%.lo : cbz/%.c $(MUCBZ_HDR) | $(OUT)
 	$(CC_CMD)
-$(OUT)/%.o : apps/%.c fitz/fitz.h pdf/mupdf.h xps/muxps.h cbz/mucbz.h | $(OUT)
+$(OUT)/%.lo : apps/%.c fitz/fitz.h pdf/mupdf.h xps/muxps.h cbz/mucbz.h | $(OUT)
d104 5
d113 9
d125 3
a127 1
 # --- Fitz, MuPDF, MuXPS and MuCBZ library ---
d129 1
a129 2
-FITZ_LIB := $(OUT)/libfitz.a
+FITZ_LIB := $(OUT)/libfitz.la
d131 10
a140 27
 FITZ_SRC := $(notdir $(wildcard fitz/*.c draw/*.c))
 FITZ_SRC := $(filter-out draw_simple_scale.c, $(FITZ_SRC))
@@@@ -81,10 +72,10 @@@@ MUPDF_SRC := $(notdir $(wildcard pdf/*.c
 MUXPS_SRC := $(notdir $(wildcard xps/*.c))
 MUCBZ_SRC := $(notdir $(wildcard cbz/*.c))
 
-$(FITZ_LIB) : $(addprefix $(OUT)/, $(FITZ_SRC:%.c=%.o))
-$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.o))
-$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUXPS_SRC:%.c=%.o))
-$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUCBZ_SRC:%.c=%.o))
+$(FITZ_LIB) : $(addprefix $(OUT)/, $(FITZ_SRC:%.c=%.lo))
+$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.lo))
+$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUXPS_SRC:%.c=%.lo))
+$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUCBZ_SRC:%.c=%.lo))
 
 libs: $(FITZ_LIB) $(THIRD_LIBS)
 
@@@@ -127,9 +118,9 @@@@ endif
 
 generate: $(CMAP_HDR) $(FONT_HDR)
 
-$(OUT)/pdf_cmap_table.o : $(CMAP_HDR)
-$(OUT)/pdf_fontfile.o : $(FONT_HDR)
-$(OUT)/cmapdump.o : pdf/pdf_cmap.c pdf/pdf_cmap_parse.c
+$(OUT)/pdf_cmap_table.lo : $(CMAP_HDR)
+$(OUT)/pdf_fontfile.lo : $(FONT_HDR)
+$(OUT)/cmapdump.lo : pdf/pdf_cmap.c pdf/pdf_cmap_parse.c
d144 11
a154 2
@@@@ -137,12 +128,12 @@@@ MUDRAW := $(addprefix $(OUT)/, mudraw)
 $(MUDRAW) : $(FITZ_LIB) $(THIRD_LIBS)
d156 7
a162 3
 MUBUSY := $(addprefix $(OUT)/, mubusy)
-$(MUBUSY) : $(addprefix $(OUT)/, mupdfclean.o mupdfextract.o mupdfinfo.o mupdfposter.o mupdfshow.o) $(FITZ_LIB) $(THIRD_LIBS)
+$(MUBUSY) : $(addprefix $(OUT)/, mupdfclean.lo mupdfextract.lo mupdfinfo.lo mupdfposter.lo mupdfshow.lo) $(FITZ_LIB) $(THIRD_LIBS)
d165 5
a169 4
 MUVIEW := $(OUT)/mupdf
 $(MUVIEW) : $(FITZ_LIB) $(THIRD_LIBS)
-$(MUVIEW) : $(addprefix $(OUT)/, x11_main.o x11_image.o pdfapp.o)
+$(MUVIEW) : $(addprefix $(OUT)/, x11_main.lo x11_image.lo pdfapp.lo)
d171 17
d189 44
a232 16
 
@@@@ -165,11 +156,14 @@@@ incdir ?= $(prefix)/include
 mandir ?= $(prefix)/share/man
 
 install: $(FITZ_LIB) $(MUVIEW) $(MUDRAW) $(MUBUSY)
-	install -d $(bindir) $(libdir) $(incdir) $(mandir)/man1
-	install $(FITZ_LIB) $(libdir)
-	install fitz/memento.h fitz/fitz.h pdf/mupdf.h xps/muxps.h cbz/mucbz.h $(incdir)
-	install $(MUVIEW) $(MUDRAW) $(MUBUSY) $(bindir)
-	install $(wildcard apps/man/*.1) $(mandir)/man1
+	${BSD_INSTALL_DATA_DIR} $(bindir) $(libdir) $(incdir)
+	${BSD_INSTALL_MAN_DIR} $(mandir)/man1
+	${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} $(FITZ_LIB) $(libdir)
+	${BSD_INSTALL_DATA} fitz/memento.h fitz/fitz.h pdf/mupdf.h xps/muxps.h cbz/mucbz.h $(incdir)
+	for f in $(MUVIEW) $(MUDRAW) $(MUBUSY); do \
+		${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} $$f $(bindir); \
a233 1
+	${BSD_INSTALL_MAN} $(wildcard apps/man/*.1) $(mandir)/man1
d235 9
a243 1
 # --- Clean and Default ---
d245 2
@


1.4
log
@Update to 1.0:

MuPDF 1.0 (2012-04-24)

The 1.0 release is here!

MuPDF 1.0 RC1 (2012-03-29)

The 1.0 release rapidly approaches! This version brings with it a whole host of features, including:

    Removal of all global variables: we now pass a context pointer
    through the code freeing us from the use of globals within the
    library.

    Multi-threaded operation: while MuPDF does not require a thread
    library, hooks are in place so that if one is used, significant
    speedups can be gained from using multiple cores to render.

    New error handling: a portable exception-like system is used
    to allow neater handling of errors. This leads to more stability
    and better resilience to broken files.

    Public/Private API: the API has undergone a significant revision
    (required by some of the above changes, plus renaming/revising
    for clarity and consistency), and has been split into public
    and private headers. The plan is that the public portion of
    the API should remain much more static in future.

    Improved Text Extraction device: a cleaner API to the experimental
    text extraction device, offering a list of styles, and more
    cleanly delineated content.

    Documentation: All public header entry points/structures are
    now documented and overviews of how to call the library to
    render pages both in single and multi-threaded mode are given.

    A new scavenging memory manager; makes much better use of the
    memory available by freeing cached items 'just in time'.

    Many, many, bugfixes.

This is such a large and significant version that we're doing a
release candidate first to allow us to correct any obvious bugs
that are found. Please try it and let us know how you get on!
@
text
@d1 1
a1 1
$NetBSD: patch-ac,v 1.3 2012/03/24 13:31:58 drochner Exp $
d3 3
a5 1
--- Makefile.orig	2012-04-24 16:41:33.000000000 +0000
d7 1
a7 1
@@@@ -24,17 +24,9 @@@@ THIRD_LIBS += $(JPEG_LIB)
d20 1
a20 1
-AR_CMD = $(QUIET_AR) $(AR) cru $@@ $^
d22 1
d26 1
a26 1
 MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $@@
d29 1
d103 2
a104 1
@@@@ -139,13 +130,13 @@@@ $(MU_APPS) : $(FITZ_LIB) $(THIRD_LIBS)
d106 3
a108 5
 BUSY_SRC := $(notdir $(wildcard apps/mubusy_*.c))
 BUSY_APP := $(addprefix $(OUT)/, mubusy)
-$(BUSY_APP) : $(addprefix $(OUT)/, $(BUSY_SRC:%.c=%.o))
+$(BUSY_APP) : $(addprefix $(OUT)/, $(BUSY_SRC:%.c=%.lo))
 $(BUSY_APP) : $(FITZ_LIB) $(THIRD_LIBS)
d111 4
a114 4
 MUPDF := $(OUT)/mupdf
 $(MUPDF) : $(FITZ_LIB) $(THIRD_LIBS)
-$(MUPDF) : $(addprefix $(OUT)/, x11_main.o x11_image.o pdfapp.o)
+$(MUPDF) : $(addprefix $(OUT)/, x11_main.lo x11_image.lo pdfapp.lo)
d118 2
a119 6
@@@@ -165,14 +156,16 @@@@ prefix ?= /usr/local
 bindir ?= $(prefix)/bin
 libdir ?= $(prefix)/lib
 incdir ?= $(prefix)/include
-mandir ?= $(prefix)/share/man
+mandir ?= $(prefix)/man
d121 1
a121 1
 install: $(FITZ_LIB) $(MU_APPS) $(MUPDF)
d125 1
a125 1
-	install $(MU_APPS) $(MUPDF) $(bindir)
d127 3
a129 2
+	${BSD_INSTALL_DATA_DIR} $(bindir) $(libdir) $(incdir) $(mandir)/man1
+	libtool --mode=install ${BSD_INSTALL_LIB} $(FITZ_LIB) $(libdir)
d131 2
a132 2
+	for f in $(MU_APPS) $(MUPDF); do \
+		libtool --mode=install ${BSD_INSTALL_PROGRAM} $$f $(bindir); \
d134 1
a134 1
+	${BSD_INSTALL_DATA} $(wildcard apps/man/*.1) $(mandir)/man1
@


1.3
log
@update to 0.9
changes:
-xps support
-speedup, rendering improvements
-cleanup, bugfixes
@
text
@d1 1
a1 1
$NetBSD$
d3 1
a3 1
--- Makefile.orig	2011-09-05 11:55:39.000000000 +0000
d5 1
a5 1
@@@@ -21,17 +21,9 @@@@ THIRD_LIBS += $(JPEG_LIB)
d17 1
a17 1
 CC_CMD = $(QUIET_CC) $(CC) $(CFLAGS) -o $@@ -c $<
d20 1
d26 1
a26 1
@@@@ -39,40 +31,40 @@@@ MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $@@
d33 1
d39 18
a56 10
-$(OUT)/%.o : fitz/%.c fitz/fitz.h | $(OUT)
-	$(CC_CMD)
-$(OUT)/%.o : draw/%.c fitz/fitz.h | $(OUT)
-	$(CC_CMD)
-$(OUT)/%.o : pdf/%.c fitz/fitz.h pdf/mupdf.h | $(OUT)
-	$(CC_CMD)
-$(OUT)/%.o : xps/%.c fitz/fitz.h xps/muxps.h | $(OUT)
-	$(CC_CMD)
-$(OUT)/%.o : apps/%.c fitz/fitz.h pdf/mupdf.h xps/muxps.h | $(OUT)
-	$(CC_CMD)
a57 11
-	$(CC_CMD)
+$(OUT)/%.lo : fitz/%.c fitz/fitz.h | $(OUT)
+	libtool --mode=compile $(CC_CMD)
+$(OUT)/%.lo : draw/%.c fitz/fitz.h | $(OUT)
+	libtool --mode=compile $(CC_CMD)
+$(OUT)/%.lo : pdf/%.c fitz/fitz.h pdf/mupdf.h | $(OUT)
+	libtool --mode=compile $(CC_CMD)
+$(OUT)/%.lo : xps/%.c fitz/fitz.h xps/muxps.h | $(OUT)
+	libtool --mode=compile $(CC_CMD)
+$(OUT)/%.lo : apps/%.c fitz/fitz.h pdf/mupdf.h xps/muxps.h | $(OUT)
+	libtool --mode=compile $(CC_CMD)
d59 1
a59 1
+	libtool --mode=compile $(CC_CMD)
d64 1
a64 1
 # --- Fitz, MuPDF and MuXPS libraries ---
a66 2
-MUPDF_LIB := $(OUT)/libmupdf.a
-MUXPS_LIB := $(OUT)/libmuxps.a
a67 2
+MUPDF_LIB := $(OUT)/libmupdf.la
+MUXPS_LIB := $(OUT)/libmuxps.la
d70 2
a71 1
 MUPDF_SRC := $(notdir $(wildcard pdf/*.c))
d73 1
d76 3
a78 2
-$(MUPDF_LIB) : $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.o))
-$(MUXPS_LIB) : $(addprefix $(OUT)/, $(MUXPS_SRC:%.c=%.o))
d80 3
a82 2
+$(MUPDF_LIB) : $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.lo))
+$(MUXPS_LIB) : $(addprefix $(OUT)/, $(MUXPS_SRC:%.c=%.lo))
d84 3
a86 3
 libs: $(MUXPS_LIB) $(MUPDF_LIB) $(FITZ_LIB) $(THIRD_LIBS)
 	@@ echo MuPDF/XPS and underlying libraries built
@@@@ -116,13 +108,13 @@@@ endif
d99 7
a105 3
-PDF_APPS := $(addprefix $(OUT)/, pdfdraw pdfclean pdfextract pdfinfo pdfshow)
+PDF_APPS := $(addprefix $(OUT)/, pdfdraw pdfclean pdfextract mupdf-pdfinfo pdfshow)
 XPS_APPS := $(addprefix $(OUT)/, xpsdraw)
d107 1
a107 2
 $(PDF_APPS) : $(MUPDF_LIB) $(FITZ_LIB) $(THIRD_LIBS)
@@@@ -131,7 +123,7 @@@@ $(XPS_APPS) : $(MUXPS_LIB) $(FITZ_LIB) $
d109 1
a109 2
 $(MUPDF) : $(MUXPS_LIB) $(MUPDF_LIB) $(FITZ_LIB) $(THIRD_LIBS)
 ifeq "$(NOX11)" ""
d115 1
a115 1
@@@@ -141,14 +133,18 @@@@ prefix ?= /usr/local
d122 1
a122 1
 install: $(MUXPS_LIB) $(MUPDF_LIB) $(FITZ_LIB) $(PDF_APPS) $(XPS_APPS) $(MUPDF)
d124 3
a126 3
-	install $(MUXPS_LIB) $(MUPDF_LIB) $(FITZ_LIB) $(libdir)
-	install fitz/fitz.h pdf/mupdf.h xps/muxps.h $(incdir)
-	install $(PDF_APPS) $(XPS_APPS) $(MUPDF) $(bindir)
d129 4
a132 6
+	for f in $(MUXPS_LIB) $(MUPDF_LIB) $(FITZ_LIB); do \
+	 libtool --mode=install ${BSD_INSTALL_LIB} $$f $(libdir); \
+	done
+	${BSD_INSTALL_DATA} fitz/fitz.h pdf/mupdf.h xps/muxps.h $(incdir)
+	for f in $(PDF_APPS) $(XPS_APPS) $(MUPDF); do \
+	 libtool --mode=install ${BSD_INSTALL_PROGRAM} $$f $(bindir); \
@


1.2
log
@update to 0.8
no changelog available, at least some security fixes were done:
-fix possible memory corruption due to malformed JPEG images
 (was patched in pkgsrc)
-fix (at least) 2 cases of integer overflow in array allocation (SA42320)
@
text
@d3 1
a3 1
--- Makefile.orig	2011-03-03 15:10:58.000000000 +0000
d5 11
a15 17
@@@@ -41,32 +41,21 @@@@ CFLAGS += $(THIRD_INCS) $(SYS_FREETYPE_I
 # Build commands
 #
 
-ifneq "$(verbose)" ""
-
 GENFILE_CMD = $(firstword $^) $@@ $(wordlist 2, 999, $^)
 CC_CMD = $(CC) -o $@@ -c $< $(CFLAGS)
-LD_CMD = $(CC) -o $@@ $^ $(LDFLAGS) $(LIBS)
-AR_CMD = rm -f $@@ && $(AR) cru $@@ $^
-
-else
-
-GENFILE_CMD = @@ echo GENFILE $@@ && $(firstword $^) $@@ $(wordlist 2, 999, $^)
-CC_CMD = @@ echo CC $@@ && $(CC) -o $@@ -c $< $(CFLAGS)
-LD_CMD = @@ echo LD $@@ && $(CC) -o $@@ $^ $(LDFLAGS) $(LIBS)
-AR_CMD = @@ echo AR $@@ && rm -f $@@ && $(AR) cru $@@ $^
d17 3
a19 2
-endif
+LD_CMD = ${LIBTOOL} --mode=link $(CC) -o $@@ $^ $(LDFLAGS) $(LIBS)
d21 117
a138 170
 #
 # Code generation tools
 #
 
 FONTDUMP_EXE := $(OBJDIR)/fontdump
-$(FONTDUMP_EXE): $(OBJDIR)/fontdump.o
+$(FONTDUMP_EXE): $(OBJDIR)/fontdump.lo
 	$(LD_CMD)
 
 CMAPDUMP_EXE := $(OBJDIR)/cmapdump
-$(CMAPDUMP_EXE): $(OBJDIR)/cmapdump.o
+$(CMAPDUMP_EXE): $(OBJDIR)/cmapdump.lo
 	$(LD_CMD)
 
 #
@@@@ -113,7 +102,7 @@@@ FITZ_SRC := \
 	fitz/stm_buffer.c \
 	fitz/stm_open.c \
 	fitz/stm_read.c
-FITZ_OBJ := $(FITZ_SRC:fitz/%.c=$(OBJDIR)/%.o)
+FITZ_OBJ := $(FITZ_SRC:fitz/%.c=$(OBJDIR)/%.lo)
 $(FITZ_OBJ): $(FITZ_HDR)
 
 DRAW_SRC := $(DRAW_ARCH_SRC) \
@@@@ -129,8 +118,8 @@@@ DRAW_SRC := $(DRAW_ARCH_SRC) \
 	draw/pathscan.c \
 	draw/pathstroke.c \
 	draw/porterduff.c
-DRAW_OBJ := $(DRAW_SRC:draw/%.c=$(OBJDIR)/%.o)
-DRAW_OBJ := $(DRAW_OBJ:draw/%.s=$(OBJDIR)/%.o)
+DRAW_OBJ := $(DRAW_SRC:draw/%.c=$(OBJDIR)/%.lo)
+DRAW_OBJ := $(DRAW_OBJ:draw/%.s=$(OBJDIR)/%.lo)
 $(DRAW_OBJ): $(FITZ_HDR)
 
 MUPDF_HDR := $(FITZ_HDR) mupdf/mupdf.h
@@@@ -167,19 +156,19 @@@@ MUPDF_SRC := \
 	mupdf/pdf_unicode.c \
 	mupdf/pdf_xobject.c \
 	mupdf/pdf_xref.c
-MUPDF_OBJ := $(MUPDF_SRC:mupdf/%.c=$(OBJDIR)/%.o)
+MUPDF_OBJ := $(MUPDF_SRC:mupdf/%.c=$(OBJDIR)/%.lo)
 $(MUPDF_OBJ): $(MUPDF_HDR)
 
-$(OBJDIR)/%.o: fitz/%.c
-	$(CC_CMD)
-$(OBJDIR)/%.o: draw/%.c
-	$(CC_CMD)
-$(OBJDIR)/%.o: draw/%.s
-	$(CC_CMD)
-$(OBJDIR)/%.o: mupdf/%.c
-	$(CC_CMD)
-$(OBJDIR)/%.o: $(GENDIR)/%.c
-	$(CC_CMD)
+$(OBJDIR)/%.lo: fitz/%.c
+	libtool --mode=compile $(CC_CMD)
+$(OBJDIR)/%.lo: draw/%.c
+	libtool --mode=compile $(CC_CMD)
+$(OBJDIR)/%.lo: draw/%.s
+	libtool --mode=compile $(CC_CMD)
+$(OBJDIR)/%.lo: mupdf/%.c
+	libtool --mode=compile $(CC_CMD)
+$(OBJDIR)/%.lo: $(GENDIR)/%.c
+	libtool --mode=compile $(CC_CMD)
 
 #
 # Generated font file dumps
@@@@ -218,7 +207,7 @@@@ FONT_SRC := \
 	$(GENDIR)/font_base14.c \
 	$(GENDIR)/font_cjk.c
 
-FONT_OBJ := $(FONT_SRC:$(GENDIR)/%.c=$(OBJDIR)/%.o)
+FONT_OBJ := $(FONT_SRC:$(GENDIR)/%.c=$(OBJDIR)/%.lo)
 
 
 #
@@@@ -288,13 +277,13 @@@@ CMAP_SRC := \
 	$(GENDIR)/cmap_japan.c \
 	$(GENDIR)/cmap_korea.c
 
-CMAP_OBJ := $(CMAP_SRC:$(GENDIR)/%.c=$(OBJDIR)/%.o)
+CMAP_OBJ := $(CMAP_SRC:$(GENDIR)/%.c=$(OBJDIR)/%.lo)
 
 #
 # Library
 #
 
-MUPDF_LIB = $(OBJDIR)/libmupdf.a
+MUPDF_LIB = $(OBJDIR)/libmupdf.la
 $(MUPDF_LIB): $(FITZ_OBJ) $(DRAW_OBJ) $(MUPDF_OBJ) $(CMAP_OBJ) $(FONT_OBJ)
 	 $(AR_CMD)
 
@@@@ -304,40 +293,40 @@@@ $(MUPDF_LIB): $(FITZ_OBJ) $(DRAW_OBJ) $(
 
 APPS = $(PDFSHOW_EXE) $(PDFCLEAN_EXE) $(PDFDRAW_EXE) $(PDFEXTRACT_EXE) $(PDFINFO_EXE) $(PDFVIEW_EXE)
 
-$(OBJDIR)/%.o: apps/%.c
-	$(CC_CMD)
+$(OBJDIR)/%.lo: apps/%.c
+	libtool --mode=compile $(CC_CMD)
 
 PDFSHOW_SRC=apps/pdfshow.c
-PDFSHOW_OBJ=$(PDFSHOW_SRC:apps/%.c=$(OBJDIR)/%.o)
+PDFSHOW_OBJ=$(PDFSHOW_SRC:apps/%.c=$(OBJDIR)/%.lo)
 PDFSHOW_EXE=$(OBJDIR)/pdfshow
 $(PDFSHOW_OBJ): $(MUPDF_HDR)
 $(PDFSHOW_EXE): $(PDFSHOW_OBJ) $(MUPDF_LIB) $(THIRD_LIBS)
 	$(LD_CMD)
 
 PDFCLEAN_SRC=apps/pdfclean.c
-PDFCLEAN_OBJ=$(PDFCLEAN_SRC:apps/%.c=$(OBJDIR)/%.o)
+PDFCLEAN_OBJ=$(PDFCLEAN_SRC:apps/%.c=$(OBJDIR)/%.lo)
 PDFCLEAN_EXE=$(OBJDIR)/pdfclean
 $(PDFCLEAN_OBJ): $(MUPDF_HDR)
 $(PDFCLEAN_EXE): $(PDFCLEAN_OBJ) $(MUPDF_LIB) $(THIRD_LIBS)
 	$(LD_CMD)
 
 PDFDRAW_SRC=apps/pdfdraw.c
-PDFDRAW_OBJ=$(PDFDRAW_SRC:apps/%.c=$(OBJDIR)/%.o)
+PDFDRAW_OBJ=$(PDFDRAW_SRC:apps/%.c=$(OBJDIR)/%.lo)
 PDFDRAW_EXE=$(OBJDIR)/pdfdraw
 $(PDFDRAW_OBJ): $(MUPDF_HDR)
 $(PDFDRAW_EXE): $(PDFDRAW_OBJ) $(MUPDF_LIB) $(THIRD_LIBS)
 	$(LD_CMD)
 
 PDFEXTRACT_SRC=apps/pdfextract.c
-PDFEXTRACT_OBJ=$(PDFEXTRACT_SRC:apps/%.c=$(OBJDIR)/%.o)
+PDFEXTRACT_OBJ=$(PDFEXTRACT_SRC:apps/%.c=$(OBJDIR)/%.lo)
 PDFEXTRACT_EXE=$(OBJDIR)/pdfextract
 $(PDFEXTRACT_OBJ): $(MUPDF_HDR)
 $(PDFEXTRACT_EXE): $(PDFEXTRACT_OBJ) $(MUPDF_LIB) $(THIRD_LIBS)
 	$(LD_CMD)
 
 PDFINFO_SRC=apps/pdfinfo.c
-PDFINFO_OBJ=$(PDFINFO_SRC:apps/%.c=$(OBJDIR)/%.o)
-PDFINFO_EXE=$(OBJDIR)/pdfinfo
+PDFINFO_OBJ=$(PDFINFO_SRC:apps/%.c=$(OBJDIR)/%.lo)
+PDFINFO_EXE=$(OBJDIR)/mupdf-pdfinfo
 $(PDFINFO_OBJ): $(MUPDF_HDR)
 $(PDFINFO_EXE): $(PDFINFO_OBJ) $(MUPDF_LIB) $(THIRD_LIBS)
 	$(LD_CMD)
@@@@ -345,7 +334,7 @@@@ $(PDFINFO_EXE): $(PDFINFO_OBJ) $(MUPDF_L
 PDFAPP_HDR = apps/pdfapp.h
 
 X11VIEW_SRC=apps/x11_main.c apps/x11_image.c apps/pdfapp.c
-X11VIEW_OBJ=$(X11VIEW_SRC:apps/%.c=$(OBJDIR)/%.o)
+X11VIEW_OBJ=$(X11VIEW_SRC:apps/%.c=$(OBJDIR)/%.lo)
 X11VIEW_EXE=$(OBJDIR)/mupdf
 
 $(X11VIEW_OBJ): $(MUPDF_HDR) $(PDFAPP_HDR)
@@@@ -354,7 +343,7 @@@@ $(X11VIEW_EXE): $(X11VIEW_OBJ) $(MUPDF_L
 
 WINVIEW_SRC=apps/win_main.c apps/pdfapp.c
 WINVIEW_RES=apps/win_res.rc
-WINVIEW_OBJ=$(WINVIEW_SRC:apps/%.c=$(OBJDIR)/%.o) $(WINVIEW_RES:apps/%.rc=$(OBJDIR)/%.o)
+WINVIEW_OBJ=$(WINVIEW_SRC:apps/%.c=$(OBJDIR)/%.lo) $(WINVIEW_RES:apps/%.rc=$(OBJDIR)/%.lo)
 WINVIEW_EXE=$(OBJDIR)/mupdf.exe
 
 $(OBJDIR)/%.o: apps/%.rc
@@@@ -383,7 +372,7 @@@@ LIBDIR ?= $(prefix)/lib
 INCDIR ?= $(prefix)/include
 
 install: $(OBJDIR) $(GENDIR) $(MUPDF_LIB) $(APPS)
-	install -d $(BINDIR) $(LIBDIR) $(INCDIR)
-	install $(APPS) $(BINDIR)
-	install $(MUPDF_LIB) $(LIBDIR)
-	install $(MUPDF_HDR) $(INCDIR)
+	mkdir -p $(BINDIR) $(LIBDIR) $(INCDIR)
+	libtool --mode=install ${BSD_INSTALL_PROGRAM} $(APPS) $(BINDIR)
+	libtool --mode=install ${BSD_INSTALL_LIB} $(MUPDF_LIB) $(LIBDIR)
+	${BSD_INSTALL_DATA} $(MUPDF_HDR) $(INCDIR)
@


1.1
log
@Update to mupdf-0.7. No changelog, but this moves to external
dependencies on the pkgsrc side.
@
text
@d3 1
a3 1
--- Makefile.orig	2010-08-25 14:12:08.000000000 +0000
d42 1
a42 1
@@@@ -112,7 +101,7 @@@@ FITZ_SRC := \
d51 1
a51 1
@@@@ -128,8 +117,8 @@@@ DRAW_SRC := $(DRAW_ARCH_SRC) \
d62 1
a62 1
@@@@ -166,19 +155,19 @@@@ MUPDF_SRC := \
d93 1
a93 1
@@@@ -217,7 +206,7 @@@@ FONT_SRC := \
d102 1
a102 1
@@@@ -287,13 +276,13 @@@@ CMAP_SRC := \
d118 1
a118 1
@@@@ -303,40 +292,40 @@@@ $(MUPDF_LIB): $(FITZ_OBJ) $(DRAW_OBJ) $(
d167 1
a167 1
@@@@ -344,7 +333,7 @@@@ $(PDFINFO_EXE): $(PDFINFO_OBJ) $(MUPDF_L
d176 1
a176 1
@@@@ -353,7 +342,7 @@@@ $(X11VIEW_EXE): $(X11VIEW_OBJ) $(MUPDF_L
d185 2
a186 2
@@@@ -378,7 +367,7 @@@@ nuke:
 	rm -rf build
d189 8
a196 8
-	install -d $(prefix)/bin $(prefix)/lib $(prefix)/include
-	install $(APPS) $(prefix)/bin
-	install $(MUPDF_LIB) $(prefix)/lib
-	install $(MUPDF_HDR) $(prefix)/include
+	mkdir -p $(prefix)/bin $(prefix)/lib $(prefix)/include
+	libtool --mode=install ${BSD_INSTALL_PROGRAM} $(APPS) $(prefix)/bin
+	libtool --mode=install ${BSD_INSTALL_LIB} $(MUPDF_LIB) $(prefix)/lib
+	${BSD_INSTALL_DATA} $(MUPDF_HDR) $(prefix)/include
@

