commit
ecf2fc4e33
86
0001-Resolves-deb-762530-rhbz-1061177-add-man-pages.patch
Normal file
86
0001-Resolves-deb-762530-rhbz-1061177-add-man-pages.patch
Normal file
@ -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
|
||||
|
||||
76
evince-3.21.4-NPNVToolKit.patch
Normal file
76
evince-3.21.4-NPNVToolKit.patch
Normal file
@ -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;
|
||||
}
|
||||
|
||||
BIN
evince-3.30.1.tar.xz
Normal file
BIN
evince-3.30.1.tar.xz
Normal file
Binary file not shown.
106
evince.spec
Normal file
106
evince.spec
Normal file
@ -0,0 +1,106 @@
|
||||
Name: evince
|
||||
Version: 3.30.1
|
||||
Release: 3
|
||||
Summary: Document viewer for multiple document formats
|
||||
License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse
|
||||
URL: https://wiki.gnome.org/Apps/Evince
|
||||
Source0: https://download.gnome.org/sources/%{name}/3.30/%{name}-%{version}.tar.xz
|
||||
Patch0: evince-3.21.4-NPNVToolKit.patch
|
||||
Patch1: 0001-Resolves-deb-762530-rhbz-1061177-add-man-pages.patch
|
||||
|
||||
BuildRequires: pkgconfig(gio-unix-2.0) >= 2.36.0 pkgconfig(gtk+-x11-3.0) >= 3.16.0 pkgconfig(gnome-desktop-3.0)
|
||||
BuildRequires: pkgconfig(poppler-glib) >= 0.24.0 pkgconfig(libgxps) >= 0.2.1 pkgconfig(gobject-introspection-1.0)
|
||||
BuildRequires: pkgconfig(libnautilus-extension) pkgconfig(libxml-2.0) pkgconfig(gspell-1) pkgconfig(libspectre)
|
||||
BuildRequires: pkgconfig(adwaita-icon-theme) pkgconfig(libsecret-1) pkgconfig(libarchive) libappstream-glib
|
||||
BuildRequires: desktop-file-utils itstool libtool gtk-doc texlive-lib-devel
|
||||
BuildRequires: gnome-common intltool gettext gcc-c++ libtiff-devel yelp-tools
|
||||
Provides: evince-libs evince-dvi evince-nautilus
|
||||
Obsoletes: evince-libs evince-dvi evince-nautilus
|
||||
Requires: glib2%{?_isa} >= 2.36.0 gtk3%{?_isa} >= 3.16.0 texlive-collection-fontsrecommended nautilus
|
||||
|
||||
%description
|
||||
Evince is a document viewer for multiple document formats. The goal of evince is to replace the
|
||||
multiple document viewers that exist on the GNOME Desktop with a single simple application.
|
||||
Evince is specifically designed to support the file following formats:
|
||||
PDF, Postscript, djvu, tiff, dvi, XPS, SyncTex support with gedit, comics books (cbr,cbz,cb7 and cbt).
|
||||
|
||||
%package devel
|
||||
Summary: Support for developing backends for the evince document viewer
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
This package contains libraries and header files needed for evince
|
||||
backend development.
|
||||
|
||||
%package help
|
||||
Summary: Help documents for evince
|
||||
%description
|
||||
This package contain the help documents for evince.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
%build
|
||||
export SYNCTEX_CFLAGS=-I/usr/include/synctex
|
||||
autoreconf -f -i
|
||||
%configure --disable-static --enable-introspection --enable-comics=yes --enable-dvi=yes \
|
||||
--enable-libgnome-desktop --enable-xps=yes --enable-t1lib=no --enable-ps=yes
|
||||
%make_build V=1 LIBTOOL=/usr/bin/libtool
|
||||
|
||||
%install
|
||||
%make_install
|
||||
%find_lang evince --with-gnome
|
||||
|
||||
install -d $RPM_BUILD_ROOT%{_datadir}/applications
|
||||
find $RPM_BUILD_ROOT%{_libdir} -type f -name '*.la' -print -delete
|
||||
find $RPM_BUILD_ROOT%{_libdir} -type f -name '*.a' -print -delete
|
||||
|
||||
%check
|
||||
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince.desktop
|
||||
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-previewer.desktop
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
|
||||
%files -f evince.lang
|
||||
%license COPYING
|
||||
%{_bindir}/*
|
||||
%{_datadir}/%{name}/
|
||||
%{_datadir}/applications/*.desktop
|
||||
%{_datadir}/icons/hicolor/*/apps/org.gnome.Evince*
|
||||
%{_datadir}/dbus-1/services/org.gnome.evince.Daemon.service
|
||||
%{_datadir}/glib-2.0/schemas/org.gnome.Evince.gschema.xml
|
||||
%{_datadir}/GConf/gsettings/evince.convert
|
||||
%{_datadir}/metainfo/org.gnome.Evince.appdata.xml
|
||||
%{_datadir}/thumbnailers/evince.thumbnailer
|
||||
%{_libexecdir}/evinced
|
||||
%{_userunitdir}/org.gnome.Evince.service
|
||||
%{_libdir}/*.so.*
|
||||
%dir %{_libdir}/evince
|
||||
%dir %{_libdir}/evince/4
|
||||
%dir %{_libdir}/evince/4/backends
|
||||
%{_libdir}/evince/4/backends/*.so
|
||||
%{_libdir}/evince/4/backends/*.evince-backend
|
||||
%{_libdir}/nautilus/extensions-3.0/libevince-properties-page.so
|
||||
%{_libdir}/girepository-1.0/*.typelib
|
||||
%{_datadir}/metainfo/*.metainfo.xml
|
||||
|
||||
%files devel
|
||||
%{_datadir}/gtk-doc/html/evince/
|
||||
%{_datadir}/gtk-doc/html/libevview-3.0
|
||||
%{_datadir}/gtk-doc/html/libevdocument-3.0
|
||||
%dir %{_includedir}/evince
|
||||
%{_includedir}/evince/3.0
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%{_datadir}/gir-1.0/*.gir
|
||||
|
||||
%files help
|
||||
%doc NEWS AUTHORS
|
||||
%{_mandir}/man1/*.1*
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Dec 2 2019 chenzhenyu <chenzhenyu13@huawei.com> - 3.30.1-3
|
||||
- Package init
|
||||
Loading…
x
Reference in New Issue
Block a user