From 63ecc33506a8301d58dec14ca689ec9123aded45 Mon Sep 17 00:00:00 2001 From: Bastien Dejean Date: Mon, 27 Nov 2023 11:51:45 +0100 Subject: [PATCH] Update third-party dependency: MuPDF --- README.md | 2 +- crates/core/src/document/mupdf_sys.rs | 2 +- doc/BUILD.md | 2 +- thirdparty/download.sh | 2 +- thirdparty/mupdf/kobo.patch | 16 ++++++++-------- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7410e8a..6174382 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Any 4.*X*.*Y* firmware, with *X* ≥ 6, will do. ## Supported formats -- PDF, CBZ, FB2, MOBI and XPS via [MuPDF](https://mupdf.com/index.html). +- PDF, CBZ, FB2, MOBI, XPS and TXT via [MuPDF](https://mupdf.com/index.html). - ePUB through a built-in renderer. - DJVU via [DjVuLibre](http://djvu.sourceforge.net/index.html). diff --git a/crates/core/src/document/mupdf_sys.rs b/crates/core/src/document/mupdf_sys.rs index 90424cc..c62c52b 100644 --- a/crates/core/src/document/mupdf_sys.rs +++ b/crates/core/src/document/mupdf_sys.rs @@ -3,7 +3,7 @@ use std::mem; pub const FZ_MAX_COLORS: usize = 32; -pub const FZ_VERSION: &str = "1.23.5"; +pub const FZ_VERSION: &str = "1.23.6"; pub const FZ_META_INFO_AUTHOR: &str = "info:Author"; pub const FZ_META_INFO_TITLE: &str = "info:Title"; diff --git a/doc/BUILD.md b/doc/BUILD.md index 4aaa703..624634b 100644 --- a/doc/BUILD.md +++ b/doc/BUILD.md @@ -39,7 +39,7 @@ rustup target add arm-unknown-linux-gnueabihf ## Developer Tools -Install the required dependencies: *MuPDF 1.23.5*, *DjVuLibre*, *FreeType*, *HarfBuzz*. +Install the required dependencies: *MuPDF 1.23.6*, *DjVuLibre*, *FreeType*, *HarfBuzz*. ### Emulator diff --git a/thirdparty/download.sh b/thirdparty/download.sh index 9260205..b068d21 100755 --- a/thirdparty/download.sh +++ b/thirdparty/download.sh @@ -15,7 +15,7 @@ declare -A urls=( # Documents ["gumbo"]="https://github.com/google/gumbo-parser/archive/v0.10.1.tar.gz" ["djvulibre"]="http://downloads.sourceforge.net/djvu/djvulibre-3.5.28.tar.gz" - ["mupdf"]="https://mupdf.com/downloads/archive/mupdf-1.23.5-source.tar.gz" + ["mupdf"]="https://mupdf.com/downloads/archive/mupdf-1.23.6-source.tar.gz" ) for name in "${@:-${!urls[@]}}" ; do diff --git a/thirdparty/mupdf/kobo.patch b/thirdparty/mupdf/kobo.patch index 844db00..deddbcd 100644 --- a/thirdparty/mupdf/kobo.patch +++ b/thirdparty/mupdf/kobo.patch @@ -2,9 +2,9 @@ diff -ru a/Makefile b/Makefile --- a/Makefile 2023-11-14 09:46:57 +++ b/Makefile 2023-11-14 09:47:11 @@ -150,7 +150,7 @@ - + THIRD_GLUT_OBJ := $(THIRD_GLUT_SRC:%.c=$(OUT)/%.o) - + -MUPDF_SRC := $(sort $(wildcard source/fitz/*.c)) +MUPDF_SRC := $(sort $(filter-out source/fitz/output-docx.c, $(wildcard source/fitz/*.c))) MUPDF_SRC += $(sort $(wildcard source/fitz/*.cpp)) @@ -16,7 +16,7 @@ diff -ru a/Makerules b/Makerules @@ -321,6 +321,35 @@ HAVE_WIN32=yes endif - + +ifeq "$(OS)" "kobo" + CC = arm-linux-gnueabihf-gcc + CXX = arm-linux-gnueabihf-g++ @@ -55,13 +55,13 @@ diff -ru a/Makethird b/Makethird @@ -43,10 +43,6 @@ endif endif - + -# --- Include source file lists --- - -include Makelists - # --- FREETYPE 2 --- - + ifeq ($(USE_SYSTEM_FREETYPE),yes) @@ -235,36 +231,3 @@ $(CXX_CMD) $(LIB_CFLAGS) $(TESSERACT_CFLAGS) $(TESSERACT_BUILD_CFLAGS) @@ -103,9 +103,9 @@ diff -ru a/Makethird b/Makethird diff -ru a/source/html/html-parse.c b/source/html/html-parse.c --- a/source/html/html-parse.c 2023-11-14 09:46:58 +++ b/source/html/html-parse.c 2023-11-14 09:59:43 -@@ -1622,13 +1622,13 @@ +@@ -1615,13 +1615,13 @@ } - + static const char *mobi_font_size[7] = { - "8pt", - "10pt", @@ -122,5 +122,5 @@ diff -ru a/source/html/html-parse.c b/source/html/html-parse.c + "1.5em", + "1.67em", }; - + static void -- 2.51.2