pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/print/mupdf



Module Name:    pkgsrc
Committed By:   leot
Date:           Wed Apr 12 13:03:09 UTC 2017

Modified Files:
        pkgsrc/print/mupdf: Makefile PLIST buildlink3.mk distinfo options.mk
        pkgsrc/print/mupdf/files: mupdf.pc
        pkgsrc/print/mupdf/patches: patch-Makethird patch-ab patch-ac
            patch-source_fitz_load-jpx.c patch-thirdparty_mujs_Makefile
Removed Files:
        pkgsrc/print/mupdf/patches: patch-source_fitz_pixmap.c
            patch-source_tools_mudraw.c patch-thirdparty_mujs_jsdate.c
            patch-thirdparty_mujs_jsrun.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 pkgsrc/print/mupdf/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/print/mupdf/PLIST
cvs rdiff -u -r1.17 -r1.18 pkgsrc/print/mupdf/buildlink3.mk
cvs rdiff -u -r1.31 -r1.32 pkgsrc/print/mupdf/distinfo
cvs rdiff -u -r1.4 -r1.5 pkgsrc/print/mupdf/options.mk
cvs rdiff -u -r1.11 -r1.12 pkgsrc/print/mupdf/files/mupdf.pc
cvs rdiff -u -r1.6 -r1.7 pkgsrc/print/mupdf/patches/patch-Makethird
cvs rdiff -u -r1.13 -r1.14 pkgsrc/print/mupdf/patches/patch-ab
cvs rdiff -u -r1.15 -r1.16 pkgsrc/print/mupdf/patches/patch-ac
cvs rdiff -u -r1.4 -r1.5 \
    pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c
cvs rdiff -u -r1.1 -r0 pkgsrc/print/mupdf/patches/patch-source_fitz_pixmap.c \
    pkgsrc/print/mupdf/patches/patch-source_tools_mudraw.c \
    pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_jsdate.c \
    pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_jsrun.c
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/print/mupdf/Makefile
diff -u pkgsrc/print/mupdf/Makefile:1.47 pkgsrc/print/mupdf/Makefile:1.48
--- pkgsrc/print/mupdf/Makefile:1.47    Sun Feb 12 06:24:48 2017
+++ pkgsrc/print/mupdf/Makefile Wed Apr 12 13:03:08 2017
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.47 2017/02/12 06:24:48 ryoon Exp $
+# $NetBSD: Makefile,v 1.48 2017/04/12 13:03:08 leot Exp $
 
