On Wed, 2025-10-01 at 19:49 +0200, Andreas Schneider wrote:
> Am 01.10.25 um 14:05 schrieb Richard Shann:
> > On Tue, 2025-09-30 at 20:26 +0200, Andreas Schneider wrote:
> > > Richard, can you please apply the patch from
> > > http://deb.debian.org/debian/pool/main/d/denemo/denemo_2.6.39-0.3.debian.tar.xz
> > >
> > > to make Denemo compile with recent libevince? You can also find
> > > it
> >
> > Hmm, I get an error trying to build with this,
> >
> > ../src/source/proof.c:283: undefined reference to
> > `EV_DOCUMENT_ANNOTATIONS'
> >
> > Is this something not in the atril headers or is it a version
> > matter?
>
> Have you installed the libatrildocument-dev package?
well,
dpkg-query -l yields
ii libatrildocument-dev 1.26.0-2+deb12u3
amd64 MATE document rendering library (development files)
and I see that the inclusion of
libdocument/ev-document-annotations.h
is missing in atril-document.h so this seems to be a bug in
libatrildocument.dev
To work around this bug I propose the attached patch. I'll apply this
unless there are objections.
Richard
diff --git a/src/source/proof.c b/src/source/proof.c
index f9a02bf0e..ad1dd3837 100644
--- a/src/source/proof.c
+++ b/src/source/proof.c
@@ -24,6 +24,11 @@
#ifdef USE_ATRIL
#include <atril-view.h>
#include <atril-document.h>
+#ifndef EV_DOCUMENT_ANNOTATIONS
+#define ATRIL_COMPILATION
+#include <libdocument/ev-document-annotations.h>
+#undef ATRIL_COMPILATION
+#endif
#else
#include <evince-view.h>
#include <evince-document.h>
@@ -280,7 +285,7 @@ press (EvView * view, GdkEventButton *event, EvDocumentModel *model)
infodialog (help_text);
nearest_annotation_text = NULL;
extern EvMappingList * ev_document_annotations_get_annotations();
- EvMappingList *mapping_list = ev_document_annotations_get_annotations (doc, ev_document_get_page(doc, i));
+ EvMappingList *mapping_list = ev_document_annotations_get_annotations (EV_DOCUMENT_ANNOTATIONS(doc), ev_document_get_page(doc, i));
if(mapping_list)
{
gdouble nearest = G_MAXDOUBLE;
@@ -313,7 +318,7 @@ find_annotated_pages (EvDocumentModel *model)
for (i=0; i< ev_document_get_n_pages(doc);i++)
{
extern EvMappingList * ev_document_annotations_get_annotations();
- EvMappingList *mapping_list = ev_document_annotations_get_annotations (doc, ev_document_get_page(doc, i));
+ EvMappingList *mapping_list = ev_document_annotations_get_annotations (EV_DOCUMENT_ANNOTATIONS(doc), ev_document_get_page(doc, i));
if(mapping_list)
{
annotated_pages = g_list_append (annotated_pages, GINT_TO_POINTER(i));