Browse Source

evince package update

Signed-off-by: guibuilder_pel7x64builder0 <guibuilder@powerel.org>
master
guibuilder_pel7x64builder0 6 years ago
parent
commit
c5fe123f32
  1. 86
      SOURCES/0001-Resolves-deb-762530-rhbz-1061177-add-man-pages.patch
  2. 18
      SOURCES/0001-Resolves-rhbz-1358249-page-up-down.patch
  3. 55
      SOURCES/0001-Revert-Bump-poppler-requirements-to-0.33.0.patch
  4. 76
      SOURCES/evince-3.21.4-NPNVToolKit.patch
  5. 36
      SOURCES/evince-3.28.2-application-id.patch
  6. 40
      SOURCES/evince-3.28.2-libarchive-3.1.2.patch
  7. 58
      SOURCES/evince-3.28.2-media-player-keys.patch
  8. 40
      SOURCES/evince-3.28.2-signed-size.patch
  9. 1355
      SPECS/evince.spec

86
SOURCES/0001-Resolves-deb-762530-rhbz-1061177-add-man-pages.patch

@ -0,0 +1,86 @@ @@ -0,0 +1,86 @@
From 8e20f99f5d73175112b37203ba127519db90aff0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 10 Jan 2017 15:10:44 +0000
Subject: [PATCH] Resolves: deb#762530 rhbz#1061177 add man pages

for evince-previewer and evince-thumbnailer
---
data/Makefile.am | 2 +-
data/evince-previewer.1 | 24 ++++++++++++++++++++++++
data/evince-thumbnailer.1 | 20 ++++++++++++++++++++
3 files changed, 45 insertions(+), 1 deletion(-)
create mode 100644 data/evince-previewer.1
create mode 100644 data/evince-thumbnailer.1

diff --git a/data/Makefile.am b/data/Makefile.am
index 44fcf33..a45a3cb 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -7,7 +7,7 @@ install-data-local: update-icon-cache
# man file
#
-man_MANS=evince.1
+man_MANS=evince.1 evince-previewer.1 evince-thumbnailer.1
#
# UI descriptions
diff --git a/data/evince-previewer.1 b/data/evince-previewer.1
new file mode 100644
index 0000000..1841509
--- /dev/null
+++ b/data/evince-previewer.1
@@ -0,0 +1,24 @@
+.TH evince\-previewer 1 2015\-07\-28
+.SH NAME
+evince\-previewer \- show a printing preview of PostScript and PDF documents
+.SH SYNOPSIS
+\fBevince\-previewer\fR [options] \fBinput\fR
+.SH DESCRIPTION
+evince\-previewer is a GNOME program to
+show a printing preview from PostScript (PS), Portable Document Format
+(PDF), DjVu and DVI files.
+.SH OPTIONS
+evince\-previewer obeys all normal GNOME and GTK+ command line options.
+The application options are
+.TP
+\fB\-u, \-\-unlink\-tempfile\fR
+Delete the temporary file
+.TP
+\fB\-p, \-\-print-settings=FILE\fR
+Print settings file
+.SH "SEE ALSO"
+\fBevince\fR(1),
+\fBgnome\-options\fR(7),
+\fBgtk\-options\fR(7).
+.PP
+https://wiki.gnome.org/Apps/Evince
diff --git a/data/evince-thumbnailer.1 b/data/evince-thumbnailer.1
new file mode 100644
index 0000000..25ddfec
--- /dev/null
+++ b/data/evince-thumbnailer.1
@@ -0,0 +1,20 @@
+.TH evince\-thumbnailer 1 2007\-01\-15
+.SH NAME
+evince\-thumbnailer \- create png thumbnails from PostScript and PDF documents
+.SH SYNOPSIS
+\fBevince\-thumbnailer\fR [\-s \fBsize\fR] \fBinput\fR \fBoutput\fR
+.SH DESCRIPTION
+evince\-thumbnailer is a GNOME program to
+create thumbnails from PostScript (PS), Portable Document Format
+(PDF), DjVu and DVI files.
+.SH OPTIONS
+evince obeys all normal GNOME and GTK+
+command line options. The only option \-s \fIsize
+\fRmakes it possible to choose the vertical size
+of the created thumbnail.
+.SH "SEE ALSO"
+\fBevince\fR(1),
+\fBgnome\-options\fR(7),
+\fBgtk\-options\fR(7).
+.PP
+http://www.gnome.org/projects/evince/
--
2.9.3

