!11 Update to 42.3
From: @zhang__3125 Reviewed-by: @dwl301 Signed-off-by: @dwl301
This commit is contained in:
commit
fa6426a41d
@ -1,76 +0,0 @@
|
|||||||
--- 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
Binary file not shown.
11
evince-42-poppler-requirement-decrease.patch
Normal file
11
evince-42-poppler-requirement-decrease.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- evince-42.rc/meson.build
|
||||||
|
+++ evince-42.rc/meson.build
|
||||||
|
@@ -399,7 +399,7 @@ elif get_option('dvi').auto()
|
||||||
|
endif
|
||||||
|
|
||||||
|
# *** PDF ***
|
||||||
|
-poppler_req_version = '>= 22.02.0'
|
||||||
|
+poppler_req_version = '>= 22.01.0'
|
||||||
|
poppler_glib_dep = dependency('poppler-glib', version: poppler_req_version, required: get_option('pdf'))
|
||||||
|
|
||||||
|
libxml_req_version = '>= 2.5.0'
|
||||||
BIN
evince-42.3.tar.xz
Normal file
BIN
evince-42.3.tar.xz
Normal file
Binary file not shown.
77
evince.spec
77
evince.spec
@ -1,22 +1,46 @@
|
|||||||
|
%global __provides_exclude_from ^%{_libdir}/evince/
|
||||||
|
%global __requires_exclude ^(%%(find %{buildroot}%{_libdir}/evince/ -name '*.so' | xargs -n1 basename | sort -u | paste -s -d '|' -))
|
||||||
|
|
||||||
|
%global libarchive_version 3.6.0
|
||||||
|
%global poppler_version 22.01.0
|
||||||
|
|
||||||
Name: evince
|
Name: evince
|
||||||
Version: 3.38.3
|
Version: 42.3
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: Document viewer for multiple document formats
|
Summary: Document viewer for multiple document formats
|
||||||
License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse
|
License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse
|
||||||
URL: https://wiki.gnome.org/Apps/Evince
|
URL: https://wiki.gnome.org/Apps/Evince
|
||||||
Source0: https://download.gnome.org/sources/%{name}/3.38/%{name}-%{version}.tar.xz
|
Source0: https://download.gnome.org/sources/%{name}/42/%{name}-%{version}.tar.xz
|
||||||
Patch0: evince-3.21.4-NPNVToolKit.patch
|
|
||||||
|
|
||||||
BuildRequires: pkgconfig(gio-unix-2.0) >= 2.36.0 pkgconfig(gtk+-x11-3.0) >= 3.16.0 pkgconfig(gnome-desktop-3.0)
|
Patch0: evince-42-poppler-requirement-decrease.patch
|
||||||
BuildRequires: pkgconfig(poppler-glib) >= 0.33.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: meson gcc gcc-c++ gettext-devel libtiff-devel gi-docgen
|
||||||
BuildRequires: pkgconfig(adwaita-icon-theme) pkgconfig(libsecret-1) pkgconfig(libarchive) libappstream-glib-devel
|
BuildRequires: yelp-tools desktop-file-utils libappstream-glib-devel
|
||||||
BuildRequires: pkgconfig(gstreamer-1.0) pkgconfig(gstreamer-base-1.0) pkgconfig(gstreamer-video-1.0) pkgconfig(synctex) >= 1.19
|
BuildRequires: texlive-lib-devel djvulibre-devel
|
||||||
BuildRequires: desktop-file-utils itstool libtool gtk-doc texlive-lib-devel meson djvulibre-devel
|
BuildRequires: pkgconfig(adwaita-icon-theme)
|
||||||
BuildRequires: gnome-common intltool gettext-devel gcc-c++ libtiff-devel yelp-tools gcc
|
BuildRequires: pkgconfig(dbus-1)
|
||||||
|
BuildRequires: pkgconfig(gio-unix-2.0)
|
||||||
|
BuildRequires: pkgconfig(gnome-desktop-3.0)
|
||||||
|
BuildRequires: pkgconfig(gobject-introspection-1.0)
|
||||||
|
BuildRequires: pkgconfig(gspell-1)
|
||||||
|
BuildRequires: pkgconfig(gstreamer-1.0)
|
||||||
|
BuildRequires: pkgconfig(gstreamer-base-1.0)
|
||||||
|
BuildRequires: pkgconfig(gstreamer-video-1.0)
|
||||||
|
BuildRequires: pkgconfig(gtk+-x11-3.0)
|
||||||
|
BuildRequires: pkgconfig(libhandy-1)
|
||||||
|
BuildRequires: pkgconfig(libsecret-1)
|
||||||
|
BuildRequires: pkgconfig(libspectre)
|
||||||
|
BuildRequires: pkgconfig(libxml-2.0)
|
||||||
|
BuildRequires: pkgconfig(synctex)
|
||||||
|
BuildRequires: pkgconfig(libgxps)
|
||||||
|
BuildRequires: pkgconfig(libnautilus-extension)
|
||||||
|
BuildRequires: pkgconfig(poppler-glib) >= %{poppler_version}
|
||||||
|
BuildRequires: pkgconfig(libarchive) >= %{libarchive_version}
|
||||||
|
|
||||||
|
#BuildRequires: itstool libtool gtk-doc gnome-common intltool
|
||||||
Provides: evince-libs evince-dvi evince-nautilus
|
Provides: evince-libs evince-dvi evince-nautilus
|
||||||
Obsoletes: evince-libs evince-dvi evince-nautilus
|
Requires: texlive-collection-fontsrecommended nautilus
|
||||||
Requires: glib2%{?_isa} >= 2.36.0 gtk3%{?_isa} >= 3.22.0 texlive-collection-fontsrecommended nautilus
|
Requires: glib2%{?_isa} >= 2.36.0 gtk3%{?_isa}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Evince is a document viewer for multiple document formats. The goal of evince is to replace the
|
Evince is a document viewer for multiple document formats. The goal of evince is to replace the
|
||||||
@ -26,7 +50,9 @@ PDF, Postscript, djvu, tiff, dvi, XPS, SyncTex support with gedit, comics books
|
|||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Support for developing backends for the evince document viewer
|
Summary: Support for developing backends for the evince document viewer
|
||||||
Requires: %{name}-libs = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Requires: libarchive%{?_isa} >= %{libarchive_version}
|
||||||
|
Requires: poppler-glib%{?_isa} >= %{poppler_version}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
This package contains libraries and header files needed for evince
|
This package contains libraries and header files needed for evince
|
||||||
@ -34,6 +60,7 @@ backend development.
|
|||||||
|
|
||||||
%package help
|
%package help
|
||||||
Summary: Help documents for evince
|
Summary: Help documents for evince
|
||||||
|
|
||||||
%description help
|
%description help
|
||||||
This package contain the help documents for evince.
|
This package contain the help documents for evince.
|
||||||
|
|
||||||
@ -53,9 +80,14 @@ export CFLAGS='-I%{_builddir}/%{name}-%{version}/cut-n-paste/synctex %optflags'
|
|||||||
%meson_install
|
%meson_install
|
||||||
%find_lang evince --with-gnome
|
%find_lang evince --with-gnome
|
||||||
|
|
||||||
|
%delete_la_and_a
|
||||||
install -d $RPM_BUILD_ROOT%{_datadir}/applications
|
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
|
rm -f $RPM_BUILD_ROOT%{_datadir}/metainfo/evince-pdfdocument.metainfo.xml
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_datadir}/metainfo/evince-psdocument.metainfo.xml
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_datadir}/metainfo/evince-tiffdocument.metainfo.xml
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_datadir}/metainfo/evince-comicsdocument.metainfo.xml
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_datadir}/metainfo/evince-xpsdocument.metainfo.xml
|
||||||
|
|
||||||
%check
|
%check
|
||||||
appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_datadir}/metainfo/org.gnome.Evince.appdata.xml
|
appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_datadir}/metainfo/org.gnome.Evince.appdata.xml
|
||||||
@ -65,7 +97,6 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-p
|
|||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
|
||||||
%files -f evince.lang
|
%files -f evince.lang
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
@ -79,18 +110,15 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-p
|
|||||||
%{_datadir}/thumbnailers/evince.thumbnailer
|
%{_datadir}/thumbnailers/evince.thumbnailer
|
||||||
%{_libexecdir}/evinced
|
%{_libexecdir}/evinced
|
||||||
%{_libdir}/*.so.*
|
%{_libdir}/*.so.*
|
||||||
%dir %{_libdir}/evince
|
|
||||||
%dir %{_libdir}/evince/4
|
|
||||||
%dir %{_libdir}/evince/4/backends
|
|
||||||
%{_libdir}/evince/4/backends/*.so
|
%{_libdir}/evince/4/backends/*.so
|
||||||
|
%{_libdir}/evince/4/backends/libdvidocument.so*
|
||||||
%{_libdir}/evince/4/backends/*.evince-backend
|
%{_libdir}/evince/4/backends/*.evince-backend
|
||||||
%{_libdir}/girepository-1.0/*.typelib
|
%{_libdir}/girepository-1.0/*.typelib
|
||||||
%{_datadir}/metainfo/*.metainfo.xml
|
%{_datadir}/metainfo/*.metainfo.xml
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_datadir}/gtk-doc/html/evince/
|
%{_datadir}/doc/libevview
|
||||||
%{_datadir}/gtk-doc/html/libevview-3.0
|
%{_datadir}/doc/libevdocument
|
||||||
%{_datadir}/gtk-doc/html/libevdocument-3.0
|
|
||||||
%dir %{_includedir}/evince
|
%dir %{_includedir}/evince
|
||||||
%{_includedir}/evince/3.0
|
%{_includedir}/evince/3.0
|
||||||
%{_libdir}/*.so
|
%{_libdir}/*.so
|
||||||
@ -101,10 +129,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-p
|
|||||||
%doc NEWS AUTHORS
|
%doc NEWS AUTHORS
|
||||||
%{_mandir}/man1/*.1*
|
%{_mandir}/man1/*.1*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Apr 11 2022 dillon chen <dillon.chen@gmail.com> - 3.38.3-1
|
* Mon Mar 28 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 42.3-1
|
||||||
- Upgrade to 3.38.3
|
- Update to 42.3
|
||||||
|
|
||||||
* Tue Jun 15 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 3.38.2-1
|
* Tue Jun 15 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 3.38.2-1
|
||||||
- Upgrade to 3.38.2
|
- Upgrade to 3.38.2
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
version_control: gitlab.gnome
|
version_control: gitlab.gnome
|
||||||
src_repo: evince
|
src_repo: evince
|
||||||
tag_prefix: ^EVINCE_
|
tag_prefix: ^EVINCE_
|
||||||
seperator: _
|
separator: _
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user