Thu Feb 4 11:50:24 2016 UTC ()
Add glfw option to mupdf (disabled by default).

Bump PKGREVISION++.


(leot)
diff -r1.33 -r1.34 pkgsrc/print/mupdf/Makefile
diff -r1.10 -r1.11 pkgsrc/print/mupdf/PLIST
diff -r1.8 -r1.9 pkgsrc/print/mupdf/buildlink3.mk
diff -r1.22 -r1.23 pkgsrc/print/mupdf/distinfo
diff -r1.3 -r1.4 pkgsrc/print/mupdf/options.mk
diff -r1.4 -r1.5 pkgsrc/print/mupdf/patches/patch-Makethird
diff -r1.4 -r1.5 pkgsrc/print/mupdf/patches/patch-ae
diff -r1.10 -r1.11 pkgsrc/print/mupdf/patches/patch-ab
diff -r1.12 -r1.13 pkgsrc/print/mupdf/patches/patch-ac
diff -r1.1 -r1.2 pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c

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

--- pkgsrc/print/mupdf/Makefile 2015/11/12 21:11:31 1.33
+++ pkgsrc/print/mupdf/Makefile 2016/02/04 11:50:24 1.34
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1# $NetBSD: Makefile,v 1.33 2015/11/12 21:11:31 leot Exp $ 1# $NetBSD: Makefile,v 1.34 2016/02/04 11:50:24 leot Exp $
2 2
3DISTNAME= mupdf-1.8-source 3DISTNAME= mupdf-1.8-source
4PKGNAME= ${DISTNAME:S/-source//} 4PKGNAME= ${DISTNAME:S/-source//}
5PKGREVISION= 1 5PKGREVISION= 2
6CATEGORIES= print 6CATEGORIES= print
7MASTER_SITES= http://mupdf.com/downloads/ 7MASTER_SITES= http://mupdf.com/downloads/
8 8
9MAINTAINER= leot@NetBSD.org 9MAINTAINER= leot@NetBSD.org
10HOMEPAGE= http://mupdf.com/ 10HOMEPAGE= http://mupdf.com/
11COMMENT= Lightweight PDF viewer and toolkit 11COMMENT= Lightweight PDF viewer and toolkit
12LICENSE= gnu-agpl-v3 12LICENSE= gnu-agpl-v3
13 13
14USE_LANGUAGES= c99 14USE_LANGUAGES= c99
15USE_LIBTOOL= yes 15USE_LIBTOOL= yes
16USE_TOOLS+= pkg-config gmake 16USE_TOOLS+= pkg-config gmake
17 17
18INSTALLATION_DIRS+= bin include lib/pkgconfig 18INSTALLATION_DIRS+= bin include lib/pkgconfig

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

--- pkgsrc/print/mupdf/PLIST 2015/11/11 17:08:25 1.10
+++ pkgsrc/print/mupdf/PLIST 2016/02/04 11:50:24 1.11
@@ -1,16 +1,17 @@ @@ -1,16 +1,17 @@
1@comment $NetBSD: PLIST,v 1.10 2015/11/11 17:08:25 leot Exp $ 1@comment $NetBSD: PLIST,v 1.11 2016/02/04 11:50:24 leot Exp $
2bin/mujstest 2bin/mujstest
3bin/mupdf 3bin/mupdf
 4${PLIST.glfw}bin/mupdf-gl
4bin/mutool 5bin/mutool
5include/mupdf/fitz.h 6include/mupdf/fitz.h
6include/mupdf/fitz/annotation.h 7include/mupdf/fitz/annotation.h
7include/mupdf/fitz/bitmap.h 8include/mupdf/fitz/bitmap.h
8include/mupdf/fitz/buffer.h 9include/mupdf/fitz/buffer.h
9include/mupdf/fitz/colorspace.h 10include/mupdf/fitz/colorspace.h
10include/mupdf/fitz/compressed-buffer.h 11include/mupdf/fitz/compressed-buffer.h
11include/mupdf/fitz/context.h 12include/mupdf/fitz/context.h
12include/mupdf/fitz/crypt.h 13include/mupdf/fitz/crypt.h
13include/mupdf/fitz/device.h 14include/mupdf/fitz/device.h
14include/mupdf/fitz/display-list.h 15include/mupdf/fitz/display-list.h
15include/mupdf/fitz/document.h 16include/mupdf/fitz/document.h
16include/mupdf/fitz/filter.h 17include/mupdf/fitz/filter.h

cvs diff -r1.8 -r1.9 pkgsrc/print/mupdf/buildlink3.mk (expand / switch to unified diff)

--- pkgsrc/print/mupdf/buildlink3.mk 2015/11/11 17:08:25 1.8
+++ pkgsrc/print/mupdf/buildlink3.mk 2016/02/04 11:50:24 1.9
@@ -1,24 +1,29 @@ @@ -1,24 +1,29 @@
1# $NetBSD: buildlink3.mk,v 1.8 2015/11/11 17:08:25 leot Exp $ 1# $NetBSD: buildlink3.mk,v 1.9 2016/02/04 11:50:24 leot Exp $
2 2
3BUILDLINK_TREE+= mupdf 3BUILDLINK_TREE+= mupdf
4 4
5.if !defined(MUPDF_BUILDLINK3_MK) 5.if !defined(MUPDF_BUILDLINK3_MK)
6MUPDF_BUILDLINK3_MK:= 6MUPDF_BUILDLINK3_MK:=
7 7
8BUILDLINK_API_DEPENDS.mupdf+= mupdf>=1.8 8BUILDLINK_API_DEPENDS.mupdf+= mupdf>=1.8
9BUILDLINK_PKGSRCDIR.mupdf?= ../../print/mupdf 9BUILDLINK_PKGSRCDIR.mupdf?= ../../print/mupdf
10 10
11pkgbase := mupdf 11pkgbase := mupdf
12.include "../../mk/pkg-build-options.mk" 12.include "../../mk/pkg-build-options.mk"
13 13
14.if !empty(PKG_BUILD_OPTIONS.mupdf:Mcurl) 14.if !empty(PKG_BUILD_OPTIONS.mupdf:Mcurl)
15.include "../../www/curl/buildlink3.mk" 15.include "../../www/curl/buildlink3.mk"
16.include "../../mk/pthread.buildlink3.mk" 16.include "../../mk/pthread.buildlink3.mk"
17.endif 17.endif
18 18
 19.if !empty(PKG_BUILD_OPTIONS.mupdf:Mglfw)
 20.include "../../graphics/glut/buildlink3.mk"
 21.include "../../graphics/glfw/buildlink3.mk"
 22.endif
 23
19.include "../../graphics/jbig2dec/buildlink3.mk" 24.include "../../graphics/jbig2dec/buildlink3.mk"
20.include "../../graphics/openjpeg/buildlink3.mk" 25.include "../../graphics/openjpeg/buildlink3.mk"
21.include "../../mk/jpeg.buildlink3.mk" 26.include "../../mk/jpeg.buildlink3.mk"
22.endif # MUPDF_BUILDLINK3_MK 27.endif # MUPDF_BUILDLINK3_MK
23 28
24BUILDLINK_TREE+= -mupdf 29BUILDLINK_TREE+= -mupdf

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

--- pkgsrc/print/mupdf/distinfo 2015/11/12 21:11:31 1.22
+++ pkgsrc/print/mupdf/distinfo 2016/02/04 11:50:24 1.23
@@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
1$NetBSD: distinfo,v 1.22 2015/11/12 21:11:31 leot Exp $ 1$NetBSD: distinfo,v 1.23 2016/02/04 11:50:24 leot Exp $
2 2
3SHA1 (mupdf-1.8-source.tar.gz) = 9fbc9e06f0b74fe904745c363324eaca3517bfce 3SHA1 (mupdf-1.8-source.tar.gz) = 9fbc9e06f0b74fe904745c363324eaca3517bfce
4RMD160 (mupdf-1.8-source.tar.gz) = 2708f5650f23101a66cef92b7903aafb716f9c02 4RMD160 (mupdf-1.8-source.tar.gz) = 2708f5650f23101a66cef92b7903aafb716f9c02
5SHA512 (mupdf-1.8-source.tar.gz) = 938fbed4afc0dd0aa621911cd70b9289c6a4f13d026f9390b11fc86d5b37845a76943c9fa42f218f67fe298295f15d6664a18be7bf73b5d952724122510f9deb 5SHA512 (mupdf-1.8-source.tar.gz) = 938fbed4afc0dd0aa621911cd70b9289c6a4f13d026f9390b11fc86d5b37845a76943c9fa42f218f67fe298295f15d6664a18be7bf73b5d952724122510f9deb
6Size (mupdf-1.8-source.tar.gz) = 14169777 bytes 6Size (mupdf-1.8-source.tar.gz) = 14169777 bytes
7SHA1 (patch-Makethird) = 5ec66437c5695558f5e6497182d1f0c197ee5299 7SHA1 (patch-Makethird) = a44207c6c33fabec7e35c5f94bf30ab4172a93bc
8SHA1 (patch-ab) = 8f8f167d9207734891c68e358c802107f5600da2 8SHA1 (patch-ab) = a8ea41737aee65ad36ff52089d772844fb96d464
9SHA1 (patch-ac) = 51cfd962d498c70308053507b159df2634b2fbd6 9SHA1 (patch-ac) = 75447e4a2ab2ba9f9691a860499897e15d2498fa
10SHA1 (patch-ae) = bad4b6b8c669c752c6318bb564d1176daac30d19 10SHA1 (patch-ae) = c6b113818b32cb4470e8549c00a16e0b2f364ede
11SHA1 (patch-source_fitz_load-jpx.c) = e5271cf60aff104e05ff60333be54712475d5a33 11SHA1 (patch-source_fitz_load-jpx.c) = 661b6a7f1d4da4f0cf5de3762db2f77d91239a6b

cvs diff -r1.3 -r1.4 pkgsrc/print/mupdf/options.mk (expand / switch to unified diff)

--- pkgsrc/print/mupdf/options.mk 2014/06/15 19:15:51 1.3
+++ pkgsrc/print/mupdf/options.mk 2016/02/04 11:50:24 1.4
@@ -1,14 +1,25 @@ @@ -1,14 +1,25 @@
1# $NetBSD: options.mk,v 1.3 2014/06/15 19:15:51 wiz Exp $ 1# $NetBSD: options.mk,v 1.4 2016/02/04 11:50:24 leot Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.mupdf 3PKG_OPTIONS_VAR= PKG_OPTIONS.mupdf
4PKG_SUPPORTED_OPTIONS= curl 4PKG_SUPPORTED_OPTIONS= curl glfw
5 5
6.include "../../mk/bsd.options.mk" 6.include "../../mk/bsd.options.mk"
7 7
 8PLIST_VARS+= glfw
 9
8# 10#
9# curl support 11# curl support
10# 12#
11.if !empty(PKG_OPTIONS:Mcurl) 13.if !empty(PKG_OPTIONS:Mcurl)
12.include "../../www/curl/buildlink3.mk" 14.include "../../www/curl/buildlink3.mk"
13.include "../../mk/pthread.buildlink3.mk" 15.include "../../mk/pthread.buildlink3.mk"
14.endif 16.endif
 17
 18#
 19# glfw support
 20#
 21.if !empty(PKG_OPTIONS:Mglfw)
 22PLIST.glfw= yes
 23.include "../../graphics/glut/buildlink3.mk"
 24.include "../../graphics/glfw/buildlink3.mk"
 25.endif

cvs diff -r1.4 -r1.5 pkgsrc/print/mupdf/patches/patch-Makethird (expand / switch to unified diff)

--- pkgsrc/print/mupdf/patches/patch-Makethird 2014/06/15 19:15:51 1.4
+++ pkgsrc/print/mupdf/patches/patch-Makethird 2016/02/04 11:50:24 1.5
@@ -1,20 +1,20 @@ @@ -1,20 +1,20 @@
1$NetBSD: patch-Makethird,v 1.4 2014/06/15 19:15:51 wiz Exp $ 1$NetBSD: patch-Makethird,v 1.5 2016/02/04 11:50:24 leot Exp $
2 2
3o mujs building support with libtool 3o mujs building support with libtool
4 4
5--- Makethird.orig 2014-06-10 15:09:28.000000000 +0000 5--- Makethird.orig 2015-11-10 16:19:51.000000000 +0000
6+++ Makethird 6+++ Makethird
7@@ -50,14 +50,14 @@ endif 7@@ -51,14 +51,14 @@ endif
8  8
9 ifneq "$(wildcard $(MUJS_DIR)/README)" "" 9 ifneq "$(wildcard $(MUJS_DIR)/README)" ""
10  10
11-MUJS_LIB := $(OUT)/libmujs.a 11-MUJS_LIB := $(OUT)/libmujs.a
12+MUJS_LIB := $(OUT)/libmujs.la 12+MUJS_LIB := $(OUT)/libmujs.la
13 MUJS_OUT := $(OUT)/mujs 13 MUJS_OUT := $(OUT)/mujs
14 MUJS_SRC := one.c 14 MUJS_SRC := one.c
15  15
16-$(MUJS_LIB): $(addprefix $(MUJS_OUT)/, $(MUJS_SRC:%.c=%.o)) 16-$(MUJS_LIB): $(addprefix $(MUJS_OUT)/, $(MUJS_SRC:%.c=%.o))
17+$(MUJS_LIB): $(addprefix $(MUJS_OUT)/, $(MUJS_SRC:%.c=%.lo)) 17+$(MUJS_LIB): $(addprefix $(MUJS_OUT)/, $(MUJS_SRC:%.c=%.lo))
18 $(MUJS_OUT): 18 $(MUJS_OUT):
19 $(MKDIR_CMD) 19 $(MKDIR_CMD)
20-$(MUJS_OUT)/%.o: $(MUJS_DIR)/%.c | $(MUJS_OUT) 20-$(MUJS_OUT)/%.o: $(MUJS_DIR)/%.c | $(MUJS_OUT)

cvs diff -r1.4 -r1.5 pkgsrc/print/mupdf/patches/patch-ae (expand / switch to unified diff)

--- pkgsrc/print/mupdf/patches/patch-ae 2014/04/21 16:14:40 1.4
+++ pkgsrc/print/mupdf/patches/patch-ae 2016/02/04 11:50:24 1.5
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1$NetBSD: patch-ae,v 1.4 2014/04/21 16:14:40 wiz Exp $ 1$NetBSD: patch-ae,v 1.5 2016/02/04 11:50:24 leot Exp $
2 2
3Avoid namespace conflicts with bswap(3). 3Avoid namespace conflicts with bswap(3).
4 4
5--- source/fitz/crypt-sha2.c.orig 2014-04-11 15:10:41.000000000 +0000 5--- source/fitz/crypt-sha2.c.orig 2015-11-10 16:19:51.000000000 +0000
6+++ source/fitz/crypt-sha2.c 6+++ source/fitz/crypt-sha2.c
7@@ -17,7 +17,7 @@ static inline int isbigendian(void) 7@@ -17,7 +17,7 @@ static inline int isbigendian(void)
8 return *(char*)&one == 0; 8 return *(char*)&one == 0;
9 } 9 }
10  10
11-static inline unsigned int bswap32(unsigned int num) 11-static inline unsigned int bswap32(unsigned int num)
12+static inline unsigned int mup_bswap32(unsigned int num) 12+static inline unsigned int mup_bswap32(unsigned int num)
13 { 13 {
14 return ( (((num) << 24)) 14 return ( (((num) << 24))
15 | (((num) << 8) & 0x00FF0000) 15 | (((num) << 8) & 0x00FF0000)
16@@ -25,7 +25,7 @@ static inline unsigned int bswap32(unsig 16@@ -25,7 +25,7 @@ static inline unsigned int bswap32(unsig
17 | (((num) >> 24)) ); 17 | (((num) >> 24)) );
18 } 18 }

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

--- pkgsrc/print/mupdf/patches/patch-ab 2015/11/11 17:08:25 1.10
+++ pkgsrc/print/mupdf/patches/patch-ab 2016/02/04 11:50:24 1.11
@@ -1,19 +1,19 @@ @@ -1,19 +1,19 @@
1$NetBSD: patch-ab,v 1.10 2015/11/11 17:08:25 leot Exp $ 1$NetBSD: patch-ab,v 1.11 2016/02/04 11:50:24 leot Exp $
2 2
3o Handle the various operating systems in the same way avoiding hardcoding 3o Handle the various operating systems in the same way avoiding hardcoding
4o Build and link with openjpeg-2.1 4o Build and link with openjpeg-2.1
5 5
6--- Makerules.orig 2015-10-21 14:45:11.000000000 +0000 6--- Makerules.orig 2015-11-10 16:19:51.000000000 +0000
7+++ Makerules 7+++ Makerules
8@@ -29,46 +29,6 @@ ifeq "$(largefile)" "yes" 8@@ -29,46 +29,6 @@ ifeq "$(largefile)" "yes"
9 CFLAGS += -DFZ_LARGEFILE 9 CFLAGS += -DFZ_LARGEFILE
10 endif 10 endif
11  11
12-# Windows (MINGW) build doesn't use system libraries. 12-# Windows (MINGW) build doesn't use system libraries.
13-ifeq "$(OS)" "MINGW" 13-ifeq "$(OS)" "MINGW"
14- 14-
15-HAVE_X11 ?= no 15-HAVE_X11 ?= no
16-HAVE_GLUT ?= yes 16-HAVE_GLUT ?= yes
17- 17-
18-SYS_GLUT_CFLAGS = -DFREEGLUT_STATIC -Ithirdparty/freeglut/include 18-SYS_GLUT_CFLAGS = -DFREEGLUT_STATIC -Ithirdparty/freeglut/include
19-SYS_GLUT_LIBS = -Lthirdparty/freeglut/lib -lfreeglut_static -lopengl32 -lgdi32 -lwinmm 19-SYS_GLUT_LIBS = -Lthirdparty/freeglut/lib -lfreeglut_static -lopengl32 -lgdi32 -lwinmm
@@ -42,22 +42,41 @@ o Build and link with openjpeg-2.1 @@ -42,22 +42,41 @@ o Build and link with openjpeg-2.1
42-SYS_ZLIB_LIBS = -lz 42-SYS_ZLIB_LIBS = -lz
43- 43-
44-CC = xcrun cc 44-CC = xcrun cc
45-AR = xcrun ar 45-AR = xcrun ar
46-LD = xcrun ld 46-LD = xcrun ld
47-RANLIB_CMD = xcrun ranlib $@ 47-RANLIB_CMD = xcrun ranlib $@
48- 48-
49-# Linux uses pkg-config for system libraries. 49-# Linux uses pkg-config for system libraries.
50-else ifeq "$(OS)" "Linux" 50-else ifeq "$(OS)" "Linux"
51- 51-
52 HAVE_X11 ?= yes 52 HAVE_X11 ?= yes
53 HAVE_GLUT ?= yes 53 HAVE_GLUT ?= yes
54  54
55@@ -98,8 +58,6 @@ SYS_JBIG2DEC_LIBS = -ljbig2dec 55@@ -87,8 +47,16 @@ SYS_CURL_DEPS = -lpthread -lrt
 56 SYS_X11_CFLAGS = $(shell pkg-config --cflags x11 xext)
 57 SYS_X11_LIBS = $(shell pkg-config --libs x11 xext)
 58
 59-SYS_GLUT_CFLAGS =
 60-SYS_GLUT_LIBS = -lglut -lGL
 61+ifeq "$(shell pkg-config --exists glut && echo yes)" "yes"
 62+SYS_GLUT_CFLAGS = $(shell pkg-config --cflags glut)
 63+SYS_GLUT_LIBS = $(shell pkg-config --libs glut)
 64+endif
 65+
 66+ifeq "$(shell pkg-config --exists glfw3 && echo yes)" "yes"
 67+HAVE_GLFW = yes
 68+SYS_GLFW_CFLAGS = $(shell pkg-config --cflags glfw3)
 69+SYS_GLFW_LIBS = $(shell pkg-config --libs glfw3)
 70+endif
 71
 72 SYS_FREETYPE_CFLAGS = $(shell pkg-config --cflags freetype2)
 73 SYS_FREETYPE_LIBS = $(shell pkg-config --libs freetype2)
 74@@ -98,8 +66,6 @@ SYS_JBIG2DEC_LIBS = -ljbig2dec
56 SYS_JPEG_LIBS = -ljpeg 75 SYS_JPEG_LIBS = -ljpeg
57 SYS_ZLIB_LIBS = -lz 76 SYS_ZLIB_LIBS = -lz
58  77
59-endif 78-endif
60- 79-
61 # The following section is an example of how to simply do cross-compilation 80 # The following section is an example of how to simply do cross-compilation
62 # using these Makefiles. It builds for a beagleboard running ARM linux, 81 # using these Makefiles. It builds for a beagleboard running ARM linux,
63 # compiling on windows with the CodeSourcery G++ compilers. 82 # compiling on windows with the CodeSourcery G++ compilers.

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

--- pkgsrc/print/mupdf/patches/patch-ac 2015/11/12 21:11:31 1.12
+++ pkgsrc/print/mupdf/patches/patch-ac 2016/02/04 11:50:24 1.13
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: patch-ac,v 1.12 2015/11/12 21:11:31 leot Exp $ 1$NetBSD: patch-ac,v 1.13 2016/02/04 11:50:24 leot Exp $
2 2
3o libtool support  3o libtool support
4o Install target cleanup 4o Install target cleanup
5o Install only one "mupdf" binary, prefer the featureful one and always 5o Install only one "mupdf" binary, prefer the featureful one and always
6 install it as "mupdf" 6 install it as "mupdf"
7o libmujs support: install like a non-thirdparty mupdf's library 7o libmujs support: install like a non-thirdparty mupdf's library
8 8
9--- Makefile.orig 2015-11-10 16:19:51.000000000 +0000 9--- Makefile.orig 2015-11-10 16:19:51.000000000 +0000
10+++ Makefile 10+++ Makefile
11@@ -41,22 +41,12 @@ CFLAGS += $(ZLIB_CFLAGS) 11@@ -41,22 +41,12 @@ CFLAGS += $(ZLIB_CFLAGS)
12  12
13 # --- Commands --- 13 # --- Commands ---
14  14
@@ -161,94 +161,103 @@ o libmujs support: install like a non-th @@ -161,94 +161,103 @@ o libmujs support: install like a non-th
161+$(OUT)/pdf/pdf-pkcs7.lo : $(ADOBECA_GEN) 161+$(OUT)/pdf/pdf-pkcs7.lo : $(ADOBECA_GEN)
162+$(OUT)/pdf/js/pdf-js.lo : $(JAVASCRIPT_GEN) 162+$(OUT)/pdf/js/pdf-js.lo : $(JAVASCRIPT_GEN)
163+$(OUT)/pdf/pdf-object.lo : source/pdf/pdf-name-table.h 163+$(OUT)/pdf/pdf-object.lo : source/pdf/pdf-name-table.h
164+$(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 164+$(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
165  165
166 # --- Tools and Apps --- 166 # --- Tools and Apps ---
167  167
168 MUTOOL := $(addprefix $(OUT)/, mutool) 168 MUTOOL := $(addprefix $(OUT)/, mutool)
169-MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.o mudraw.o pdfclean.o pdfextract.o pdfinfo.o pdfposter.o pdfshow.o pdfpages.o) 169-MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.o mudraw.o pdfclean.o pdfextract.o pdfinfo.o pdfposter.o pdfshow.o pdfpages.o)
170+MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.lo mudraw.lo pdfclean.lo pdfextract.lo pdfinfo.lo pdfposter.lo pdfshow.lo pdfpages.lo) 170+MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.lo mudraw.lo pdfclean.lo pdfextract.lo pdfinfo.lo pdfposter.lo pdfshow.lo pdfpages.lo)
171 $(MUTOOL_OBJ): $(FITZ_HDR) $(PDF_HDR) 171 $(MUTOOL_OBJ): $(FITZ_HDR) $(PDF_HDR)
172 $(MUTOOL) : $(MUPDF_LIB) $(THIRD_LIBS) 172 $(MUTOOL) : $(MUPDF_LIB) $(THIRD_LIBS)
173 $(MUTOOL) : $(MUTOOL_OBJ) 173 $(MUTOOL) : $(MUTOOL_OBJ)
174@@ -251,19 +244,19 @@ $(MUTOOL) : $(MUTOOL_OBJ) 174@@ -251,27 +244,27 @@ $(MUTOOL) : $(MUTOOL_OBJ)
175  175
176 MJSGEN := $(OUT)/mjsgen 176 MJSGEN := $(OUT)/mjsgen
177 $(MJSGEN) : $(MUPDF_LIB) $(THIRD_LIBS) 177 $(MJSGEN) : $(MUPDF_LIB) $(THIRD_LIBS)
178-$(MJSGEN) : $(addprefix $(OUT)/tools/, mjsgen.o) 178-$(MJSGEN) : $(addprefix $(OUT)/tools/, mjsgen.o)
179+$(MJSGEN) : $(addprefix $(OUT)/tools/, mjsgen.lo) 179+$(MJSGEN) : $(addprefix $(OUT)/tools/, mjsgen.lo)
180 $(LINK_CMD) 180 $(LINK_CMD)
181  181
182 MUJSTEST := $(OUT)/mujstest 182 MUJSTEST := $(OUT)/mujstest
183-MUJSTEST_OBJ := $(addprefix $(OUT)/platform/x11/, jstest_main.o pdfapp.o) 183-MUJSTEST_OBJ := $(addprefix $(OUT)/platform/x11/, jstest_main.o pdfapp.o)
184+MUJSTEST_OBJ := $(addprefix $(OUT)/platform/x11/, jstest_main.lo pdfapp.lo) 184+MUJSTEST_OBJ := $(addprefix $(OUT)/platform/x11/, jstest_main.lo pdfapp.lo)
185 $(MUJSTEST_OBJ) : $(FITZ_HDR) $(PDF_HDR) 185 $(MUJSTEST_OBJ) : $(FITZ_HDR) $(PDF_HDR)
186 $(MUJSTEST) : $(MUPDF_LIB) $(THIRD_LIBS) 186 $(MUJSTEST) : $(MUPDF_LIB) $(THIRD_LIBS)
187 $(MUJSTEST) : $(MUJSTEST_OBJ) 187 $(MUJSTEST) : $(MUJSTEST_OBJ)
188 $(LINK_CMD) 188 $(LINK_CMD)
189  189
190 ifeq "$(HAVE_X11)" "yes" 190 ifeq "$(HAVE_X11)" "yes"
191-MUVIEW_X11 := $(OUT)/mupdf-x11 191-MUVIEW_X11 := $(OUT)/mupdf-x11
192-MUVIEW_X11_OBJ := $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o) 192-MUVIEW_X11_OBJ := $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o)
193+MUVIEW_X11 := $(OUT)/platform/x11/mupdf 193+MUVIEW_X11 := $(OUT)/platform/x11/mupdf
194+MUVIEW_X11_OBJ := $(addprefix $(OUT)/platform/x11/, x11_main.lo x11_image.lo pdfapp.lo) 194+MUVIEW_X11_OBJ := $(addprefix $(OUT)/platform/x11/, x11_main.lo x11_image.lo pdfapp.lo)
195 $(MUVIEW_X11_OBJ) : $(FITZ_HDR) $(PDF_HDR) 195 $(MUVIEW_X11_OBJ) : $(FITZ_HDR) $(PDF_HDR)
196 $(MUVIEW_X11) : $(MUPDF_LIB) $(THIRD_LIBS) 196 $(MUVIEW_X11) : $(MUPDF_LIB) $(THIRD_LIBS)
197 $(MUVIEW_X11) : $(MUVIEW_X11_OBJ) 197 $(MUVIEW_X11) : $(MUVIEW_X11_OBJ)
198@@ -271,7 +264,7 @@ $(MUVIEW_X11) : $(MUVIEW_X11_OBJ) 198 $(LINK_CMD) $(X11_LIBS)
199  199
200 ifeq "$(HAVE_GLFW)" "yes" 200 ifeq "$(HAVE_GLFW)" "yes"
201 MUVIEW_GLFW := $(OUT)/mupdf-gl 201-MUVIEW_GLFW := $(OUT)/mupdf-gl
202-MUVIEW_GLFW_OBJ := $(addprefix $(OUT)/platform/gl/, gl-font.o gl-input.o gl-main.o) 202-MUVIEW_GLFW_OBJ := $(addprefix $(OUT)/platform/gl/, gl-font.o gl-input.o gl-main.o)
 203+MUVIEW_GLFW := $(OUT)/platform/gl/mupdf-gl
