diff --git a/evince-3.21.4-NPNVToolKit.patch b/evince-3.21.4-NPNVToolKit.patch deleted file mode 100644 index 7a8b5a5..0000000 --- a/evince-3.21.4-NPNVToolKit.patch +++ /dev/null @@ -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(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(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(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; - } - diff --git a/evince-3.38.3.tar.xz b/evince-3.38.3.tar.xz deleted file mode 100644 index a36d2c5..0000000 Binary files a/evince-3.38.3.tar.xz and /dev/null differ diff --git a/evince-42-poppler-requirement-decrease.patch b/evince-42-poppler-requirement-decrease.patch new file mode 100644 index 0000000..fd2eb3d --- /dev/null +++ b/evince-42-poppler-requirement-decrease.patch @@ -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' diff --git a/evince-42.3.tar.xz b/evince-42.3.tar.xz new file mode 100644 index 0000000..0ce8a32 Binary files /dev/null and b/evince-42.3.tar.xz differ diff --git a/evince.spec b/evince.spec index 49b3040..9f6a009 100644 --- a/evince.spec +++ b/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 -Version: 3.38.3 +Version: 42.3 Release: 1 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.38/%{name}-%{version}.tar.xz -Patch0: evince-3.21.4-NPNVToolKit.patch +Source0: https://download.gnome.org/sources/%{name}/42/%{name}-%{version}.tar.xz -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.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: pkgconfig(adwaita-icon-theme) pkgconfig(libsecret-1) pkgconfig(libarchive) libappstream-glib-devel -BuildRequires: pkgconfig(gstreamer-1.0) pkgconfig(gstreamer-base-1.0) pkgconfig(gstreamer-video-1.0) pkgconfig(synctex) >= 1.19 -BuildRequires: desktop-file-utils itstool libtool gtk-doc texlive-lib-devel meson djvulibre-devel -BuildRequires: gnome-common intltool gettext-devel gcc-c++ libtiff-devel yelp-tools gcc +Patch0: evince-42-poppler-requirement-decrease.patch + +BuildRequires: meson gcc gcc-c++ gettext-devel libtiff-devel gi-docgen +BuildRequires: yelp-tools desktop-file-utils libappstream-glib-devel +BuildRequires: texlive-lib-devel djvulibre-devel +BuildRequires: pkgconfig(adwaita-icon-theme) +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 -Obsoletes: evince-libs evince-dvi evince-nautilus -Requires: glib2%{?_isa} >= 2.36.0 gtk3%{?_isa} >= 3.22.0 texlive-collection-fontsrecommended nautilus +Requires: texlive-collection-fontsrecommended nautilus +Requires: glib2%{?_isa} >= 2.36.0 gtk3%{?_isa} %description 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 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 This package contains libraries and header files needed for evince @@ -34,6 +60,7 @@ backend development. %package help Summary: Help documents for evince + %description help 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 %find_lang evince --with-gnome +%delete_la_and_a 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 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 %postun -p /sbin/ldconfig - %files -f evince.lang %license COPYING %{_bindir}/* @@ -79,18 +110,15 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-p %{_datadir}/thumbnailers/evince.thumbnailer %{_libexecdir}/evinced %{_libdir}/*.so.* -%dir %{_libdir}/evince -%dir %{_libdir}/evince/4 -%dir %{_libdir}/evince/4/backends %{_libdir}/evince/4/backends/*.so +%{_libdir}/evince/4/backends/libdvidocument.so* %{_libdir}/evince/4/backends/*.evince-backend %{_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 +%{_datadir}/doc/libevview +%{_datadir}/doc/libevdocument %dir %{_includedir}/evince %{_includedir}/evince/3.0 %{_libdir}/*.so @@ -101,10 +129,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-p %doc NEWS AUTHORS %{_mandir}/man1/*.1* - %changelog -* Mon Apr 11 2022 dillon chen - 3.38.3-1 -- Upgrade to 3.38.3 +* Mon Mar 28 2022 lin zhang - 42.3-1 +- Update to 42.3 * Tue Jun 15 2021 weijin deng - 3.38.2-1 - Upgrade to 3.38.2 diff --git a/evince.yaml b/evince.yaml index e477739..33bf6f0 100644 --- a/evince.yaml +++ b/evince.yaml @@ -1,4 +1,4 @@ version_control: gitlab.gnome src_repo: evince tag_prefix: ^EVINCE_ -seperator: _ +separator: _