18
SOURCES/0001-Resolves-rhbz-1358249-page-up-down.patch

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
@@ -, +, @@
---
shell/ev-application.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/shell/ev-application.c
+++ a/shell/ev-application.c
@@ -1044,8 +1044,8 @@ ev_application_startup (GApplication *gapplication)
"win.select-page", "<Ctrl>L", NULL,
"win.go-backwards", "<Shift>Page_Up", NULL,
"win.go-forward", "<Shift>Page_Down", NULL,
- "win.go-next-page", "n", NULL,
- "win.go-previous-page", "p", NULL,
+ "win.go-next-page", "n", "<Ctrl>Page_Down", NULL,
+ "win.go-previous-page", "p", "<Ctrl>Page_Up", NULL,
"win.go-back-history", "<alt>P", "Back", NULL,
"win.go-forward-history", "<alt>N", "Forward", NULL,
"win.sizing-mode::fit-page", "f", NULL,
--

55
SOURCES/0001-Revert-Bump-poppler-requirements-to-0.33.0.patch

@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
From 22b047c3db84a34fc5fb5076474640bcd3917c73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 17 Feb 2017 09:28:18 +0000
Subject: [PATCH] Revert "Bump poppler requirements to 0.33.0"

This reverts commit 5a4912bdbbf3c8000e77a093cf366276eeb56283.
---
backend/pdf/ev-poppler.cc | 4 ++++
configure.ac | 7 ++++++-
2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
index 214094f..f3a6510 100644
--- a/backend/pdf/ev-poppler.cc
+++ b/backend/pdf/ev-poppler.cc
@@ -3508,7 +3508,11 @@ pdf_document_annotations_save_annotation (EvDocumentAnnotations *document_annota
poppler_rect.y2 = height - ev_rect.y1;
if (poppler_annot_markup_has_popup (markup))
+#ifdef HAVE_POPPLER_ANNOT_MARKUP_SET_POPUP_RECTANGLE
poppler_annot_markup_set_popup_rectangle (markup, &poppler_rect);
+#else
+ poppler_annot_markup_set_popup (markup, &poppler_rect);
+#endif
else
poppler_annot_markup_set_popup (markup, &poppler_rect);
}
diff --git a/configure.ac b/configure.ac
index 23a390f..a01392a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -536,7 +536,7 @@ AC_ARG_ENABLE([pdf],
[enable_pdf=yes])
if test "x$enable_pdf" = "xyes"; then
- POPPLER_REQUIRED=0.33.0
+ POPPLER_REQUIRED=0.24.0
PKG_CHECK_MODULES(POPPLER, poppler-glib >= $POPPLER_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED,enable_pdf=yes,enable_pdf=no)
if test "x$enable_pdf" = "xyes"; then
@@ -549,6 +549,11 @@ if test "x$enable_pdf" = "xyes"; then
if test x$enable_cairo_ps = xyes; then
AC_DEFINE([HAVE_CAIRO_PS], [1], [defined if cairo-ps is available])
fi
+
+ evince_save_LIBS=$LIBS
+ LIBS="$LIBS $POPPLER_LIBS"
+ AC_CHECK_FUNCS(poppler_annot_markup_set_popup_rectangle)
+ LIBS=$evince_save_LIBS
else
AC_MSG_ERROR("PDF support is disabled since poppler-glib library version $POPPLER_REQUIRED or newer not found")
fi
--
2.9.3

76
SOURCES/evince-3.21.4-NPNVToolKit.patch

