From 2ba5fb704f6d0e493ef3d318a1aad2cc17b08194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 6 Mar 2017 13:30:25 +0000 Subject: [PATCH] tweak things to be buildable under rhel-7.4 without rebasing poppler --- ...-Bump-poppler-requirements-to-0.33.0.patch | 55 +++++++++++++++++++ evince.spec | 7 ++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 0001-Revert-Bump-poppler-requirements-to-0.33.0.patch diff --git a/0001-Revert-Bump-poppler-requirements-to-0.33.0.patch b/0001-Revert-Bump-poppler-requirements-to-0.33.0.patch new file mode 100644 index 0000000..58c10af --- /dev/null +++ b/0001-Revert-Bump-poppler-requirements-to-0.33.0.patch @@ -0,0 +1,55 @@ +From 22b047c3db84a34fc5fb5076474640bcd3917c73 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +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 + diff --git a/evince.spec b/evince.spec index b1cf1db..e37e820 100644 --- a/evince.spec +++ b/evince.spec @@ -1,4 +1,4 @@ -%global poppler_version 0.33.0 +%global poppler_version 0.24.0 %global glib2_version 2.36.0 %global gtk3_version 3.16.0 %global gxps_version 0.2.1 @@ -20,6 +20,7 @@ Patch2: 0001-Resolves-rhbz-1404656-crash-on-opening-second-evince.patch #https://bugzilla.gnome.org/show_bug.cgi?id=766749 Patch3: 0001-Resolves-deb-762530-rhbz-1061177-add-man-pages.patch Patch4: 0001-Resolves-rhbz-1358249-page-up-down.patch +Patch5: 0001-Revert-Bump-poppler-requirements-to-0.33.0.patch BuildRequires: pkgconfig(adwaita-icon-theme) BuildRequires: pkgconfig(gio-unix-2.0) >= %{glib2_version} @@ -38,6 +39,7 @@ BuildRequires: yelp-tools BuildRequires: intltool BuildRequires: /usr/bin/desktop-file-validate BuildRequires: libappstream-glib +BuildRequires: gnome-common # for the nautilus properties page BuildRequires: pkgconfig(libnautilus-extension) # for the dvi backend @@ -66,7 +68,9 @@ installing additional backends. %package libs Summary: Libraries for the evince document viewer +%if 0%{?fedora} Recommends: %{name}-djvu%{?_isa} = %{version}-%{release} +%endif %description libs This package contains shared libraries needed for evince @@ -122,6 +126,7 @@ This package contains the evince web browser plugin. %autosetup -p1 %build +autoreconf -f -i %configure \ --disable-static \ --enable-introspection \