203+MUVIEW_GLFW_OBJ := $(addprefix $(OUT)/platform/gl/, gl-font.lo gl-input.lo gl-main.lo) 204+MUVIEW_GLFW_OBJ := $(addprefix $(OUT)/platform/gl/, gl-font.lo gl-input.lo gl-main.lo)
204 $(MUVIEW_GLFW_OBJ) : $(FITZ_HDR) $(PDF_HDR) platform/gl/gl-app.h 205 $(MUVIEW_GLFW_OBJ) : $(FITZ_HDR) $(PDF_HDR) platform/gl/gl-app.h
205 $(MUVIEW_GLFW) : $(MUPDF_LIB) $(THIRD_LIBS) $(GLFW_LIB) 206 $(MUVIEW_GLFW) : $(MUPDF_LIB) $(THIRD_LIBS) $(GLFW_LIB)
206 $(MUVIEW_GLFW) : $(MUVIEW_GLFW_OBJ) 207 $(MUVIEW_GLFW) : $(MUVIEW_GLFW_OBJ)
207@@ -279,8 +272,8 @@ $(MUVIEW_GLFW) : $(MUVIEW_GLFW_OBJ) 208@@ -279,8 +272,8 @@ $(MUVIEW_GLFW) : $(MUVIEW_GLFW_OBJ)
208 endif 209 endif
209  210
210 ifeq "$(HAVE_CURL)" "yes" 211 ifeq "$(HAVE_CURL)" "yes"
211-MUVIEW_X11_CURL := $(OUT)/mupdf-x11-curl 212-MUVIEW_X11_CURL := $(OUT)/mupdf-x11-curl
212-MUVIEW_X11_CURL_OBJ := $(addprefix $(OUT)/platform/x11/curl/, x11_main.o x11_image.o pdfapp.o curl_stream.o) 213-MUVIEW_X11_CURL_OBJ := $(addprefix $(OUT)/platform/x11/curl/, x11_main.o x11_image.o pdfapp.o curl_stream.o)
213+MUVIEW_X11_CURL := $(OUT)/platform/x11/curl/mupdf 214+MUVIEW_X11_CURL := $(OUT)/platform/x11/curl/mupdf
214+MUVIEW_X11_CURL_OBJ := $(addprefix $(OUT)/platform/x11/curl/, x11_main.lo x11_image.lo pdfapp.lo curl_stream.lo) 215+MUVIEW_X11_CURL_OBJ := $(addprefix $(OUT)/platform/x11/curl/, x11_main.lo x11_image.lo pdfapp.lo curl_stream.lo)
215 $(MUVIEW_X11_CURL_OBJ) : $(FITZ_HDR) $(PDF_HDR) 216 $(MUVIEW_X11_CURL_OBJ) : $(FITZ_HDR) $(PDF_HDR)
216 $(MUVIEW_X11_CURL) : $(MUPDF_LIB) $(THIRD_LIBS) $(CURL_LIB) 217 $(MUVIEW_X11_CURL) : $(MUPDF_LIB) $(THIRD_LIBS) $(CURL_LIB)
217 $(MUVIEW_X11_CURL) : $(MUVIEW_X11_CURL_OBJ) 218 $(MUVIEW_X11_CURL) : $(MUVIEW_X11_CURL_OBJ)
218@@ -290,7 +283,7 @@ endif 219@@ -290,17 +283,27 @@ endif
219  220
220 ifeq "$(HAVE_WIN32)" "yes" 221 ifeq "$(HAVE_WIN32)" "yes"
221 MUVIEW_WIN32 := $(OUT)/mupdf 222 MUVIEW_WIN32 := $(OUT)/mupdf
222-MUVIEW_WIN32_OBJ := $(addprefix $(OUT)/platform/x11/, win_main.o pdfapp.o win_res.o) 223-MUVIEW_WIN32_OBJ := $(addprefix $(OUT)/platform/x11/, win_main.o pdfapp.o win_res.o)
223+MUVIEW_WIN32_OBJ := $(addprefix $(OUT)/platform/x11/, win_main.lo pdfapp.lo win_res.lo) 224+MUVIEW_WIN32_OBJ := $(addprefix $(OUT)/platform/x11/, win_main.lo pdfapp.lo win_res.lo)
224 $(MUVIEW_WIN32_OBJ) : $(FITZ_HDR) $(PDF_HDR) 225 $(MUVIEW_WIN32_OBJ) : $(FITZ_HDR) $(PDF_HDR)
225 $(MUVIEW_WIN32) : $(MUPDF_LIB) $(THIRD_LIBS) 226 $(MUVIEW_WIN32) : $(MUPDF_LIB) $(THIRD_LIBS)
226 $(MUVIEW_WIN32) : $(MUVIEW_WIN32_OBJ) 227 $(MUVIEW_WIN32) : $(MUVIEW_WIN32_OBJ)
227@@ -300,7 +293,12 @@ endif 228 $(LINK_CMD) $(WIN32_LIBS)
228 MUVIEW := $(MUVIEW_X11) $(MUVIEW_WIN32) $(MUVIEW_GLFW) 229 endif
229 MUVIEW_CURL := $(MUVIEW_X11_CURL) $(MUVIEW_WIN32_CURL) 
230  230
231-INSTALL_APPS := $(MUTOOL) $(MUVIEW) $(MUJSTEST) $(MUVIEW_CURL) 231-MUVIEW := $(MUVIEW_X11) $(MUVIEW_WIN32) $(MUVIEW_GLFW)
 232+MUVIEW := $(MUVIEW_X11) $(MUVIEW_WIN32)
 233 MUVIEW_CURL := $(MUVIEW_X11_CURL) $(MUVIEW_WIN32_CURL)
 234+MUVIEW_GLFW := $(MUVIEW_GLFW)
 235+
