after doing battle with the build infra, belatedly update to MuPDF 1.11
This commit is contained in:
parent
81b7cf4559
commit
06abe08a32
@ -1,12 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.73 2017/05/01 14:04:09 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.74 2017/05/05 14:02:51 sthen Exp $
|
||||
|
||||
SHARED_LIBS += mupdf 5.0
|
||||
SHARED_LIBS += mupdfthird 0.0
|
||||
SHARED_LIBS += mupdf 6.0
|
||||
|
||||
COMMENT = graphic library, pdf parser, viewer and utilities
|
||||
|
||||
V = 1.10a
|
||||
REVISION = 0
|
||||
V = 1.11
|
||||
DISTNAME = mupdf-$V-source
|
||||
PKGNAME = mupdf-$V
|
||||
|
||||
@ -22,14 +20,14 @@ MAINTAINER = Stuart Henderson <sthen@openbsd.org>
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
|
||||
# uses pledge(2)
|
||||
WANTLIB += GL X11 Xcursor Xext Xinerama Xrandr c crypto curl freetype
|
||||
WANTLIB += harfbuzz jbig2dec jpeg m nghttp2 openjp2 pthread ssl z
|
||||
WANTLIB += GL X11 Xext c crypto curl freetype glfw harfbuzz jbig2dec
|
||||
WANTLIB += jpeg m openjp2 pthread ssl z
|
||||
|
||||
FLAVORS= js
|
||||
FLAVOR?=
|
||||
|
||||
MODULES = gcc4
|
||||
MODGCC4_ARCHS = ${GCC3_ARCHS} ${GCC4_ARCHS}
|
||||
MODULES = lang/clang
|
||||
MODCLANG_ARCHS = ${GCC3_ARCHS} ${GCC4_ARCHS}
|
||||
|
||||
# http://git.ghostscript.com/?p=mupdf.git;a=summary
|
||||
MASTER_SITES = http://mupdf.com/downloads/ \
|
||||
@ -38,6 +36,7 @@ MASTER_SITES = http://mupdf.com/downloads/ \
|
||||
RUN_DEPENDS = devel/desktop-file-utils \
|
||||
devel/xdg-utils
|
||||
LIB_DEPENDS = devel/harfbuzz \
|
||||
graphics/glfw \
|
||||
graphics/jbig2dec \
|
||||
graphics/jpeg \
|
||||
graphics/openjp2>=2.0.1 \
|
||||
@ -46,35 +45,25 @@ LIB_DEPENDS = devel/harfbuzz \
|
||||
USE_GMAKE = Yes
|
||||
NO_TEST = Yes
|
||||
|
||||
.if ${MACHINE_ARCH} == "hppa"
|
||||
CFLAGS += -ffunction-sections
|
||||
.endif
|
||||
|
||||
CFLAGS += -fPIC
|
||||
|
||||
# -I flags prepend mupdf's own, to allow building with previous ver installed
|
||||
MAKE_ENV += CFLAGS="${CFLAGS} -I$(WRKSRC)/fitz -I$(WRKSRC)/pdf -I$(WRKSRC)/xps"
|
||||
|
||||
MAKE_FLAGS = CC="${CC}" CXX="${CXX}" \
|
||||
XCFLAGS="${CFLAGS} -fPIC -I$(WRKSRC)/fitz -I$(WRKSRC)/pdf -I$(WRKSRC)/xps" \
|
||||
HAVE_CURL=yes \
|
||||
CURL_LIB="-lcurl" \
|
||||
CURL_LIBS="-lpthread -lssl -lcrypto -lnghttp2 -lcurl" \
|
||||
HAVE_GLFW=yes \
|
||||
SYS_GLFW_CFLAGS="-I${X11BASE}/include" \
|
||||
SYS_GLFW_LIBS="-L${LOCALBASE}/lib -L${X11BASE}/lib -lglfw -lGL" \
|
||||
SYS_OPENSSL_LIBS="-lssl -lcrypto" \
|
||||
LDFLAGS="${LDFLAGS}" \
|
||||
LIBmupdf_VERSION="${LIBmupdf_VERSION}" \
|
||||
LIBmupdfthird_VERSION="${LIBmupdfthird_VERSION}" \
|
||||
build= verbose=yes
|
||||
build=release verbose=yes
|
||||
|
||||
FAKE_FLAGS = NOCURL= prefix=${PREFIX} mandir=${PREFIX}/man
|
||||
|
||||
pre-configure:
|
||||
cd ${WRKSRC}; sed -i 's,/usr/X11R6/include,${X11BASE}/include,g' Makerules Makethird
|
||||
rm -rf ${WRKSRC}/thirdparty/{curl,freetype,harfbuzz,jbig2dec,jpeg,openjpeg,zlib} # use from ports
|
||||
#rm -rf ${WRKSRC}/thirdparty/glfw # not yet in ports, doesn't build here
|
||||
rm -rf ${WRKSRC}/thirdparty/{curl,freetype,harfbuzz,jbig2dec,libjpeg,openjpeg,zlib,glfw} # use from ports
|
||||
.if !${FLAVOR:Mjs}
|
||||
rm -rf ${WRKSRC}/thirdparty/mujs # not building with javascript support
|
||||
.else
|
||||
|
||||
CFLAGS += -DWITH_JS
|
||||
.endif
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (mupdf-1.10a-source.tar.gz) = qswfNrkYD1YgIu8as0ObAJNp2UQ2Tzz/iiqJiDTjqDY=
|
||||
SIZE (mupdf-1.10a-source.tar.gz) = 42264707
|
||||
SHA256 (mupdf-1.11-source.tar.gz) = IJR0qAxWoDXOP0lYpjNzqW+tdcknx7Gs3FU/yFhV8Ao=
|
||||
SIZE (mupdf-1.11-source.tar.gz) = 40156070
|
||||
|
@ -1,32 +1,38 @@
|
||||
$OpenBSD: patch-Makefile,v 1.12 2016/12/12 10:54:39 sthen Exp $
|
||||
--- Makefile.orig Mon Nov 28 13:34:04 2016
|
||||
+++ Makefile Mon Dec 12 09:40:54 2016
|
||||
@@ -152,14 +152,17 @@ $(FONT_GEN_SIL) : $(FONT_BIN_SIL)
|
||||
$OpenBSD: patch-Makefile,v 1.13 2017/05/05 14:02:51 sthen Exp $
|
||||
|
||||
Index: Makefile
|
||||
--- Makefile.orig
|
||||
+++ Makefile
|
||||
@@ -300,7 +300,7 @@ generate: $(JAVASCRIPT_GEN)
|
||||
|
||||
# --- Library ---
|
||||
|
||||
-MUPDF_LIB = $(OUT)/libmupdf.a
|
||||
-THIRD_LIB = $(OUT)/libmupdfthird.a
|
||||
+MUPDF_LIB = libmupdf.so.${LIBmupdf_VERSION}
|
||||
+THIRD_LIB = libmupdfthird.so.${LIBmupdfthird_VERSION}
|
||||
+MUPDF_LIB = $(OUT)/libmupdf.so.${LIBmupdf_VERSION}
|
||||
THIRD_LIB = $(OUT)/libmupdfthird.a
|
||||
THREAD_LIB = $(OUT)/libmuthreads.a
|
||||
|
||||
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)
|
||||
@@ -308,11 +308,12 @@ MUPDF_OBJ := $(FITZ_OBJ) $(FONT_OBJ) $(PDF_OBJ) $(XPS_
|
||||
THIRD_OBJ := $(FREETYPE_OBJ) $(HARFBUZZ_OBJ) $(JBIG2DEC_OBJ) $(LIBJPEG_OBJ) $(JPEGXR_OBJ) $(LURATECH_OBJ) $(MUJS_OBJ) $(OPENJPEG_OBJ) $(ZLIB_OBJ)
|
||||
THREAD_OBJ := $(THREAD_OBJ)
|
||||
|
||||
$(MUPDF_LIB) : $(MUPDF_OBJ)
|
||||
+ $(CC) $(LDFLAGS) --shared -o $@ $^ $(LIBS)
|
||||
+
|
||||
-$(MUPDF_LIB) : $(MUPDF_OBJ)
|
||||
+$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_LIB) $(THREAD_LIB)
|
||||
+ $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf.so.${LIBmupdf_VERSION}
|
||||
$(THIRD_LIB) : $(THIRD_OBJ)
|
||||
+ $(CC) $(LDFLAGS) --shared -o $@ $^ $(LIBS)
|
||||
$(THREAD_LIB) : $(THREAD_OBJ)
|
||||
|
||||
INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB)
|
||||
-INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB)
|
||||
+INSTALL_LIBS := $(MUPDF_LIB)
|
||||
|
||||
@@ -198,7 +201,7 @@ $(OUT)/platform/x11/curl/%.o : platform/x11/%.c | $(AL
|
||||
$(CC_CMD) $(X11_CFLAGS) $(CURL_CFLAGS) -DHAVE_CURL
|
||||
# --- Tools and Apps ---
|
||||
|
||||
$(OUT)/platform/gl/%.o : platform/gl/%.c | $(ALL_DIR)
|
||||
- $(CC_CMD) $(GLFW_CFLAGS)
|
||||
+ $(CC_CMD) -I${X11BASE}/include $(GLFW_CFLAGS)
|
||||
|
||||
.PRECIOUS : $(OUT)/%.o # Keep intermediates from chained rules
|
||||
@@ -321,7 +322,7 @@ MUTOOL_SRC := source/tools/mutool.c source/tools/mucon
|
||||
MUTOOL_SRC += $(wildcard source/tools/pdf*.c)
|
||||
MUTOOL_OBJ := $(MUTOOL_SRC:%.c=$(OUT)/%.o)
|
||||
$(MUTOOL_OBJ) : $(FITZ_HDR) $(PDF_HDR)
|
||||
-$(MUTOOL_EXE) : $(MUTOOL_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB)
|
||||
+$(MUTOOL_EXE) : $(MUTOOL_OBJ) ${MUPDF_LIB} $(THIRD_LIB) $(THREAD_LIB)
|
||||
$(LINK_CMD) $(PTHREAD_LIBS)
|
||||
|
||||
MURASTER_EXE := $(OUT)/muraster
|
||||
|
@ -1,32 +1,28 @@
|
||||
$OpenBSD: patch-Makerules,v 1.16 2016/12/12 10:54:39 sthen Exp $
|
||||
--- Makerules.orig Mon Nov 28 13:34:04 2016
|
||||
+++ Makerules Mon Dec 12 09:41:21 2016
|
||||
@@ -21,6 +21,7 @@ else
|
||||
LDREMOVEUNREACH = -Wl,--gc-sections
|
||||
endif
|
||||
|
||||
+ifneq "$(OS)" "OpenBSD" # don't override C optimizer flags for ports builds
|
||||
ifeq "$(build)" "debug"
|
||||
CFLAGS += -pipe -g -DDEBUG
|
||||
$OpenBSD: patch-Makerules,v 1.17 2017/05/05 14:02:51 sthen Exp $
|
||||
Index: Makerules
|
||||
--- Makerules.orig
|
||||
+++ Makerules
|
||||
@@ -26,8 +26,8 @@ ifeq "$(build)" "debug"
|
||||
CFLAGS += -pipe -g
|
||||
LDFLAGS += -g
|
||||
@@ -55,6 +56,7 @@ LIBS += -lprofiler
|
||||
else
|
||||
$(error unknown build setting: '$(build)')
|
||||
endif
|
||||
+endif
|
||||
|
||||
ifeq "$(largefile)" "yes"
|
||||
CFLAGS += -DFZ_LARGEFILE
|
||||
@@ -103,7 +105,7 @@ LD = xcrun ld
|
||||
RANLIB_CMD = xcrun ranlib $@
|
||||
else ifeq "$(build)" "release"
|
||||
-CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer
|
||||
-LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s
|
||||
+CFLAGS += -DNDEBUG
|
||||
+LDFLAGS += $(LDREMOVEUNREACH)
|
||||
else ifeq "$(build)" "small"
|
||||
CFLAGS += -pipe -Os -DNDEBUG -fomit-frame-pointer
|
||||
LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s
|
||||
@@ -110,7 +110,7 @@ LD := xcrun ld
|
||||
RANLIB_CMD := xcrun ranlib $@
|
||||
|
||||
# Linux uses pkg-config for system libraries.
|
||||
-else ifeq "$(OS)" "Linux"
|
||||
+else
|
||||
|
||||
HAVE_PTHREADS ?= yes
|
||||
|
||||
@@ -123,7 +125,7 @@ SYS_CURL_CFLAGS += $(shell pkg-config --cflags openssl
|
||||
HAVE_PTHREAD := yes
|
||||
SYS_PTHREAD_CFLAGS :=
|
||||
@@ -132,7 +132,7 @@ SYS_CURL_CFLAGS += $(shell pkg-config --cflags openssl
|
||||
SYS_CURL_DEPS += $(shell pkg-config --libs openssl)
|
||||
endif
|
||||
endif
|
||||
@ -34,12 +30,4 @@ $OpenBSD: patch-Makerules,v 1.16 2016/12/12 10:54:39 sthen Exp $
|
||||
+SYS_CURL_DEPS += -lpthread
|
||||
|
||||
ifeq "$(shell pkg-config --exists x11 xext && echo yes)" "yes"
|
||||
HAVE_X11 = yes
|
||||
@@ -147,6 +149,7 @@ SYS_OPENJPEG_LIBS = $(shell pkg-config --libs libopenj
|
||||
endif
|
||||
|
||||
SYS_JBIG2DEC_LIBS = -ljbig2dec
|
||||
+SYS_JPEG_CFLAGS = -I/usr/local/include
|
||||
SYS_JPEG_LIBS = -ljpeg
|
||||
SYS_ZLIB_LIBS = -lz
|
||||
|
||||
HAVE_X11 := yes
|
||||
|
@ -1,19 +0,0 @@
|
||||
$OpenBSD: patch-Makethird,v 1.4 2016/12/12 10:54:39 sthen Exp $
|
||||
--- Makethird.orig Mon Nov 28 13:34:04 2016
|
||||
+++ Makethird Mon Dec 12 09:42:29 2016
|
||||
@@ -665,13 +665,13 @@ GLFW_SRC := \
|
||||
xkb_unicode.c
|
||||
|
||||
$(GLFW_OUT)/%.o: $(GLFW_DIR)/src/%.c | $(GLFW_OUT)
|
||||
- $(CC_CMD) -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_USE_OPENGL -D_GLFW_HAS_GLXGETPROCADDRESS
|
||||
+ $(CC_CMD) -I/usr/X11R6/include -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_USE_OPENGL -D_GLFW_HAS_GLXGETPROCADDRESS
|
||||
$(GLFW_LIB): $(addprefix $(GLFW_OUT)/, $(GLFW_SRC:%.c=%.o))
|
||||
GLFW_LIBS := -lGL -lX11 -lXcursor -lXrandr -lXinerama -lpthread
|
||||
|
||||
endif
|
||||
|
||||
-GLFW_CFLAGS := -I$(GLFW_DIR)/include
|
||||
+GLFW_CFLAGS := -I/usr/X11R6/include -I$(GLFW_DIR)/include
|
||||
$(GLFW_OUT):
|
||||
$(MKDIR_CMD)
|
||||
|
@ -1,12 +1,13 @@
|
||||
$OpenBSD: patch-platform_gl_gl-main_c,v 1.3 2016/12/12 10:54:39 sthen Exp $
|
||||
$OpenBSD: patch-platform_gl_gl-main_c,v 1.4 2017/05/05 14:02:51 sthen Exp $
|
||||
|
||||
add pledge(2) to mupdf-gl:
|
||||
- drm : opengl stuff
|
||||
- proc exec : opening a external browser on uri link
|
||||
|
||||
--- platform/gl/gl-main.c.orig Mon Nov 28 13:34:04 2016
|
||||
+++ platform/gl/gl-main.c Mon Dec 12 09:39:02 2016
|
||||
@@ -1414,6 +1414,12 @@ int main(int argc, char **argv)
|
||||
Index: platform/gl/gl-main.c
|
||||
--- platform/gl/gl-main.c.orig
|
||||
+++ platform/gl/gl-main.c
|
||||
@@ -1486,6 +1486,12 @@ int main(int argc, char **argv)
|
||||
|
||||
glfwMakeContextCurrent(window);
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
$OpenBSD: patch-platform_x11_pdfapp_c,v 1.7 2016/12/12 10:54:39 sthen Exp $
|
||||
--- platform/x11/pdfapp.c.orig Mon Nov 28 13:34:04 2016
|
||||
+++ platform/x11/pdfapp.c Mon Dec 12 09:39:02 2016
|
||||
$OpenBSD: patch-platform_x11_pdfapp_c,v 1.8 2017/05/05 14:02:51 sthen Exp $
|
||||
Index: platform/x11/pdfapp.c
|
||||
--- platform/x11/pdfapp.c.orig
|
||||
+++ platform/x11/pdfapp.c
|
||||
@@ -26,8 +26,18 @@ enum
|
||||
static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repaint, int transition, int searching);
|
||||
static void pdfapp_updatepage(pdfapp_t *app);
|
||||
@ -21,7 +22,7 @@ $OpenBSD: patch-platform_x11_pdfapp_c,v 1.7 2016/12/12 10:54:39 sthen Exp $
|
||||
static int zoom_in(int oldres)
|
||||
{
|
||||
int i;
|
||||
@@ -1038,6 +1048,12 @@ static void pdfapp_search_in_direction(pdfapp_t *app,
|
||||
@@ -1044,6 +1054,12 @@ static void pdfapp_search_in_direction(pdfapp_t *app,
|
||||
return;
|
||||
}
|
||||
|
||||
@ -34,7 +35,7 @@ $OpenBSD: patch-platform_x11_pdfapp_c,v 1.7 2016/12/12 10:54:39 sthen Exp $
|
||||
wincursor(app, WAIT);
|
||||
|
||||
firstpage = app->pageno;
|
||||
@@ -1535,9 +1551,9 @@ static void handlescroll(pdfapp_t *app, int modifiers,
|
||||
@@ -1539,9 +1555,9 @@ static void handlescroll(pdfapp_t *app, int modifiers,
|
||||
{
|
||||
/* zoom in/out if ctrl is pressed */
|
||||
if (dir < 0)
|
||||
|
@ -1,11 +1,12 @@
|
||||
$OpenBSD: patch-platform_x11_x11_main_c,v 1.2 2016/12/12 10:54:39 sthen Exp $
|
||||
$OpenBSD: patch-platform_x11_x11_main_c,v 1.3 2017/05/05 14:02:51 sthen Exp $
|
||||
|
||||
add pledge(2) to mupdf-x11 and mupdf-x11-curl:
|
||||
- inet dns : with HAVE_CURL only
|
||||
- proc exec : opening an external browser on uri link
|
||||
|
||||
--- platform/x11/x11_main.c.orig Mon Nov 28 13:34:04 2016
|
||||
+++ platform/x11/x11_main.c Mon Dec 12 09:39:02 2016
|
||||
Index: platform/x11/x11_main.c
|
||||
--- platform/x11/x11_main.c.orig
|
||||
+++ platform/x11/x11_main.c
|
||||
@@ -706,7 +706,6 @@ void onselreq(Window requestor, Atom selection, Atom t
|
||||
void winreloadpage(pdfapp_t *app)
|
||||
{
|
||||
@ -24,7 +25,7 @@ add pledge(2) to mupdf-x11 and mupdf-x11-curl:
|
||||
}
|
||||
|
||||
void winopenuri(pdfapp_t *app, char *buf)
|
||||
@@ -892,6 +890,20 @@ int main(int argc, char **argv)
|
||||
@@ -898,6 +896,20 @@ int main(int argc, char **argv)
|
||||
tmo_at.tv_sec = 0;
|
||||
tmo_at.tv_usec = 0;
|
||||
timeout = NULL;
|
||||
@ -43,5 +44,5 @@ add pledge(2) to mupdf-x11 and mupdf-x11-curl:
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
pdfapp_open(&gapp, filename, 0);
|
||||
|
||||
if (bps)
|
||||
pdfapp_open_progressive(&gapp, filename, 0, bps);
|
||||
|
@ -1,21 +1,17 @@
|
||||
$OpenBSD: patch-source_fitz_load-jpx_c,v 1.3 2016/12/12 10:54:39 sthen Exp $
|
||||
$OpenBSD: patch-source_fitz_load-jpx_c,v 1.4 2017/05/05 14:02:51 sthen Exp $
|
||||
|
||||
- OPJ_STATIC interferes with shared lib patch for mupdf
|
||||
If OPJ_STATIC is defined, load-jpx.c linkage with libopenjp2.so is broken
|
||||
("relocation R_X86_64_PC32 against symbol ... can not be used when making a
|
||||
shared object")
|
||||
|
||||
--- source/fitz/load-jpx.c.orig Mon Nov 28 13:34:04 2016
|
||||
+++ source/fitz/load-jpx.c Mon Dec 12 09:39:02 2016
|
||||
@@ -481,14 +481,6 @@ fz_load_jpx_info(fz_context *ctx, unsigned char *data,
|
||||
Index: source/fitz/load-jpx.c
|
||||
--- source/fitz/load-jpx.c.orig
|
||||
+++ source/fitz/load-jpx.c
|
||||
@@ -444,7 +444,6 @@ fz_load_jpx_info(fz_context *ctx, unsigned char *data,
|
||||
|
||||
#else /* HAVE_LURATECH */
|
||||
|
||||
-/* 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. */
|
||||
-#define OPJ_STATIC
|
||||
-#ifndef _MSC_VER
|
||||
-#define OPJ_HAVE_STDINT_H
|
||||
-#endif
|
||||
-
|
||||
#include <openjpeg.h>
|
||||
|
||||
/* OpenJPEG does not provide a safe mechanism to intercept
|
||||
#define OPJ_HAVE_INTTYPES_H
|
||||
#if !defined(_WIN32) && !defined(_WIN64)
|
||||
#define OPJ_HAVE_STDINT_H
|
||||
|
@ -1,44 +0,0 @@
|
||||
$OpenBSD: patch-source_fitz_pixmap_c,v 1.1 2017/02/10 14:51:13 sthen Exp $
|
||||
|
||||
use-after-free and heap-based buffer overflow
|
||||
|
||||
https://bugs.ghostscript.com/show_bug.cgi?id=697515
|
||||
https://blogs.gentoo.org/ago/2017/02/09/mupdf-use-after-free-in-fz_subsample_pixmap-pixmap-c
|
||||
http://www.ghostscript.com/cgi-bin/findgit.cgi?2c4e5867ee699b1081527bc6c6ea0e99a35a5c27
|
||||
|
||||
--- source/fitz/pixmap.c.orig Fri Feb 10 14:33:52 2017
|
||||
+++ source/fitz/pixmap.c Fri Feb 10 14:37:16 2017
|
||||
@@ -1054,6 +1054,7 @@ fz_subsample_pixmap_ARM(unsigned char *ptr, int w, int
|
||||
"@STACK:r1,<9>,factor,n,fwd,back,back2,fwd2,divX,back4,fwd4,fwd3,divY,back5,divXY\n"
|
||||
"ldr r4, [r13,#4*22] @ r4 = divXY \n"
|
||||
"ldr r5, [r13,#4*11] @ for (nn = n; nn > 0; n--) { \n"
|
||||
+ "ldr r8, [r13,#4*17] @ r8 = back4 \n"
|
||||
"18: @ \n"
|
||||
"mov r14,#0 @ r14= v = 0 \n"
|
||||
"sub r5, r5, r1, LSL #8 @ for (xx = x; xx > 0; x--) { \n"
|
||||
@@ -1070,7 +1071,7 @@ fz_subsample_pixmap_ARM(unsigned char *ptr, int w, int
|
||||
"mul r14,r4, r14 @ r14= v *= divX \n"
|
||||
"mov r14,r14,LSR #16 @ r14= v >>= 16 \n"
|
||||
"strb r14,[r9], #1 @ *d++ = r14 \n"
|
||||
- "sub r0, r0, r8 @ s -= back2 \n"
|
||||
+ "sub r0, r0, r8 @ s -= back4 \n"
|
||||
"subs r5, r5, #1 @ n-- \n"
|
||||
"bgt 18b @ } \n"
|
||||
"21: @ \n"
|
||||
@@ -1199,6 +1200,7 @@ fz_subsample_pixmap(fz_context *ctx, fz_pixmap *tile,
|
||||
x += f;
|
||||
if (x > 0)
|
||||
{
|
||||
+ int back4 = x * n - 1;
|
||||
div = x * y;
|
||||
for (nn = n; nn > 0; nn--)
|
||||
{
|
||||
@@ -1213,7 +1215,7 @@ fz_subsample_pixmap(fz_context *ctx, fz_pixmap *tile,
|
||||
s -= back5;
|
||||
}
|
||||
*d++ = v / div;
|
||||
- s -= back2;
|
||||
+ s -= back4;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,12 @@
|
||||
$OpenBSD: patch-source_tools_mudraw_c,v 1.3 2016/12/12 10:54:39 sthen Exp $
|
||||
$OpenBSD: patch-source_tools_mudraw_c,v 1.4 2017/05/05 14:02:51 sthen Exp $
|
||||
|
||||
add pledge(2) to "mutool draw":
|
||||
- wpath cpath : only if output is specified
|
||||
|
||||
--- source/tools/mudraw.c.orig Mon Nov 28 13:34:04 2016
|
||||
+++ source/tools/mudraw.c Mon Dec 12 09:39:02 2016
|
||||
@@ -1497,6 +1497,23 @@ int mudraw_main(int argc, char **argv)
|
||||
Index: source/tools/mudraw.c
|
||||
--- source/tools/mudraw.c.orig
|
||||
+++ source/tools/mudraw.c
|
||||
@@ -1385,6 +1385,23 @@ int mudraw_main(int argc, char **argv)
|
||||
if (fz_optind == argc)
|
||||
usage();
|
||||
|
||||
|
@ -1,12 +1,13 @@
|
||||
$OpenBSD: patch-source_tools_murun_c,v 1.2 2016/12/12 10:54:39 sthen Exp $
|
||||
--- source/tools/murun.c.orig Mon Nov 28 13:34:04 2016
|
||||
+++ source/tools/murun.c Mon Dec 12 09:39:02 2016
|
||||
$OpenBSD: patch-source_tools_murun_c,v 1.3 2017/05/05 14:02:51 sthen Exp $
|
||||
Index: source/tools/murun.c
|
||||
--- source/tools/murun.c.orig
|
||||
+++ source/tools/murun.c
|
||||
@@ -1,3 +1,4 @@
|
||||
+#ifdef WITH_JS
|
||||
#include "mupdf/fitz.h"
|
||||
#include "mupdf/pdf.h"
|
||||
|
||||
@@ -4532,5 +4533,6 @@ int murun_main(int argc, char **argv)
|
||||
@@ -4537,5 +4538,6 @@ int murun_main(int argc, char **argv)
|
||||
fz_drop_context(ctx);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
$OpenBSD: patch-source_tools_pdfextract_c,v 1.2 2016/12/12 10:54:39 sthen Exp $
|
||||
$OpenBSD: patch-source_tools_pdfextract_c,v 1.3 2017/05/05 14:02:51 sthen Exp $
|
||||
|
||||
add pledge(2) to "mutool extract"
|
||||
|
||||
--- source/tools/pdfextract.c.orig Mon Nov 28 13:34:04 2016
|
||||
+++ source/tools/pdfextract.c Mon Dec 12 09:39:02 2016
|
||||
@@ -255,6 +255,12 @@ int pdfextract_main(int argc, char **argv)
|
||||
Index: source/tools/pdfextract.c
|
||||
--- source/tools/pdfextract.c.orig
|
||||
+++ source/tools/pdfextract.c
|
||||
@@ -252,6 +252,12 @@ int pdfextract_main(int argc, char **argv)
|
||||
|
||||
infile = argv[fz_optind++];
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
$OpenBSD: patch-source_tools_pdfinfo_c,v 1.2 2016/12/12 10:54:39 sthen Exp $
|
||||
$OpenBSD: patch-source_tools_pdfinfo_c,v 1.3 2017/05/05 14:02:51 sthen Exp $
|
||||
|
||||
add pledge(2) to "mutool info"
|
||||
|
||||
--- source/tools/pdfinfo.c.orig Mon Nov 28 13:34:04 2016
|
||||
+++ source/tools/pdfinfo.c Mon Dec 12 09:39:02 2016
|
||||
@@ -1021,6 +1021,12 @@ int pdfinfo_main(int argc, char **argv)
|
||||
Index: source/tools/pdfinfo.c
|
||||
--- source/tools/pdfinfo.c.orig
|
||||
+++ source/tools/pdfinfo.c
|
||||
@@ -1025,6 +1025,12 @@ int pdfinfo_main(int argc, char **argv)
|
||||
if (fz_optind == argc)
|
||||
infousage();
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.18 2016/12/12 10:54:39 sthen Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.19 2017/05/05 14:02:51 sthen Exp $
|
||||
@bin bin/mujstest
|
||||
bin/mupdf
|
||||
@bin bin/mupdf-gl
|
||||
@ -11,6 +11,7 @@ include/mupdf/fitz/
|
||||
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
|
||||
@ -25,13 +26,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
|
||||
@ -48,7 +49,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
|
||||
@ -86,7 +87,6 @@ include/mupdf/pdf/widget.h
|
||||
include/mupdf/pdf/xref.h
|
||||
include/mupdf/svg.h
|
||||
@lib lib/libmupdf.so.${LIBmupdf_VERSION}
|
||||
@lib lib/libmupdfthird.so.${LIBmupdfthird_VERSION}
|
||||
@man man/man1/mupdf.1
|
||||
@man man/man1/mutool.1
|
||||
share/applications/mupdf.desktop
|
||||
|
Loading…
x
Reference in New Issue
Block a user