From 358898aefabc7ac13e26619911c90709dc1eaef7 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 14 Aug 2013 13:34:51 +0200 Subject: Fix build of curl on macosx. Only build mupdf-x11-curl if the curl thirdparty library exists. --- Makefile | 6 ++++-- Makerules | 4 ++++ Makethird | 5 ++--- thirdparty/curl | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 306544a2..84514b5d 100644 --- a/Makefile +++ b/Makefile @@ -239,11 +239,13 @@ $(MUVIEW_X11) : $(MUPDF_LIB) $(MUPDF_JS_NONE_LIB) $(THIRD_LIBS) $(MUVIEW_X11) : $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o) $(LINK_CMD) $(X11_LIBS) -MUVIEW_X11_CURL := $(OUT)/mupdf-curl +ifeq "$(NOCURL)" "" +MUVIEW_X11_CURL := $(OUT)/mupdf-x11-curl $(MUVIEW_X11_CURL) : $(MUPDF_LIB) $(MUPDF_JS_NONE_LIB) $(THIRD_LIBS) $(CURL_LIB) $(MUVIEW_X11_CURL) : $(addprefix $(OUT)/platform/x11/curl/, x11_main.o x11_image.o pdfapp.o curl_stream.o) $(LINK_CMD) $(X11_LIBS) $(CURL_LIBS) endif +endif ifeq "$(V8_PRESENT)" "yes" ifeq "$(NOX11)" "" @@ -258,7 +260,7 @@ MUVIEW := $(MUVIEW_X11) MUVIEW_V8 := $(MUVIEW_X11_V8) MUVIEW_CURL := $(MUVIEW_X11_CURL) -INSTALL_APPS := $(MUDRAW) $(MUTOOL) $(MUVIEW) $(MUJSTEST_V8) $(MUVIEW_V8) $(MUVIEW_X11_CURL) +INSTALL_APPS := $(MUDRAW) $(MUTOOL) $(MUVIEW) $(MUJSTEST_V8) $(MUVIEW_V8) $(MUVIEW_CURL) # --- Format man pages --- diff --git a/Makerules b/Makerules index 5abfd586..a99942d9 100644 --- a/Makerules +++ b/Makerules @@ -33,6 +33,8 @@ else ifeq "$(OS)" "Darwin" SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL SYS_OPENSSL_LIBS = -lcrypto +SYS_CURL_DEPS = -lpthread + SYS_X11_CFLAGS = -I/usr/X11R6/include SYS_X11_LIBS = -L/usr/X11R6/lib -lX11 -lXext @@ -53,6 +55,8 @@ SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL $(shell pkg-config --cflags libcrypto) SYS_OPENSSL_LIBS = $(shell pkg-config --libs libcrypto) endif +SYS_CURL_DEPS = -lpthread -lrt + SYS_X11_CFLAGS = $(shell pkg-config --cflags x11 xext) SYS_X11_LIBS = $(shell pkg-config --libs x11 xext) diff --git a/Makethird b/Makethird index 4a486ebd..d9730227 100644 --- a/Makethird +++ b/Makethird @@ -442,8 +442,7 @@ $(CURL_OUT)/%.o: $(CURL_DIR)/lib/%.c | $(CURL_OUT) $(CC_CMD) $(CRL_CFLAGS) CURL_CFLAGS := -I$(CURL_DIR)/include -CURL_LIBS := -lpthread -lrt +CURL_LIBS := $(SYS_CURL_DEPS) else -CURL_CFLAGS := $(SYS_CURL_CFLAGS) -CURL_LIBS := $(SYS_CURL_LIBS) +NOCURL := yes endif diff --git a/thirdparty/curl b/thirdparty/curl index 62693f11..49e4b186 160000 --- a/thirdparty/curl +++ b/thirdparty/curl @@ -1 +1 @@ -Subproject commit 62693f11b2f618f6db5e62b6dcf848477eea0f4f +Subproject commit 49e4b186c8c9eebffd2f39a6f587980fd04ebb69 -- cgit v1.2.3 From 8530783a10e467947f8698cf44d38313b5454cb2 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 14 Aug 2013 11:05:04 +0100 Subject: Bug 694516: Fix Android operation with passworded files. Don't countPages until after we have a password. --- platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java b/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java index ff38b22a..5590d1a1 100644 --- a/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java +++ b/platform/android/src/com/artifex/mupdfdemo/MuPDFActivity.java @@ -306,13 +306,15 @@ public class MuPDFActivity extends Activity core = openFile(Uri.decode(uri.getEncodedPath())); } SearchTaskResult.set(null); - if (core.countPages() == 0) - core = null; } if (core != null && core.needsPassword()) { requestPassword(savedInstanceState); return; } + if (core != null && core.countPages() == 0) + { + core = null; + } } if (core == null) { -- cgit v1.2.3