summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryangfl <yangfl@users.noreply.github.com>2018-10-17 19:45:11 +0800
committerDavid Bremner <david@tethera.net>2018-10-17 21:35:42 -0300
commit2d67ef7d4d1f9b1f7ca57c5de77cbb14d8e38f26 (patch)
tree6452f77b81fefbc4539ddea14e21aafeb3c268b6
parent8da900f399abeb2de8a8559807a2e46a23519d01 (diff)
Backport upstream commits to fix FTBFS with poppler 0.69.0
It's a bit messy to use 3 patches, but it has the advantage of being all upstream.
-rw-r--r--debian/changelog10
-rw-r--r--debian/patches/0002-Resolve-const-ness-of-some-variables.patch34
-rw-r--r--debian/patches/0003-Add-another-missing-const-qualifier.patch25
-rw-r--r--debian/patches/0004-Revert-change-regarding-const-ness-and-use-casts-ins.patch53
-rw-r--r--debian/patches/series3
5 files changed, 125 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 2765fb0..c3fca3d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+emacs-pdf-tools (0.80-4) unstable; urgency=medium
+
+ [ David Bremner ]
+ * Team Upload
+
+ [ Yangfl ]
+ * Backport upstream commits to fix FTBFS with poppler 0.69.0 (Closes: #910866)
+
+ -- David Bremner <bremner@debian.org> Wed, 17 Oct 2018 21:29:21 -0300
+
emacs-pdf-tools (0.80-3) unstable; urgency=medium
* Team upload.
diff --git a/debian/patches/0002-Resolve-const-ness-of-some-variables.patch b/debian/patches/0002-Resolve-const-ness-of-some-variables.patch
new file mode 100644
index 0000000..70ebed6
--- /dev/null
+++ b/debian/patches/0002-Resolve-const-ness-of-some-variables.patch
@@ -0,0 +1,34 @@
+From 6505a0e817495b85897c9380161034ae611ddd90 Mon Sep 17 00:00:00 2001
+From: Andreas Politz <politza@hochschule-trier.de>
+Date: Sat, 21 Apr 2018 18:05:15 +0200
+Subject: [PATCH] Resolve const'ness of some variables
+
+---
+ server/poppler-hack.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/server/poppler-hack.cc b/server/poppler-hack.cc
+index 0c62f73..a508136 100644
+--- a/server/poppler-hack.cc
++++ b/server/poppler-hack.cc
+@@ -51,7 +51,7 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST;
+ double y2;
+ };
+
+- char *_xpoppler_goo_string_to_utf8(GooString *s)
++ char *_xpoppler_goo_string_to_utf8(const GooString *s)
+ {
+ char *result;
+
+@@ -100,7 +100,7 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST;
+ gchar *xpoppler_annot_markup_get_created (PopplerAnnotMarkup *poppler_annot)
+ {
+ AnnotMarkup *annot;
+- GooString *text;
++ const GooString *text;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), NULL);
+
+--
+2.19.1
+
diff --git a/debian/patches/0003-Add-another-missing-const-qualifier.patch b/debian/patches/0003-Add-another-missing-const-qualifier.patch
new file mode 100644
index 0000000..322cbb2
--- /dev/null
+++ b/debian/patches/0003-Add-another-missing-const-qualifier.patch
@@ -0,0 +1,25 @@
+From ded6341b0e3ad97e8b14f68c1796ba66dc155fd1 Mon Sep 17 00:00:00 2001
+From: Andreas Politz <politza@hochschule-trier.de>
+Date: Sat, 21 Apr 2018 20:26:21 +0200
+Subject: [PATCH] Add another missing const qualifier
+
+---
+ server/poppler-hack.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/server/poppler-hack.cc b/server/poppler-hack.cc
+index a508136..c727425 100644
+--- a/server/poppler-hack.cc
++++ b/server/poppler-hack.cc
+@@ -85,7 +85,7 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST;
+ // Set the rectangle of an annotation. It was first added in v0.26.
+ void xpoppler_annot_set_rectangle (PopplerAnnot *a, PopplerRectangle *rectangle)
+ {
+- GooString *state = a->annot->getAppearState ();
++ const GooString *state = a->annot->getAppearState ();
+ char *ustate = _xpoppler_goo_string_to_utf8 (state);
+
+ a->annot->setRect (rectangle->x1, rectangle->y1,
+--
+2.19.1
+
diff --git a/debian/patches/0004-Revert-change-regarding-const-ness-and-use-casts-ins.patch b/debian/patches/0004-Revert-change-regarding-const-ness-and-use-casts-ins.patch
new file mode 100644
index 0000000..2d79be0
--- /dev/null
+++ b/debian/patches/0004-Revert-change-regarding-const-ness-and-use-casts-ins.patch
@@ -0,0 +1,53 @@
+From 50a5297b82e26cfd52f6c00645ddc1057099d6a7 Mon Sep 17 00:00:00 2001
+From: Andreas Politz <politza@hochschule-trier.de>
+Date: Fri, 27 Apr 2018 17:43:14 +0200
+Subject: [PATCH] Revert change regarding const'ness and use casts instead
+
+Implement the originally proposed fix.
+---
+ server/poppler-hack.cc | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/server/poppler-hack.cc b/server/poppler-hack.cc
+index c727425..427f9df 100644
+--- a/server/poppler-hack.cc
++++ b/server/poppler-hack.cc
+@@ -51,7 +51,10 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST;
+ double y2;
+ };
+
+- char *_xpoppler_goo_string_to_utf8(const GooString *s)
++ // This function does not modify its argument s, but for
++ // compatibility reasons (e.g. getLength in GooString.h before 2015)
++ // with older poppler code, it can't be declared as such.
++ char *_xpoppler_goo_string_to_utf8(/* const */ GooString *s)
+ {
+ char *result;
+
+@@ -85,7 +88,7 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST;
+ // Set the rectangle of an annotation. It was first added in v0.26.
+ void xpoppler_annot_set_rectangle (PopplerAnnot *a, PopplerRectangle *rectangle)
+ {
+- const GooString *state = a->annot->getAppearState ();
++ GooString *state = (GooString*) a->annot->getAppearState ();
+ char *ustate = _xpoppler_goo_string_to_utf8 (state);
+
+ a->annot->setRect (rectangle->x1, rectangle->y1,
+@@ -100,12 +103,12 @@ GType poppler_annot_markup_get_type (void) G_GNUC_CONST;
+ gchar *xpoppler_annot_markup_get_created (PopplerAnnotMarkup *poppler_annot)
+ {
+ AnnotMarkup *annot;
+- const GooString *text;
++ GooString *text;
+
+ g_return_val_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot), NULL);
+
+ annot = static_cast<AnnotMarkup *>(POPPLER_ANNOT (poppler_annot)->annot);
+- text = annot->getDate ();
++ text = (GooString*) annot->getDate ();
+
+ return text ? _xpoppler_goo_string_to_utf8 (text) : NULL;
+ }
+--
+2.19.1
+
diff --git a/debian/patches/series b/debian/patches/series
index fe17fee..2707a20 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,5 @@
0001-Use-debian-libsynctex-dev.patch
+0002-Resolve-const-ness-of-some-variables.patch
+0003-Add-another-missing-const-qualifier.patch
+0004-Revert-change-regarding-const-ness-and-use-casts-ins.patch
fix-for-new-libsynctex.patch