From 8de659cbb4bf5141993de34761eaccffbd9c8083 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Tue, 12 Oct 2021 11:43:17 +0200 Subject: [PATCH] rebuild for mupdf 1.19.0 Also, enable OCR with the leptonica/tesseract engine. --- ...tesseract-leptonica-for-mupdf-1.19.0.patch | 36 +++++++++++++++++++ zathura-pdf-mupdf.spec | 10 ++++-- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 0001-link-against-tesseract-leptonica-for-mupdf-1.19.0.patch diff --git a/0001-link-against-tesseract-leptonica-for-mupdf-1.19.0.patch b/0001-link-against-tesseract-leptonica-for-mupdf-1.19.0.patch new file mode 100644 index 0000000..57bd731 --- /dev/null +++ b/0001-link-against-tesseract-leptonica-for-mupdf-1.19.0.patch @@ -0,0 +1,36 @@ +From 3547a91391e7c96145d752ffcd3c3dd7655fef21 Mon Sep 17 00:00:00 2001 +Message-Id: <3547a91391e7c96145d752ffcd3c3dd7655fef21.1635089223.git.mjg@fedoraproject.org> +From: Michael J Gruber +Date: Sun, 24 Oct 2021 17:15:12 +0200 +Subject: [PATCH] link against tesseract/leptonica for mupdf 1.19.0 + +Signed-off-by: Michael J Gruber +--- + meson.build | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 28373c4..d60cb76 100644 +--- a/meson.build ++++ b/meson.build +@@ -36,12 +36,16 @@ if get_option('link-external') + libjbig2dec = cc.find_library('jbig2dec') + libopenjp2 = dependency('libopenjp2') + gumbo = dependency('gumbo') ++ tesseract = dependency('tesseract') ++ leptonica = dependency('lept') + + build_dependencies += [ + libjpeg, + libjbig2dec, + libopenjp2, +- gumbo ++ gumbo, ++ tesseract, ++ leptonica + ] + endif + +-- +2.33.1.1061.g4ab8308fcf + diff --git a/zathura-pdf-mupdf.spec b/zathura-pdf-mupdf.spec index 020144d..c994dd6 100644 --- a/zathura-pdf-mupdf.spec +++ b/zathura-pdf-mupdf.spec @@ -6,11 +6,12 @@ Name: zathura-pdf-mupdf Version: 0.3.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: PDF support for zathura via mupdf License: zlib URL: https://pwmt.org/projects/%{name}/ Source0: %{url}/download/%{name}-%{version}.tar.xz +Patch1: 0001-link-against-tesseract-leptonica-for-mupdf-1.19.0.patch BuildRequires: binutils BuildRequires: cairo-devel # Needed to validate the desktop file @@ -26,6 +27,8 @@ BuildRequires: mupdf-static >= 1.17 BuildRequires: openjpeg2-devel BuildRequires: zathura-devel >= 0.3.9 BuildRequires: gumbo-parser-devel +BuildRequires: leptonica-devel +BuildRequires: tesseract-devel Requires: zathura >= 0.3.9 # Depend on exact versions like mupdf does # https://src.fedoraproject.org/rpms/mupdf/c/02d93ee0f097415aa095ffcea4d768e5f43fac91?branch=master @@ -40,7 +43,7 @@ Conflicts: zathura-pdf-poppler < 0.2.9 This plugin adds PDF support to zathura using the mupdf rendering engine. %prep -%autosetup +%autosetup -p1 %build %meson -Dlink-external=true @@ -63,6 +66,9 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainf %{_datadir}/metainfo/org.pwmt.zathura-pdf-mupdf.metainfo.xml %changelog +* Tue Oct 12 2021 Michael J Gruber - 0.3.7-2 +- rebuild for mupdf 1.19.0 + * Sat Aug 28 2021 Ankur Sinha - 0.3.7-1 - merge PR from @mjg manually: https://src.fedoraproject.org/rpms/zathura-pdf-mupdf/pull-request/10# - Update to 0.3.7 (bz #1982324)