-DISTNAME=      mupdf-1.10a-source
+DISTNAME=      mupdf-1.11-source
 PKGNAME=       ${DISTNAME:S/-source//}
-PKGREVISION=   5
 CATEGORIES=    print
 MASTER_SITES=  http://mupdf.com/downloads/archive/
 
@@ -38,7 +37,7 @@ post-extract:
            ${WRKSRC}/thirdparty/glfw \
            ${WRKSRC}/thirdparty/harfbuzz \
            ${WRKSRC}/thirdparty/jbig2dec \
-           ${WRKSRC}/thirdparty/jpeg \
+           ${WRKSRC}/thirdparty/libjpeg \
            ${WRKSRC}/thirdparty/openjpeg \
            ${WRKSRC}/thirdparty/zlib
 
@@ -53,6 +52,7 @@ post-install:
 .include "../../graphics/freetype2/buildlink3.mk"
 .include "../../graphics/jbig2dec/buildlink3.mk"
 .include "../../mk/jpeg.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
 .include "../../graphics/openjpeg/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
 .include "../../x11/libXext/buildlink3.mk"

Index: pkgsrc/print/mupdf/PLIST
diff -u pkgsrc/print/mupdf/PLIST:1.13 pkgsrc/print/mupdf/PLIST:1.14
--- pkgsrc/print/mupdf/PLIST:1.13       Mon Nov 28 14:40:42 2016
+++ pkgsrc/print/mupdf/PLIST    Wed Apr 12 13:03:08 2017
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.13 2016/11/28 14:40:42 leot Exp $
+@comment $NetBSD: PLIST,v 1.14 2017/04/12 13:03:08 leot Exp $
 bin/mujstest
 bin/mupdf
 ${PLIST.glfw}bin/mupdf-gl
@@ -7,6 +7,7 @@ bin/mutool
 include/mupdf/fitz.h
 include/mupdf/fitz/annotation.h
 include/mupdf/fitz/archive.h
+include/mupdf/fitz/band-writer.h
 include/mupdf/fitz/bidi.h
 include/mupdf/fitz/bitmap.h
 include/mupdf/fitz/buffer.h
@@ -21,13 +22,13 @@ include/mupdf/fitz/document.h
 include/mupdf/fitz/filter.h
 include/mupdf/fitz/font.h
 include/mupdf/fitz/function.h
+include/mupdf/fitz/geometry.h
 include/mupdf/fitz/getopt.h
 include/mupdf/fitz/glyph-cache.h
 include/mupdf/fitz/glyph.h
 include/mupdf/fitz/hash.h
 include/mupdf/fitz/image.h
 include/mupdf/fitz/link.h
-include/mupdf/fitz/math.h
 include/mupdf/fitz/outline.h
 include/mupdf/fitz/output-pcl.h
 include/mupdf/fitz/output-png.h
@@ -44,7 +45,7 @@ include/mupdf/fitz/separation.h
 include/mupdf/fitz/shade.h
 include/mupdf/fitz/store.h
 include/mupdf/fitz/stream.h
-include/mupdf/fitz/string.h
+include/mupdf/fitz/string-util.h
 include/mupdf/fitz/structured-text.h
 include/mupdf/fitz/system.h
 include/mupdf/fitz/text.h
@@ -82,7 +83,7 @@ include/mupdf/pdf/xref.h
 include/mupdf/svg.h
 lib/libmupdf.la
 lib/libmupdfthird.la
-lib/libmutools.la
+lib/libmuthreads.la
 lib/pkgconfig/mupdf.pc
 man/man1/mupdf.1
 man/man1/mutool.1

Index: pkgsrc/print/mupdf/buildlink3.mk
diff -u pkgsrc/print/mupdf/buildlink3.mk:1.17 pkgsrc/print/mupdf/buildlink3.mk:1.18
--- pkgsrc/print/mupdf/buildlink3.mk:1.17       Sun Feb 12 06:24:48 2017
+++ pkgsrc/print/mupdf/buildlink3.mk    Wed Apr 12 13:03:08 2017
@@ -1,12 +1,11 @@
-# $NetBSD: buildlink3.mk,v 1.17 2017/02/12 06:24:48 ryoon Exp $
+# $NetBSD: buildlink3.mk,v 1.18 2017/04/12 13:03:08 leot Exp $
 
 BUILDLINK_TREE+=       mupdf
 
 .if !defined(MUPDF_BUILDLINK3_MK)
 MUPDF_BUILDLINK3_MK:=
 
-BUILDLINK_API_DEPENDS.mupdf+=  mupdf>=1.10a
-BUILDLINK_ABI_DEPENDS.mupdf?=  mupdf>=1.10anb5
+BUILDLINK_API_DEPENDS.mupdf+=  mupdf>=1.11
 BUILDLINK_PKGSRCDIR.mupdf?=    ../../print/mupdf
 
 pkgbase := mupdf
@@ -14,11 +13,10 @@ pkgbase := mupdf
 
 .if !empty(PKG_BUILD_OPTIONS.mupdf:Mcurl)
 .include "../../www/curl/buildlink3.mk"
-.include "../../mk/pthread.buildlink3.mk"
 .endif
 
 .if !empty(PKG_BUILD_OPTIONS.mupdf:Mglfw)
-.include "../../graphics/glut/buildlink3.mk"
+.include "../../graphics/MesaLib/buildlink3.mk"
 .include "../../graphics/glfw/buildlink3.mk"
 .endif
 
@@ -29,6 +27,7 @@ pkgbase := mupdf
 .include "../../graphics/openjpeg/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
 .include "../../mk/jpeg.buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
 .endif # MUPDF_BUILDLINK3_MK
 
 BUILDLINK_TREE+=       -mupdf

Index: pkgsrc/print/mupdf/distinfo
diff -u pkgsrc/print/mupdf/distinfo:1.31 pkgsrc/print/mupdf/distinfo:1.32
--- pkgsrc/print/mupdf/distinfo:1.31    Sat Feb 11 09:39:05 2017
+++ pkgsrc/print/mupdf/distinfo Wed Apr 12 13:03:08 2017
@@ -1,16 +1,12 @@
-$NetBSD: distinfo,v 1.31 2017/02/11 09:39:05 leot Exp $
+$NetBSD: distinfo,v 1.32 2017/04/12 13:03:08 leot Exp $
 
-SHA1 (mupdf-1.10a-source.tar.gz) = 1c3a6e1d4406912004b8e2c09435199e6b425191
-RMD160 (mupdf-1.10a-source.tar.gz) = bfb482681c6804db8a0fd9ec46b16ac6f9fffdf2
-SHA512 (mupdf-1.10a-source.tar.gz) = 8c735963364985e74ceb38242afae555a3d2ee7c69abe3fe5c485e8613a83d996a58f231cb689a156019d431fa67d565503247d010b0a404054850483aed9fec
-Size (mupdf-1.10a-source.tar.gz) = 42264707 bytes
-SHA1 (patch-Makethird) = 0a5951d543755c42053013f03b1c573b5da9c82c
-SHA1 (patch-ab) = 7bee583086078359ce04eacd9db3b4f03737a7bb
-SHA1 (patch-ac) = d75afe8b05b85d042dc1baeaf8a9988f2e60338a
+SHA1 (mupdf-1.11-source.tar.gz) = f782d36aaa896319207e81953e5a622201477b5b
+RMD160 (mupdf-1.11-source.tar.gz) = 573307473a1ac81aca4519b0e57a7111aae7803f
+SHA512 (mupdf-1.11-source.tar.gz) = 501670f540e298a8126806ebbd9db8b29866f663b7bbf26c9ade1933e42f0c00ad410b9d93f3ddbfb3e45c38722869095de28d832fe3fb3703c55cc9a01dbf63
+Size (mupdf-1.11-source.tar.gz) = 40156070 bytes
+SHA1 (patch-Makethird) = a4d1bb3c8d509a84803c9b60521fd9b6b17b9717
+SHA1 (patch-ab) = d348b41bf3c35c78c22e9816d860f1894910b2c9
+SHA1 (patch-ac) = 9b0c368d05a436f94118efce517fea69c82898e7
 SHA1 (patch-ae) = c6b113818b32cb4470e8549c00a16e0b2f364ede
-SHA1 (patch-source_fitz_load-jpx.c) = fbe6814536d37835a4daa5bb90b1f6cf8698f807
-SHA1 (patch-source_fitz_pixmap.c) = d0b3e44780fd64381424e367e5233ce1013dc974
-SHA1 (patch-source_tools_mudraw.c) = 99b827e39767559a8d5b6b380f0bbb100f5125e7
-SHA1 (patch-thirdparty_mujs_Makefile) = f1da7cdf2c9e2e4bbac3e80ef486204a39b27e34
-SHA1 (patch-thirdparty_mujs_jsdate.c) = 020fcb9d1e77bd7ba10943070673d53bbcee573b
-SHA1 (patch-thirdparty_mujs_jsrun.c) = 79f730436b1f67780468c10096d3dbfb5e14d5a5
+SHA1 (patch-source_fitz_load-jpx.c) = 773ec1ef6b1632a10ff7c8ff76081e89bdcad593
+SHA1 (patch-thirdparty_mujs_Makefile) = cd6a20d56020ae5028f95e24e75f5e4a62127f9f

Index: pkgsrc/print/mupdf/options.mk
diff -u pkgsrc/print/mupdf/options.mk:1.4 pkgsrc/print/mupdf/options.mk:1.5
--- pkgsrc/print/mupdf/options.mk:1.4   Thu Feb  4 11:50:24 2016
+++ pkgsrc/print/mupdf/options.mk       Wed Apr 12 13:03:08 2017
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.4 2016/02/04 11:50:24 leot Exp $
+# $NetBSD: options.mk,v 1.5 2017/04/12 13:03:08 leot Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.mupdf
 PKG_SUPPORTED_OPTIONS= curl glfw
@@ -12,7 +12,6 @@ PLIST_VARS+=          glfw
 #
 .if !empty(PKG_OPTIONS:Mcurl)
 .include "../../www/curl/buildlink3.mk"
-.include "../../mk/pthread.buildlink3.mk"
 .endif
 
 #
@@ -20,6 +19,7 @@ PLIST_VARS+=          glfw
 #
 .if !empty(PKG_OPTIONS:Mglfw)
 PLIST.glfw=    yes
-.include "../../graphics/glut/buildlink3.mk"
+.include "../../graphics/MesaLib/buildlink3.mk"
+BUILDLINK_API_DEPENDS.glfw+=   glfw>=3.2.1
 .include "../../graphics/glfw/buildlink3.mk"
 .endif

Index: pkgsrc/print/mupdf/files/mupdf.pc
diff -u pkgsrc/print/mupdf/files/mupdf.pc:1.11 pkgsrc/print/mupdf/files/mupdf.pc:1.12
--- pkgsrc/print/mupdf/files/mupdf.pc:1.11      Fri Dec  9 08:19:31 2016
+++ pkgsrc/print/mupdf/files/mupdf.pc   Wed Apr 12 13:03:08 2017
@@ -5,6 +5,6 @@ includedir=${prefix}/include
 
 Name: mupdf
 Description: library for PDF files
-Version: 1.10a
-Libs: -Wl,-R${libdir} -L${libdir} -lmupdf
+Version: 1.11
+Libs: -Wl,-R${libdir} -L${libdir} -lmupdf -lmupdfthird -lmuthreads
 Cflags: -I${includedir}

Index: pkgsrc/print/mupdf/patches/patch-Makethird
diff -u pkgsrc/print/mupdf/patches/patch-Makethird:1.6 pkgsrc/print/mupdf/patches/patch-Makethird:1.7
--- pkgsrc/print/mupdf/patches/patch-Makethird:1.6      Wed Apr 27 12:34:58 2016
+++ pkgsrc/print/mupdf/patches/patch-Makethird  Wed Apr 12 13:03:08 2017
@@ -1,11 +1,11 @@
-$NetBSD: patch-Makethird,v 1.6 2016/04/27 12:34:58 leot Exp $
+$NetBSD: patch-Makethird,v 1.7 2017/04/12 13:03:08 leot Exp $
 
 o mujs building support with libtool
 
---- Makethird.orig     2016-04-06 12:06:53.000000000 +0000
+--- Makethird.orig     2017-03-31 14:23:45.000000000 +0000
 +++ Makethird
-@@ -24,13 +24,13 @@ ifneq "$(wildcard $(MUJS_DIR)/README)" "
- MUJS_OUT := $(OUT)/mujs
+@@ -26,13 +26,13 @@ ifneq "$(wildcard $(MUJS_DIR)/README)" "
+ MUJS_OUT := $(OUT)/thirdparty/mujs
  MUJS_SRC := one.c
  
 -MUJS_OBJ := $(addprefix $(MUJS_OUT)/, $(MUJS_SRC:%.c=%.o))

Index: pkgsrc/print/mupdf/patches/patch-ab
diff -u pkgsrc/print/mupdf/patches/patch-ab:1.13 pkgsrc/print/mupdf/patches/patch-ab:1.14
--- pkgsrc/print/mupdf/patches/patch-ab:1.13    Mon Nov 28 14:40:42 2016
+++ pkgsrc/print/mupdf/patches/patch-ab Wed Apr 12 13:03:08 2017
@@ -1,20 +1,20 @@
-$NetBSD: patch-ab,v 1.13 2016/11/28 14:40:42 leot Exp $
+$NetBSD: patch-ab,v 1.14 2017/04/12 13:03:08 leot Exp $
 
 o Handle the various operating systems in the same way avoiding hardcoding
 o Properly recognize glfw support
 
---- Makerules.orig     2016-11-21 10:21:11.000000000 +0000
+--- Makerules.orig     2017-04-05 11:02:21.000000000 +0000
 +++ Makerules
-@@ -60,51 +60,6 @@ ifeq "$(largefile)" "yes"
+@@ -64,54 +64,6 @@ ifeq "$(largefile)" "yes"
  CFLAGS += -DFZ_LARGEFILE
  endif
  
 -# Windows (MINGW) build doesn't use system libraries.
 -ifeq "$(OS)" "MINGW"
 -
--WINDRES = windres
+-WINDRES := windres
 -HAVE_X11 ?= no
--HAVE_WIN32 = yes
+-HAVE_WIN32 := yes
 -CC=gcc
 -# Add flags required for Harfbuzz because of missing strdup
 -CFLAGS+= -U__STRICT_ANSI__
@@ -23,61 +23,61 @@ o Properly recognize glfw support
 -else ifeq "$(OS)" "MACOS"
 -
 -HAVE_X11 ?= no
--HAVE_PTHREADS ?= yes
+-
+-HAVE_PTHREAD := yes
+-SYS_PTHREAD_CFLAGS :=
+-SYS_PTHREAD_LIBS := -lpthread
 -
 -# Mac OS X deprecated libcrypto, so the default is to not include it.
--HAVE_LIBCRYTO ?= no
--SYS_LIBCRYPTO_CFLAGS =
--SYS_LIBCRYPTO_LIBS =
+-HAVE_LIBCRYTO := no
+-SYS_LIBCRYPTO_CFLAGS :=
+-SYS_LIBCRYPTO_LIBS :=
 -ifeq "$(HAVE_LIBCRYPTO)" "yes"
--SYS_LIBCRYPTO_CFLAGS = -DHAVE_LIBCRYPTO
--SYS_LIBCRYPTO_LIBS = -lcrypto
+-SYS_LIBCRYPTO_CFLAGS := -DHAVE_LIBCRYPTO
+-SYS_LIBCRYPTO_LIBS := -lcrypto
 -endif
 -
--SYS_CURL_DEPS = -lpthread
+-SYS_CURL_DEPS := -lpthread
 -
--SYS_X11_CFLAGS = -I/usr/X11R6/include
--SYS_X11_LIBS = -L/usr/X11R6/lib -lX11 -lXext
+-SYS_X11_CFLAGS := -I/usr/X11R6/include
+-SYS_X11_LIBS := -L/usr/X11R6/lib -lX11 -lXext
 -
--SYS_FREETYPE_CFLAGS = $(shell freetype-config --cflags)
--SYS_FREETYPE_LIBS = $(shell freetype-config --libs)
--SYS_OPENJPEG_LIBS = -lopenjpeg
--SYS_JBIG2DEC_LIBS = -ljbig2dec
--SYS_JPEG_LIBS = -ljpeg
--SYS_ZLIB_LIBS = -lz
--
--CC = xcrun cc
--AR = xcrun ar
--LD = xcrun ld
--RANLIB_CMD = xcrun ranlib $@
+-SYS_FREETYPE_CFLAGS := $(shell freetype-config --cflags)
+-SYS_FREETYPE_LIBS := $(shell freetype-config --libs)
+-SYS_OPENJPEG_LIBS := -lopenjpeg
+-SYS_JBIG2DEC_LIBS := -ljbig2dec
+-SYS_LIBJPEG_LIBS := -ljpeg
+-SYS_ZLIB_LIBS := -lz
+-
+-CC := xcrun cc
+-AR := xcrun ar
+-LD := xcrun ld
+-RANLIB_CMD := xcrun ranlib $@
 -
 -# Linux uses pkg-config for system libraries.
 -else ifeq "$(OS)" "Linux"
 -
- HAVE_PTHREADS ?= yes
- 
- ifeq "$(shell pkg-config --exists libcrypto && echo yes)" "yes"
-@@ -131,6 +86,17 @@ SYS_X11_CFLAGS = $(shell pkg-config --cf
- SYS_X11_LIBS = $(shell pkg-config --libs x11 xext)
+ HAVE_PTHREAD := yes
+ SYS_PTHREAD_CFLAGS :=
+ SYS_PTHREAD_LIBS := -lpthread
+@@ -140,6 +92,14 @@ SYS_X11_CFLAGS := $(shell pkg-config --c
+ SYS_X11_LIBS := $(shell pkg-config --libs x11 xext)
  endif
  
-+ifeq "$(shell pkg-config --exists glut && echo yes)" "yes"
-+SYS_GLUT_CFLAGS = $(shell pkg-config --cflags glut)
-+SYS_GLUT_LIBS = $(shell pkg-config --libs glut)
-+endif
-+
-+ifeq "$(shell pkg-config --exists glfw3 && echo yes)" "yes"
-+HAVE_GLFW = yes
-+SYS_GLFW_CFLAGS = $(shell pkg-config --cflags glfw3)
-+SYS_GLFW_LIBS = $(shell pkg-config --libs glfw3)
++ifeq "$(shell pkg-config --exists glfw3 && pkg-config --exists gl && echo yes)" "yes"
++HAVE_GLFW := yes
++SYS_GLFW_CFLAGS := $(shell pkg-config --cflags glfw3)
++SYS_GLFW_CFLAGS += $(shell pkg-config --cflags gl)
++SYS_GLFW_LIBS := $(shell pkg-config --libs glfw3)
++SYS_GLFW_LIBS += $(shell pkg-config --libs gl)
 +endif
 +
  ifeq "$(shell pkg-config --exists harfbuzz && echo yes)" "yes"
- SYS_HARFBUZZ_CFLAGS = $(shell pkg-config --cflags harfbuzz)
- SYS_HARFBUZZ_LIBS = $(shell pkg-config --libs harfbuzz)
-@@ -150,8 +116,6 @@ SYS_JBIG2DEC_LIBS = -ljbig2dec
- SYS_JPEG_LIBS = -ljpeg
- SYS_ZLIB_LIBS = -lz
+ SYS_HARFBUZZ_CFLAGS := $(shell pkg-config --cflags harfbuzz)
+ SYS_HARFBUZZ_LIBS := $(shell pkg-config --libs harfbuzz)
+@@ -159,8 +119,6 @@ SYS_JBIG2DEC_LIBS := -ljbig2dec
+ SYS_LIBJPEG_LIBS := -ljpeg
+ SYS_ZLIB_LIBS := -lz
  
 -endif
 -

Index: pkgsrc/print/mupdf/patches/patch-ac
diff -u pkgsrc/print/mupdf/patches/patch-ac:1.15 pkgsrc/print/mupdf/patches/patch-ac:1.16
--- pkgsrc/print/mupdf/patches/patch-ac:1.15    Mon Nov 28 14:40:42 2016
+++ pkgsrc/print/mupdf/patches/patch-ac Wed Apr 12 13:03:08 2017
@@ -1,15 +1,17 @@
-$NetBSD: patch-ac,v 1.15 2016/11/28 14:40:42 leot Exp $
+$NetBSD: patch-ac,v 1.16 2017/04/12 13:03:08 leot Exp $
 
 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 Install MUTOOL_LIB as part of INSTALL_LIBS
+o Get rid of unused VERSION variable and `version:' target (otherwise `git' can
+  be invoked during the building phase)
 o Install only one "mupdf" binary, prefer the featureful one and always
   install it as "mupdf"
 
---- Makefile.orig      2016-11-21 10:21:11.000000000 +0000
+--- Makefile.orig      2017-03-31 14:23:45.000000000 +0000
 +++ Makefile
-@@ -42,26 +42,12 @@ CFLAGS += $(ZLIB_CFLAGS)
+@@ -57,65 +57,51 @@ ALL_DIR += $(OUT)/platform/gl
  
  # --- Commands ---
  
@@ -40,51 +42,9 @@ o Install only one "mupdf" binary, prefe
 +MKDIR_CMD = mkdir -p $@
 +RM_CMD = rm -f $@
  
- # --- 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
+ # --- Rules ---
  
- 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) :
+ $(ALL_DIR) $(OUT) generated :
        $(MKDIR_CMD)
  
 -$(OUT)/%.a :
@@ -93,33 +53,33 @@ o Install only one "mupdf" binary, prefe
        $(AR_CMD)
        $(RANLIB_CMD)
  
--$(OUT)/%: $(OUT)/%.o
-+$(OUT)/%: $(OUT)/%.lo
+-$(OUT)/%.exe: $(OUT)/%.o | $(ALL_DIR)
++$(OUT)/%.exe: $(OUT)/%.lo | $(ALL_DIR)
        $(LINK_CMD)
  
--$(OUT)/%.o : source/%.c | $(ALL_DIR)
-+$(OUT)/%.lo : source/%.c | $(ALL_DIR)
+-$(OUT)/%.o : %.c | $(ALL_DIR)
++$(OUT)/%.lo : %.c | $(ALL_DIR)
        $(CC_CMD)
  
--$(OUT)/%.o : source/%.cpp | $(ALL_DIR)
-+$(OUT)/%.lo : source/%.cpp | $(ALL_DIR)
+-$(OUT)/%.o : %.cpp | $(ALL_DIR)
++$(OUT)/%.lo : %.cpp | $(ALL_DIR)
        $(CXX_CMD)
  
--$(OUT)/%.o : scripts/%.c | $(OUT)
-+$(OUT)/%.lo : scripts/%.c | $(OUT)
-       $(CC_CMD)
+-$(OUT)/source/helpers/%.o : source/helpers/%.c | $(ALL_DIR)
++$(OUT)/source/helpers/%.lo : source/helpers/%.c | $(ALL_DIR)
+       $(CC_CMD) $(PTHREAD_CFLAGS) -DHAVE_PTHREAD
  
--$(OUT)/fonts/%.o : $(GEN)/%.c | $(ALL_DIR)
+-$(OUT)/generated/%.o : generated/%.c | $(ALL_DIR)
 -      $(CC_CMD) -O0
-+$(OUT)/fonts/%.lo : $(GEN)/%.c | $(ALL_DIR)
++$(OUT)/generated/%.lo : generated/%.c | $(ALL_DIR)
 +      $(CC_CMD)
  
 -$(OUT)/platform/x11/%.o : platform/x11/%.c | $(ALL_DIR)
 +$(OUT)/platform/x11/%.lo : platform/x11/%.c | $(ALL_DIR)
        $(CC_CMD) $(X11_CFLAGS)
  
--$(OUT)/platform/x11/%.o: platform/x11/%.rc | $(OUT)
-+$(OUT)/platform/x11/%.lo: platform/x11/%.rc | $(OUT)
+-$(OUT)/platform/x11/%.o: platform/x11/%.rc | $(ALL_DIR)
++$(OUT)/platform/x11/%.lo: platform/x11/%.rc | $(ALL_DIR)
        $(WINDRES_CMD)
  
 -$(OUT)/platform/x11/curl/%.o : platform/x11/%.c | $(ALL_DIR)
@@ -133,118 +93,211 @@ o Install only one "mupdf" binary, prefe
 -.PRECIOUS : $(OUT)/%.o # Keep intermediates from chained rules
 +.PRECIOUS : $(OUT)/%.lo # Keep intermediates from chained rules
  
- # --- Generated CMap and JavaScript files ---
+ # --- File lists ---
  
-@@ -251,51 +237,53 @@ endif
+@@ -141,14 +127,14 @@ SVG_SRC_HDR := $(wildcard source/svg/*.h
+ HTML_SRC_HDR := $(wildcard source/html/*.h)
+ GPRF_SRC_HDR := $(wildcard source/gprf/*.h)
  
- generate: $(CMAP_GEN) $(FONT_GEN) $(JAVASCRIPT_GEN) $(ADOBECA_GEN) $(NAME_GEN)
+-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)
+-THREAD_OBJ := $(THREAD_SRC:%.c=$(OUT)/%.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)
  
--$(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
+ $(FITZ_OBJ) : $(FITZ_HDR) $(FITZ_SRC_HDR)
+ $(PDF_OBJ) : $(FITZ_HDR) $(PDF_HDR) $(PDF_SRC_HDR)
+@@ -172,7 +158,7 @@ ifneq "$(CROSSCOMPILE)" "yes"
+ $(NAME_GEN) : $(NAMEDUMP_EXE)
+ endif
  
- # --- Tools and Apps ---
+-$(OUT)/source/pdf/pdf-object.o : source/pdf/pdf-name-table.h
++$(OUT)/source/pdf/pdf-object.lo : source/pdf/pdf-name-table.h
  
- 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)
+ generate: $(NAME_GEN)
  
-+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)
+@@ -194,7 +180,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)
  
- 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)
+ generated/%.c : resources/fonts/droid/%.ttf $(HEXDUMP_EXE) | generated
+       $(QUIET_GEN) $(HEXDUMP_EXE) $@ $<
+@@ -244,7 +230,7 @@ ifneq "$(CROSSCOMPILE)" "yes"
+ $(CMAP_GEN) : $(CMAPDUMP_EXE)
+ endif
+ 
+-$(OUT)/scripts/cmapdump.o : \
++$(OUT)/scripts/cmapdump.lo : \
+       $(NAME_GEN) \
+       include/mupdf/pdf/cmap.h \
+       source/fitz/context.c \
+@@ -264,7 +250,7 @@ $(OUT)/scripts/cmapdump.o : \
+       source/pdf/pdf-cmap.c \
+       source/pdf/pdf-cmap-parse.c \
+ 
+-$(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)
+ 
+ # --- Library ---
+ 
+-MUPDF_LIB = $(OUT)/libmupdf.a
+-THIRD_LIB = $(OUT)/libmupdfthird.a
+-THREAD_LIB = $(OUT)/libmuthreads.a
++MUPDF_LIB = $(OUT)/libmupdf.la
++THIRD_LIB = $(OUT)/libmupdfthird.la
++THREAD_LIB = $(OUT)/libmuthreads.la
+ 
+ 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)
+ $(THIRD_LIB) : $(THIRD_OBJ)
+ $(THREAD_LIB) : $(THREAD_OBJ)
+ 
+-INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB)
++INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB)
+ 
+ # --- Tools and Apps ---
+ 
+ MUTOOL_EXE := $(OUT)/mutool
+ 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)
+-MUTOOL_OBJ := $(MUTOOL_SRC:%.c=$(OUT)/%.o)
++MUTOOL_OBJ := $(MUTOOL_SRC:%.c=$(OUT)/%.lo)
+ $(MUTOOL_OBJ) : $(FITZ_HDR) $(PDF_HDR)
+ $(MUTOOL_EXE) : $(MUTOOL_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB)
+       $(LINK_CMD) $(PTHREAD_LIBS)
+ 
+ MURASTER_EXE := $(OUT)/muraster
+-MURASTER_OBJ := $(OUT)/source/tools/muraster.o
++MURASTER_OBJ := $(OUT)/source/tools/muraster.lo
+ $(MURASTER_OBJ) : $(FITZ_HDR)
+ $(MURASTER_EXE) : $(MURASTER_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB)
+       $(LINK_CMD) $(PTHREAD_LIBS)
+ 
+ MJSGEN_EXE := $(OUT)/mjsgen
+-MJSGEN_OBJ := $(OUT)/source/tools/mjsgen.o
++MJSGEN_OBJ := $(OUT)/source/tools/mjsgen.lo
+ $(MJSGEN_OBJ) : $(FITZ_HDR) $(PDF_HDR)
+ $(MJSGEN_EXE) : $(MJSGEN_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
        $(LINK_CMD)
  
- MUJSTEST := $(OUT)/mujstest
+ MUJSTEST_EXE := $(OUT)/mujstest
 -MUJSTEST_OBJ := $(addprefix $(OUT)/platform/x11/, jstest_main.o pdfapp.o)
 +MUJSTEST_OBJ := $(addprefix $(OUT)/platform/x11/, jstest_main.lo pdfapp.lo)
  $(MUJSTEST_OBJ) : $(FITZ_HDR) $(PDF_HDR)
- $(MUJSTEST) : $(MUJSTEST_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
+ $(MUJSTEST_EXE) : $(MUJSTEST_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
        $(LINK_CMD)
  
  ifeq "$(HAVE_X11)" "yes"
--MUVIEW_X11 := $(OUT)/mupdf-x11
+-MUVIEW_X11_EXE := $(OUT)/mupdf-x11
 -MUVIEW_X11_OBJ := $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o)
-+MUVIEW_X11 := $(OUT)/platform/x11/mupdf
++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) : $(MUVIEW_X11_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
+ $(MUVIEW_X11_EXE) : $(MUVIEW_X11_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
        $(LINK_CMD) $(X11_LIBS)
  
  ifeq "$(HAVE_CURL)" "yes"
--MUVIEW_X11_CURL := $(OUT)/mupdf-x11-curl
+-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 := $(OUT)/platform/x11/curl/mupdf
++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) : $(MUVIEW_X11_CURL_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(CURL_LIB)
+ $(MUVIEW_X11_CURL_EXE) : $(MUVIEW_X11_CURL_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(CURL_LIB)
        $(LINK_CMD) $(X11_LIBS) $(CURL_LIBS) $(SYS_CURL_DEPS)
-@@ -303,8 +291,8 @@ endif
+@@ -359,8 +345,8 @@ endif
  endif
  
  ifeq "$(HAVE_GLFW)" "yes"
--MUVIEW_GLFW := $(OUT)/mupdf-gl
+-MUVIEW_GLFW_EXE := $(OUT)/mupdf-gl
 -MUVIEW_GLFW_OBJ := $(addprefix $(OUT)/platform/gl/, gl-font.o gl-input.o gl-main.o)
-+MUVIEW_GLFW := $(OUT)/platform/gl/mupdf-gl
++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) : $(MUVIEW_GLFW_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(GLFW_LIB)
+ $(MUVIEW_GLFW_EXE) : $(MUVIEW_GLFW_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(GLFW_LIB)
        $(LINK_CMD) $(GLFW_LIBS)
-@@ -312,16 +300,25 @@ endif
+@@ -368,7 +354,7 @@ endif
  
  ifeq "$(HAVE_WIN32)" "yes"
- MUVIEW_WIN32 := $(OUT)/mupdf
+ 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) : $(MUVIEW_WIN32_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
+ $(MUVIEW_WIN32_EXE) : $(MUVIEW_WIN32_OBJ) $(MUPDF_LIB) $(THIRD_LIB)
        $(LINK_CMD) $(WIN32_LIBS)
- endif
+@@ -377,11 +363,20 @@ endif
+ MUVIEW_EXE := $(MUVIEW_X11_EXE) $(MUVIEW_WIN32_EXE) $(MUVIEW_GLFW_EXE)
+ MUVIEW_CURL_EXE := $(MUVIEW_X11_CURL_EXE) $(MUVIEW_WIN32_CURL_EXE)
+ 
+-INSTALL_APPS := $(MUTOOL_EXE) $(MUVIEW_EXE)
++INSTALL_APPS := $(MUTOOL_EXE)
+ INSTALL_APPS += $(MURASTER_EXE)
+-INSTALL_APPS += $(MUVIEW_CURL_EXE)
+ INSTALL_APPS += $(MUJSTEST_EXE)
  
--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)
 +ifeq "$(HAVE_CURL)" "yes"
-+INSTALL_APPS += $(MUVIEW_CURL)
++INSTALL_APPS += $(MUVIEW_CURL_EXE)
 +else ifeq "$(HAVE_X11)" "yes"
-+INSTALL_APPS += $(MUVIEW)
++INSTALL_APPS += $(MUVIEW_EXE)
 +endif
 +
 +ifeq "$(HAVE_GLFW)" "yes"
-+INSTALL_APPS += $(MUVIEW_GLFW)
++INSTALL_APPS += $(MUVIEW_GLFW_EXE)
 +endif
- 
++
  # --- Examples ---
  
-@@ -364,24 +361,26 @@ libs: $(INSTALL_LIBS)
+ examples: $(OUT)/example $(OUT)/multi-threaded
+@@ -393,10 +388,10 @@ $(OUT)/multi-threaded: docs/multi-thread
+ 
+ # --- 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 ---
+ 
+@@ -423,24 +418,26 @@ libs: $(INSTALL_LIBS)
  apps: $(INSTALL_APPS)
  
  install: libs apps

Index: pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c
diff -u pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c:1.4 pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c:1.5
--- pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c:1.4 Mon Nov 28 14:40:42 2016
+++ pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c     Wed Apr 12 13:03:08 2017
@@ -1,16 +1,16 @@
-$NetBSD: patch-source_fitz_load-jpx.c,v 1.4 2016/11/28 14:40:42 leot Exp $
+$NetBSD: patch-source_fitz_load-jpx.c,v 1.5 2017/04/12 13:03:08 leot Exp $
 
 Restrict OPJ_STATIC to Windows (avoid linking errors due to hidden symbols)
 
---- source/fitz/load-jpx.c.orig        2016-11-08 19:06:14.000000000 +0000
+--- source/fitz/load-jpx.c.orig        2017-03-31 14:23:45.000000000 +0000
 +++ source/fitz/load-jpx.c
-@@ -484,7 +484,9 @@ fz_load_jpx_info(fz_context *ctx, unsign
- /* Without the definition of OPJ_STATIC, compilation fails on windows
-  * due to the use of __stdcall. We believe it is required on some
-  * linux toolchains too. */
-+#ifdef _WIN32
+@@ -443,7 +443,9 @@ fz_load_jpx_info(fz_context *ctx, unsign
+ 
+ #else /* HAVE_LURATECH */
+ 
++#if defined(_WIN32) || defined(_WIN64)
  #define OPJ_STATIC
 +#endif
- #ifndef _MSC_VER
+ #define OPJ_HAVE_INTTYPES_H
+ #if !defined(_WIN32) && !defined(_WIN64)
  #define OPJ_HAVE_STDINT_H
- #endif

Index: pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_Makefile
diff -u pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_Makefile:1.1 pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_Makefile:1.2
--- pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_Makefile:1.1       Wed Apr 27 12:34:58 2016
+++ pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_Makefile   Wed Apr 12 13:03:08 2017
@@ -1,10 +1,18 @@
-$NetBSD: patch-thirdparty_mujs_Makefile,v 1.1 2016/04/27 12:34:58 leot Exp $
+$NetBSD: patch-thirdparty_mujs_Makefile,v 1.2 2017/04/12 13:03:08 leot Exp $
 
 o Add libtool support lo mujs.
 o Avoid to set (unused) VERSION variable.
 
---- thirdparty/mujs/Makefile.orig      2016-03-01 20:52:00.000000000 +0000
+--- thirdparty/mujs/Makefile.orig      2017-03-29 13:56:39.000000000 +0000
 +++ thirdparty/mujs/Makefile
+@@ -1,6 +1,6 @@
+ SRCS := $(wildcard js*.c utf*.c regexp.c)
+ HDRS := $(wildcard js*.h mujs.h utf.h regexp.h)
+-OBJS := $(SRCS:%.c=build/%.o)
++OBJS := $(SRCS:%.c=build/%.lo)
+ 
+ prefix ?= /usr/local
+ bindir ?= $(prefix)/bin
 @@ -41,16 +41,16 @@ jsdump.c: astnames.h opnames.h
  build:
        mkdir -p build
@@ -22,12 +30,16 @@ o Avoid to set (unused) VERSION variable
        $(CC) $(LDFLAGS) -o $@ $^ -lm
  
 -build/mujsone: build/main.o build/one.o
-+build/mujsone: build/main.o build/one.lo
++build/mujsone: build/main.lo build/one.lo
        $(CC) $(LDFLAGS) -o $@ $^ -lm
  
  install: release
-@@ -61,12 +61,12 @@ install: release
-       install build/libmujs.a $(DESTDIR)$(libdir)
+@@ -58,15 +58,15 @@ install: release
+       install -d $(DESTDIR)$(libdir)
+       install -d $(DESTDIR)$(bindir)
+       install mujs.h $(DESTDIR)$(incdir)
+-      install build/libmujs.a $(DESTDIR)$(libdir)
++      install build/libmujs.la $(DESTDIR)$(libdir)
        install build/mujs $(DESTDIR)$(bindir)
  
 -VERSION = $(shell git describe --tags --always)



Home | Main Index | Thread Index | Old Index