diff options
author | Pavel Vinogradov | 2019-07-24 13:39:10 -0400 |
---|---|---|
committer | Pavel Vinogradov | 2019-07-24 13:39:55 -0400 |
commit | cf8808817db0f1a2ca872c180d33dbf19e4eb15e (patch) | |
tree | aba2ced9e27eca5a8dc30c8cd040ab3529569fc4 /doc | |
parent | 3eb9f4109b37c647f94cabf2caf58d4b3be3cef0 (diff) |
doc/zathura-pdf-mupdf: fixed building with mupdf >= 1.16.x
Diffstat (limited to 'doc')
-rw-r--r-- | doc/zathura-pdf-mupdf/HISTORY | 3 | ||||
-rwxr-xr-x | doc/zathura-pdf-mupdf/PRE_BUILD | 8 | ||||
-rw-r--r-- | doc/zathura-pdf-mupdf/patches/search.patch | 12 |
3 files changed, 23 insertions, 0 deletions
diff --git a/doc/zathura-pdf-mupdf/HISTORY b/doc/zathura-pdf-mupdf/HISTORY index 9f8119dd6a..45e8a82e06 100644 --- a/doc/zathura-pdf-mupdf/HISTORY +++ b/doc/zathura-pdf-mupdf/HISTORY @@ -1,3 +1,6 @@ +2019-07-24 Pavel Vinogradov <public@sourcemage.org> + * PRE_BUILD, patches/search.patch: added to build with mupdf >= 1.16.x + 2018-10-07 Pavel Vinogradov <public@sourcemage.org> * DETAILS: version 0.3.4 * PRE_BUILD, patches/mupdf-1.14.0.patch: removed, fixed by upstream diff --git a/doc/zathura-pdf-mupdf/PRE_BUILD b/doc/zathura-pdf-mupdf/PRE_BUILD new file mode 100755 index 0000000000..7afd156c4c --- /dev/null +++ b/doc/zathura-pdf-mupdf/PRE_BUILD @@ -0,0 +1,8 @@ +default_pre_build && +cd "${SOURCE_DIRECTORY}" && + +# for MyPDF >= 1.16.x +local MUPDF_BRANCH="$(installed_version mupdf | cut -d. -f1,2)" && +if is_version_less "1.15" "${MUPDF_BRANCH}"; then + apply_patch_dir patches +fi diff --git a/doc/zathura-pdf-mupdf/patches/search.patch b/doc/zathura-pdf-mupdf/patches/search.patch new file mode 100644 index 0000000000..1c0f7b519f --- /dev/null +++ b/doc/zathura-pdf-mupdf/patches/search.patch @@ -0,0 +1,12 @@ +diff --git a/zathura-pdf-mupdf/search.c b/zathura-pdf-mupdf/search.c +--- a/zathura-pdf-mupdf/search.c ++++ b/zathura-pdf-mupdf/search.c +@@ -39,7 +39,7 @@ + mupdf_page_extract_text(mupdf_document, mupdf_page); + } + +- fz_quad* hit_bbox = fz_malloc_array(mupdf_page->ctx, N_SEARCH_RESULTS, sizeof(fz_quad)); ++ fz_quad* hit_bbox = fz_malloc_array(mupdf_page->ctx, N_SEARCH_RESULTS, fz_quad); + int num_results = fz_search_stext_page(mupdf_page->ctx, mupdf_page->text, + text, hit_bbox, N_SEARCH_RESULTS); + |