@ -0,0 +1,76 @@ @@ -0,0 +1,76 @@
--- evince-3.21.92/browser-plugin/EvBrowserPluginMain.cpp
+++ evince-3.21.92/browser-plugin/EvBrowserPluginMain.cpp
@@ -38,11 +38,40 @@ static EvBrowserPlugin *pluginForInstanc
return static_cast<EvBrowserPlugin *>(instance->pdata);
}
+static gboolean gtkToolkitIsCompatible(NPP instance)
+{
+ NPNToolkitType toolkit_type = NPNVGtk12;
+ NPError error;
+
+ error = browser->getvalue(instance, NPNVToolkit, &toolkit_type);
+
+ if (error == NPERR_NO_ERROR &&
+ (toolkit_type == NPNVGtk12 ||
+ toolkit_type == NPNVGtk2))
+ return FALSE;
+ else
+ return TRUE;
+}
+
NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *savedData)
{
if (!instance)
return NPERR_INVALID_INSTANCE_ERROR;
+ if (!gtkToolkitIsCompatible(instance))
+ return NPERR_GENERIC_ERROR;
+
+ GBytes *resourceData = g_resources_lookup_data("/org/gnome/evince/browser/ui/evince-browser.css", G_RESOURCE_LOOKUP_FLAGS_NONE, nullptr);
+ if (resourceData) {
+ GtkCssProvider *cssProvider = gtk_css_provider_new();
+
+ gtk_css_provider_load_from_data(cssProvider, static_cast<const gchar *>(g_bytes_get_data(resourceData, nullptr)), g_bytes_get_size(resourceData), nullptr);
+ g_bytes_unref(resourceData);
+
+ gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), GTK_STYLE_PROVIDER(cssProvider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref(cssProvider);
+ }
+
return EvBrowserPlugin::create(instance)->initialize(pluginType, mode, argc, argn, argv, savedData);
}
@@ -197,6 +226,11 @@ NPError NP_Initialize(NPNetscapeFuncs *b
if ((browserFuncs->version >> 8) > NP_VERSION_MAJOR)
return NPERR_INCOMPATIBLE_VERSION_ERROR;
+ browser = browserFuncs;
+
+ if (!gtkToolkitIsCompatible(NULL))
+ return NPERR_GENERIC_ERROR;
+
if (!ev_init())
return NPERR_GENERIC_ERROR;
@@ -207,20 +241,8 @@ NPError NP_Initialize(NPNetscapeFuncs *b
return NPERR_GENERIC_ERROR;
#endif
- browser = browserFuncs;
initializePluginFuncs(pluginFuncs);
- GBytes *resourceData = g_resources_lookup_data("/org/gnome/evince/browser/ui/evince-browser.css", G_RESOURCE_LOOKUP_FLAGS_NONE, nullptr);
- if (resourceData) {
- GtkCssProvider *cssProvider = gtk_css_provider_new();
-
- gtk_css_provider_load_from_data(cssProvider, static_cast<const gchar *>(g_bytes_get_data(resourceData, nullptr)), g_bytes_get_size(resourceData), nullptr);
- g_bytes_unref(resourceData);
-
- gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), GTK_STYLE_PROVIDER(cssProvider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- g_object_unref(cssProvider);
- }
-
return NPERR_NO_ERROR;
}

36
SOURCES/evince-3.28.2-application-id.patch

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
From 9363553a3087c7dbfa93e1d342283600ceb5993b Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Fri, 22 Jun 2018 17:00:20 +0200
Subject: shell: Set application-id

Set "application-id" property for evince's GApplication
to "org.gnome.evince.Application".
An assertion warning is shown in shell if it is not set.

Even though we use G_APPLICATION_NON_UNIQUE, the application
ID is still required. See:
https://bugzilla.gnome.org/show_bug.cgi?id=646985#c2

Closes: https://gitlab.gnome.org/GNOME/evince/issues/918

diff --git a/shell/ev-application.c b/shell/ev-application.c
index 7d546933..f173d7a4 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -65,6 +65,7 @@ struct _EvApplicationClass {
G_DEFINE_TYPE (EvApplication, ev_application, GTK_TYPE_APPLICATION)
#ifdef ENABLE_DBUS
+#define APPLICATION_DBUS_NAME "org.gnome.evince.Application"
#define APPLICATION_DBUS_OBJECT_PATH "/org/gnome/evince/Evince"
#define APPLICATION_DBUS_INTERFACE "org.gnome.evince.Application"
@@ -102,7 +103,7 @@ ev_application_new (void)
const GApplicationFlags flags = G_APPLICATION_NON_UNIQUE;
return g_object_new (EV_TYPE_APPLICATION,
- "application-id", NULL,
+ "application-id", APPLICATION_DBUS_NAME,
"flags", flags,
NULL);
}

40
SOURCES/evince-3.28.2-libarchive-3.1.2.patch

@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
--- evince-3.28.2/backend/comics/ev-archive.c
+++ evince-3.28.2/backend/comics/ev-archive.c
@@ -55,7 +55,7 @@ ev_archive_finalize (GObject *object)
case EV_ARCHIVE_TYPE_ZIP:
case EV_ARCHIVE_TYPE_7Z:
case EV_ARCHIVE_TYPE_TAR:
- g_clear_pointer (&archive->libar, archive_free);
+ g_clear_pointer (&archive->libar, archive_read_free);
break;
default:
break;
@@ -278,7 +278,7 @@ ev_archive_get_entry_is_encrypted (EvArc
case EV_ARCHIVE_TYPE_7Z:
case EV_ARCHIVE_TYPE_TAR:
g_return_val_if_fail (archive->libar_entry != NULL, -1);
- return archive_entry_is_encrypted (archive->libar_entry);
+ return FALSE;
}
return FALSE;
@@ -336,7 +343,7 @@ ev_archive_reset (EvArchive *archive)
case EV_ARCHIVE_TYPE_ZIP:
case EV_ARCHIVE_TYPE_7Z:
case EV_ARCHIVE_TYPE_TAR:
- g_clear_pointer (&archive->libar, archive_free);
+ g_clear_pointer (&archive->libar, archive_read_free);
libarchive_set_archive_type (archive, archive->type);
break;
default:
--- evince-3.28.2/configure.ac
+++ evince-3.28.2/configure.ac
@@ -698,7 +698,7 @@ AC_ARG_ENABLE(comics,
[enable_comics=yes])
if test "x$enable_comics" = "xyes"; then
- LIBARCHIVE_REQUIRED=3.2.0
+ LIBARCHIVE_REQUIRED=3.1.2
PKG_CHECK_MODULES(LIBARCHIVE, libarchive >= $LIBARCHIVE_REQUIRED,enable_comics=yes,enable_comics=no)
if test "x$enable_comics" = "xyes"; then

58
SOURCES/evince-3.28.2-media-player-keys.patch

@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
--- a/shell/ev-media-player-keys.c
+++ b/shell/ev-media-player-keys.c
@@ -41,8 +41,9 @@ struct _EvMediaPlayerKeys
{
GObject parent;
- GDBusProxy *proxy;
- gboolean has_name_owner;
+ GDBusProxy *proxy;
+ gboolean has_name_owner;
+ GCancellable *cancellable;
};
struct _EvMediaPlayerKeysClass
@@ -163,7 +164,7 @@ mediakeys_service_appeared_cb (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
- EvMediaPlayerKeys *keys = EV_MEDIA_PLAYER_KEYS (user_data);
+ EvMediaPlayerKeys *keys;
GDBusProxy *proxy;
proxy = g_dbus_proxy_new_for_bus_finish (res, NULL);
@@ -172,6 +173,7 @@ mediakeys_service_appeared_cb (GObject *source_object,
return;
}
+ keys = EV_MEDIA_PLAYER_KEYS (user_data);
g_signal_connect (proxy, "g-signal",
G_CALLBACK (media_player_key_pressed_cb),
keys);
@@ -187,13 +189,15 @@ mediakeys_service_appeared_cb (GObject *source_object,
static void
ev_media_player_keys_init (EvMediaPlayerKeys *keys)
{
+ keys->cancellable = g_cancellable_new ();
+
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
NULL,
SD_NAME,
SD_OBJECT_PATH,
SD_INTERFACE,
- NULL,
+ keys->cancellable,
mediakeys_service_appeared_cb,
keys);
}
@@ -212,6 +216,9 @@ ev_media_player_keys_finalize (GObject *object)
{
EvMediaPlayerKeys *keys = EV_MEDIA_PLAYER_KEYS (object);
+ g_cancellable_cancel (keys->cancellable);
+ g_object_unref (keys->cancellable);
+
if (keys->proxy != NULL) {
ev_media_player_keys_release_keys (keys);
g_object_unref (keys->proxy);

40
SOURCES/evince-3.28.2-signed-size.patch

@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
--- evince-3.28.2/backend/comics/comics-document.c
+++ evince-3.28.2/backend/comics/comics-document.c
@@ -453,23 +453,27 @@ comics_document_render_pixbuf (EvDocumen
name = ev_archive_get_entry_pathname (comics_document->archive);
if (g_strcmp0 (name, page_path) == 0) {
- size_t size = ev_archive_get_entry_size (comics_document->archive);
+ gint64 size = ev_archive_get_entry_size (comics_document->archive);
char *buf;
ssize_t read;
- buf = g_malloc (size);
- read = ev_archive_read_data (comics_document->archive, buf, size, &error);
- if (read <= 0) {
- if (read < 0) {
- g_warning ("Fatal error reading '%s' in archive: %s", name, error->message);
- g_error_free (error);
+ if (size >= 0) {
+ buf = g_malloc (size);
+ read = ev_archive_read_data (comics_document->archive, buf, size, &error);
+ if (read <= 0) {
+ if (read < 0) {
+ g_warning ("Fatal error reading '%s' in archive: %s", name, error->message);
+ g_error_free (error);
+ } else {
+ g_warning ("Read an empty file from the archive");
+ }
} else {
- g_warning ("Read an empty file from the archive");
+ gdk_pixbuf_loader_write (loader, (guchar *) buf, size, NULL);
}
+ g_free (buf);
} else {
- gdk_pixbuf_loader_write (loader, (guchar *) buf, size, NULL);
+ g_warning ("Fatal error reading '%s' in archive", name);
}
- g_free (buf);
gdk_pixbuf_loader_close (loader, NULL);
break;
}

1355
SPECS/evince.spec

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save