232+INSTALL_APPS := $(MUTOOL) $(MUJSTEST) 236+INSTALL_APPS := $(MUTOOL) $(MUJSTEST)
233+ifeq "$(HAVE_CURL)" "yes" 237+ifeq "$(HAVE_CURL)" "yes"
234+INSTALL_APPS += $(MUVIEW_CURL) 238+INSTALL_APPS += $(MUVIEW_CURL)
235+else ifeq "$(HAVE_X11)" "yes" 239+else ifeq "$(HAVE_X11)" "yes"
236+INSTALL_APPS += $(MUVIEW) 240+INSTALL_APPS += $(MUVIEW)
237+endif 241+endif
238  242
 243-INSTALL_APPS := $(MUTOOL) $(MUVIEW) $(MUJSTEST) $(MUVIEW_CURL)
 244+ifeq "$(HAVE_GLFW)" "yes"
 245+INSTALL_APPS += $(MUVIEW_GLFW)
 246+endif
 247
239 # --- Examples --- 248 # --- Examples ---
240  249
241@@ -343,24 +341,26 @@ libs: $(INSTALL_LIBS) 250@@ -343,24 +346,26 @@ libs: $(INSTALL_LIBS)
242 apps: $(INSTALL_APPS) 251 apps: $(INSTALL_APPS)
243  252
244 install: libs apps 253 install: libs apps
245- install -d $(DESTDIR)$(incdir)/mupdf 254- install -d $(DESTDIR)$(incdir)/mupdf
246- install -d $(DESTDIR)$(incdir)/mupdf/fitz 255- install -d $(DESTDIR)$(incdir)/mupdf/fitz
247- install -d $(DESTDIR)$(incdir)/mupdf/pdf 256- install -d $(DESTDIR)$(incdir)/mupdf/pdf
248- install include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf 257- install include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf
249- install include/mupdf/fitz/*.h $(DESTDIR)$(incdir)/mupdf/fitz 258- install include/mupdf/fitz/*.h $(DESTDIR)$(incdir)/mupdf/fitz
250- install include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf 259- install include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf
251- 260-
252- install -d $(DESTDIR)$(libdir) 261- install -d $(DESTDIR)$(libdir)
253- install $(INSTALL_LIBS) $(DESTDIR)$(libdir) 262- install $(INSTALL_LIBS) $(DESTDIR)$(libdir)
254- 263-

cvs diff -r1.1 -r1.2 pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c (expand / switch to unified diff)

--- pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c 2014/05/18 08:12:22 1.1
+++ pkgsrc/print/mupdf/patches/patch-source_fitz_load-jpx.c 2016/02/04 11:50:24 1.2
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1$NetBSD: patch-source_fitz_load-jpx.c,v 1.1 2014/05/18 08:12:22 wiz Exp $ 1$NetBSD: patch-source_fitz_load-jpx.c,v 1.2 2016/02/04 11:50:24 leot Exp $
2 2
3Fix build with openjpeg-2.1. 3Fix build with openjpeg-2.1.
4I have misgivings about the code though. 4I have misgivings about the code though.
5 5
6--- source/fitz/load-jpx.c.orig 2014-04-11 15:10:41.000000000 +0000 6--- source/fitz/load-jpx.c.orig 2015-11-10 16:19:51.000000000 +0000
7+++ source/fitz/load-jpx.c 7+++ source/fitz/load-jpx.c
8@@ -117,7 +117,8 @@ fz_load_jpx(fz_context *ctx, unsigned ch 8@@ -117,7 +117,8 @@ fz_load_jpx(fz_context *ctx, unsigned ch
9 opj_stream_set_read_function(stream, fz_opj_stream_read); 9 opj_stream_set_read_function(stream, fz_opj_stream_read);
10 opj_stream_set_skip_function(stream, fz_opj_stream_skip); 10 opj_stream_set_skip_function(stream, fz_opj_stream_skip);
11 opj_stream_set_seek_function(stream, fz_opj_stream_seek); 11 opj_stream_set_seek_function(stream, fz_opj_stream_seek);
12- opj_stream_set_user_data(stream, &sb); 12- opj_stream_set_user_data(stream, &sb);
13+ /* XXX: sb is on the stack, so no user data free-er needed; I'm not sure that placing it on the stack will work though? */ 13+ /* XXX: sb is on the stack, so no user data free-er needed; I'm not sure that placing it on the stack will work though? */
14+ opj_stream_set_user_data(stream, &sb, NULL); 14+ opj_stream_set_user_data(stream, &sb, NULL);
15 /* Set the length to avoid an assert */ 15 /* Set the length to avoid an assert */
16 opj_stream_set_user_data_length(stream, size); 16 opj_stream_set_user_data_length(stream, size);
17  17