Skip to content

Commit

Permalink
Upgrade MuPDF to 1.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
baskerville committed May 10, 2020
1 parent 932c663 commit 6ad3aba
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 21 deletions.
2 changes: 1 addition & 1 deletion doc/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ rustup target add arm-unknown-linux-gnueabihf

## Developer Tools

Install the required dependencies: *MuPDF 1.16.1*, *DjVuLibre*, *HarfBuzz*, *OpenJPEG*, *jpeg*, *jbig2dec*, *zlib*.
Install the required dependencies: *MuPDF 1.17.0*, *DjVuLibre*, *HarfBuzz*, *OpenJPEG*, *jpeg*, *jbig2dec*, *zlib*.

### Emulator

Expand Down
2 changes: 1 addition & 1 deletion src/document/mupdf_sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use std::mem;

pub const FZ_MAX_COLORS: usize = 32;
pub const FZ_VERSION: &str = "1.16.1";
pub const FZ_VERSION: &str = "1.17.0";

pub const FZ_META_INFO_AUTHOR: &str = "info:Author";
pub const FZ_META_INFO_TITLE: &str = "info:Title";
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ declare -A urls=(
["harfbuzz"]="https://github.com/harfbuzz/harfbuzz/archive/2.6.4.tar.gz"
# Documents
["djvulibre"]="http:https://downloads.sourceforge.net/djvu/djvulibre-3.5.27.tar.gz"
["mupdf"]="https://mupdf.com/downloads/archive/mupdf-1.16.1-source.tar.gz"
["mupdf"]="https://mupdf.com/downloads/archive/mupdf-1.17.0-source.tar.gz"
)

for name in "${@:-${!urls[@]}}" ; do
Expand Down
24 changes: 6 additions & 18 deletions thirdparty/mupdf/kobo.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
diff -ru a/Makefile b/Makefile
--- a/Makefile 2019-07-26 16:10:07.000000000 +0200
+++ b/Makefile 2019-08-01 10:22:40.000000000 +0200
--- a/Makefile 2020-05-10 12:02:22.000000000 +0200
+++ b/Makefile 2020-05-10 12:02:33.000000000 +0200
@@ -199,7 +199,7 @@
$(THREAD_LIB) : $(THREAD_OBJ)
$(PKCS7_LIB) : $(PKCS7_OBJ)
Expand All @@ -10,7 +10,7 @@ diff -ru a/Makefile b/Makefile

# --- Main tools and viewers ---

@@ -372,7 +372,7 @@
@@ -374,7 +374,7 @@
cscope.out: cscope.files
cscope -b

Expand All @@ -20,9 +20,9 @@ diff -ru a/Makefile b/Makefile
clean:
rm -rf $(OUT)
diff -ru a/Makerules b/Makerules
--- a/Makerules 2019-07-26 16:10:07.000000000 +0200
+++ b/Makerules 2019-08-01 10:22:40.000000000 +0200
@@ -184,6 +184,34 @@
--- a/Makerules 2020-05-10 12:02:22.000000000 +0200
+++ b/Makerules 2020-05-10 12:02:33.000000000 +0200
@@ -191,6 +191,34 @@
HAVE_WIN32=yes
endif

Expand Down Expand Up @@ -57,15 +57,3 @@ diff -ru a/Makerules b/Makerules
# Most variables when building for iOS are set up in ios/build_libs.sh,
# which is called from the Xcode project as a "Run Script" build step.
# The following section works for both device and simulator builds.
diff -ru a/source/fitz/store.c b/source/fitz/store.c
--- a/source/fitz/store.c 2019-09-25 22:07:15.000000000 +0200
+++ b/source/fitz/store.c 2019-09-25 22:08:48.000000000 +0200
@@ -336,7 +336,7 @@
}

/* If we ran out of items to search, then we can never free enough */
- if (item == NULL)
+ if (count == 0)
{
return 0;
}

0 comments on commit 6ad3aba

Please sign in to comment.