[gs-commits] mupdf 1.16.1.epub-prerelease-1 Update WebAssembly build.
[email protected] (Tor Andersson) Tue, 22 Oct 2019 15:20:51 +0000 (UTC)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 753ba286f5c64daad0d6edef8fb9202828753a50 Author: Tor Andersson <[email protected]> Date: Tue Oct 22 17:11:56 2019 +0200 Update WebAssembly build. diff --git a/Makefile b/Makefile index 691765c..f0fc160 100644 --- a/Makefile +++ b/Makefile @@ -393,4 +393,4 @@ android: generate APP_PLATFORM=android-16 \ APP_OPTIM=$(build) -.PHONY: all clean nuke install third libs apps generate tags +.PHONY: all clean nuke install third libs apps generate tags wasm diff --git a/Makerules b/Makerules index 275be47..3143229 100644 --- a/Makerules +++ b/Makerules @@ -160,6 +160,7 @@ ifeq "$(OS)" "wasm" OUT := build/wasm/$(build) CC = emcc CXX = em++ + AR = emar HAVE_GLUT=no HAVE_X11=no HAVE_OBJCOPY=no diff --git a/platform/wasm/wrap.c b/platform/wasm/wrap.c index 53dc6cf..c58dcdc 100644 --- a/platform/wasm/wrap.c +++ b/platform/wasm/wrap.c @@ -186,7 +186,8 @@ char *pageLinks(fz_document *doc, int number, float dpi) fz_append_printf(ctx, buf, " href=\"%s\">\n", link->uri); else { - int linkNumber = fz_resolve_link(ctx, doc, link->uri, NULL, NULL); + fz_location linkLoc = fz_resolve_link(ctx, doc, link->uri, NULL, NULL); + int linkNumber = fz_page_number_from_location(ctx, doc, linkLoc); fz_append_printf(ctx, buf, " href=\"#page%d\">\n", linkNumber+1); } } http://git.ghostscript.com/?p=mupdf.git;a=commit;h=753ba286f5c64daad0d6edef8fb9202828753a50 -- MuPDF library Artifex Software, Inc.