Compare commits
10 Commits
bb2316871b
...
c933dcae58
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c933dcae58 | ||
|
|
6007f4ee5e | ||
|
|
7649ee5d62 | ||
|
|
f0739dd5cc | ||
|
|
5cb2658fa0 | ||
|
|
c7b8760a79 | ||
|
|
fa6426a41d | ||
|
|
ac0fe7f737 | ||
|
|
b923b72b4a | ||
|
|
7b8f1a67c4 |
@ -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-44.3.tar.xz
Normal file
BIN
evince-44.3.tar.xz
Normal file
Binary file not shown.
93
evince.spec
93
evince.spec
@ -1,22 +1,45 @@
|
||||
%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.02.0
|
||||
|
||||
Name: evince
|
||||
Version: 3.38.2
|
||||
Version: 44.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}/44/%{name}-%{version}.tar.xz
|
||||
|
||||
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) >= 43
|
||||
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-4)
|
||||
BuildRequires: pkgconfig(poppler-glib) >= %{poppler_version}
|
||||
BuildRequires: pkgconfig(libarchive) >= %{libarchive_version}
|
||||
|
||||
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
|
||||
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
|
||||
Requires: nautilus%{?_isa}
|
||||
|
||||
%description
|
||||
Evince is a document viewer for multiple document formats. The goal of evince is to replace the
|
||||
@ -26,25 +49,24 @@ 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}
|
||||
Recommends: gi-docgen-fonts
|
||||
|
||||
%description devel
|
||||
This package contains libraries and header files needed for evince
|
||||
backend development.
|
||||
|
||||
%package help
|
||||
Summary: Help documents for evince
|
||||
%description help
|
||||
This package contain the help documents for evince.
|
||||
%package_help
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
%build
|
||||
export CFLAGS='-I%{_builddir}/%{name}-%{version}/cut-n-paste/synctex %optflags'
|
||||
#export CFLAGS='-I/usr/include/synctex %optflags'
|
||||
%meson -Dcomics=enabled -Ddvi=enabled -Ddjvu=enabled -Dxps=enabled \
|
||||
-Dt1lib=disabled -Dsystemduserunitdir=no -Dnautilus=false \
|
||||
-Dsystemduserunitdir=no -Dnautilus=false \
|
||||
-Dps=enabled
|
||||
|
||||
%meson_build
|
||||
@ -53,9 +75,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 +92,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 +105,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,8 +124,20 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-p
|
||||
%doc NEWS AUTHORS
|
||||
%{_mandir}/man1/*.1*
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Nov 23 2023 zhangxianting <zhangxianting@uniontech.com> - 44.3-1
|
||||
- update to version 44.3
|
||||
|
||||
* Mon Jan 02 2023 lin zhang <lin.zhang@turbolinux.com.cn> - 43.1-1
|
||||
- Update to 43.1
|
||||
|
||||
* Mon Jun 20 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 42.3-2
|
||||
- fix build when Meson >= 0.61.5
|
||||
- remove meson option t1lib
|
||||
|
||||
* Mon Mar 28 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 42.3-1
|
||||
- Update to 42.3
|
||||
|
||||
* Tue Jun 15 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 3.38.2-1
|
||||
- Upgrade to 3.38.2
|
||||
- Delete 0001-Resolves-deb-762530-rhbz-1061177-add-man-pages.patch that
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
version_control: gitlab.gnome
|
||||
src_repo: evince
|
||||
tag_prefix: ^EVINCE_
|
||||
seperator: _
|
||||
separator: _
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user