From 67bfc4efc70cfce68c890af18884dc10862f020f Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Tue, 8 Mar 2016 16:35:49 +0100 Subject: [PATCH] Recognize multipage DjVu MIME type Resolves: #1308628 --- evince-3.18.2-multipage-djvu.patch | 45 ++++++++++++++++++++++++++++++ evince.spec | 8 +++++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 evince-3.18.2-multipage-djvu.patch diff --git a/evince-3.18.2-multipage-djvu.patch b/evince-3.18.2-multipage-djvu.patch new file mode 100644 index 0000000..9dd0e6e --- /dev/null +++ b/evince-3.18.2-multipage-djvu.patch @@ -0,0 +1,45 @@ +From 7850b986cf3225369170cdec545844b025bfd12e Mon Sep 17 00:00:00 2001 +From: Marek Kasik +Date: Tue, 16 Feb 2016 11:54:21 +0100 +Subject: [PATCH] Recognize multipage DjVu MIME type + +There is new image/vnd.djvu+multipage MIME type for DjVu documents +in shared-mime-info. +This MIME type is used if Evince has to guess type of the document. +Evince states that it doesn't support it in such case. +This is reproducible if the opened document doesn't have an extension. + +https://bugzilla.gnome.org/show_bug.cgi?id=754467 +--- + browser-plugin/EvBrowserPluginMain.cpp | 1 + + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/browser-plugin/EvBrowserPluginMain.cpp b/browser-plugin/EvBrowserPluginMain.cpp +index fb749f4..a25bb2f 100644 +--- a/browser-plugin/EvBrowserPluginMain.cpp ++++ b/browser-plugin/EvBrowserPluginMain.cpp +@@ -252,6 +252,7 @@ static const struct { + { "application/x-cbt", "cbt" }, + { "application/x-ext-cbt", "cbt" }, + { "image/vnd.djvu", "djvu,djv" }, ++ { "image/vnd.djvu+multipage", "djvu,djv" }, + { "application/x-ext-djv", "djv" }, + { "application/x-ext-djvu", "djvu" }, + { "application/oxps", "xps,oxps" }, +diff --git a/configure.ac b/configure.ac +index e85e820..318cb70 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -756,7 +756,7 @@ AC_SUBST(DVI_MIME_TYPES) + AC_SUBST(APPDATA_DVI_MIME_TYPES) + AM_SUBST_NOTMAKE(APPDATA_DVI_MIME_TYPES) + if test "x$enable_djvu" = "xyes"; then +- DJVU_MIME_TYPES="image/vnd.djvu;application/x-ext-djv;application/x-ext-djvu" ++ DJVU_MIME_TYPES="image/vnd.djvu;image/vnd.djvu+multipage;application/x-ext-djv;application/x-ext-djvu" + APPDATA_DJVU_MIME_TYPES=$(echo "$DJVU_MIME_TYPES" | sed -e 's/;/<\/mimetype>\n /g') + if test -z "$EVINCE_MIME_TYPES"; then + EVINCE_MIME_TYPES="${DJVU_MIME_TYPES}" +-- +2.5.0 + diff --git a/evince.spec b/evince.spec index 1adef98..db0fe11 100644 --- a/evince.spec +++ b/evince.spec @@ -5,7 +5,7 @@ Name: evince Version: 3.18.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Document viewer License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse @@ -15,6 +15,7 @@ Source0: http://download.gnome.org/sources/%{name}/3.18/%{name}-%{version Patch1: evince-3.17.2-check-to-avoid-crash.patch Patch2: evince-3.18.2-symbolic-app-icon.patch Patch3: evince-3.18.2-text-selection.patch +Patch4: evince-3.18.2-multipage-djvu.patch BuildRequires: pkgconfig(adwaita-icon-theme) BuildRequires: pkgconfig(gio-unix-2.0) >= %{glib2_version} @@ -126,6 +127,7 @@ This package contains the evince web browser plugin. %patch1 -p1 -b .check-to-avoid-crash %patch2 -p1 -b .symbolic-app-icon %patch3 -p1 -b .text-selection +%patch4 -p1 -b .multipage-djvu %build ./autogen.sh @@ -268,6 +270,10 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null ||: %{_libdir}/mozilla/plugins/libevbrowserplugin.so %changelog +* Tue Mar 8 2016 Marek Kasik - 3.18.2-5 +- Recognize multipage DjVu MIME type +- Resolves: #1308628 + * Wed Feb 03 2016 Fedora Release Engineering - 3.18.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild