Bug#896567: texmaker: FTBFS against newer libsyntex

Samuel Thibault sthibault at debian.org
Sun Apr 29 16:10:10 BST 2018


Control: tags -1 + patch

Hello,

Sebastian Ramacher, le dim. 22 avril 2018 13:20:24 +0200, a ecrit:
> | ./pdfviewerwidget.cpp:988: undefined reference to `synctex_next_result'

Here is a proposed patch.

Samuel
-------------- next part --------------
Index: texmaker-5.0.2/pdfviewer.cpp
===================================================================
--- texmaker-5.0.2.orig/pdfviewer.cpp
+++ texmaker-5.0.2/pdfviewer.cpp
@@ -539,7 +539,7 @@ if (scanner == NULL)
   }
 const QFileInfo sourceFileInfo(sourceFile);
 QDir curDir(QFileInfo(pdf_file).canonicalPath());
-synctex_node_t node = synctex_scanner_input(scanner);
+synctex_node_p node = synctex_scanner_input(scanner);
 QString name;
 bool found = false;
 while (node != NULL) 
@@ -558,11 +558,11 @@ if (!found)
   gotoPage(currentPage);
   return;
   }
-if (synctex_display_query(scanner, name.toUtf8().data(), source_line, 0) > 0) 
+if (synctex_display_query(scanner, name.toUtf8().data(), source_line, 0, -1) > 0) 
   {
   int page = -1;
   path= QPainterPath();
-  while ((node = synctex_next_result(scanner)) != NULL) 
+  while ((node = synctex_scanner_next_result(scanner)) != NULL) 
     {
     if (page == -1) page = synctex_node_page(node);
     if (synctex_node_page(node) != page) continue;
@@ -1018,8 +1018,8 @@ void PdfViewer::jumpToEditor(int page, c
 if (scanner == NULL) return;
 if (synctex_edit_query(scanner, page+1, pos.x(), pos.y()) > 0) 
   {
-  synctex_node_t node;
-  while ((node = synctex_next_result(scanner)) != NULL) 
+  synctex_node_p node;
+  while ((node = synctex_scanner_next_result(scanner)) != NULL) 
     {
     QString filename = QString::fromUtf8(synctex_scanner_get_name(scanner, synctex_node_tag(node)));
     QDir curDir(QFileInfo(pdf_file).canonicalPath());
Index: texmaker-5.0.2/pdfviewer.h
===================================================================
--- texmaker-5.0.2.orig/pdfviewer.h
+++ texmaker-5.0.2/pdfviewer.h
@@ -37,7 +37,7 @@
 
 #include "qpdfdocument.h"
 #include "documentview.h"
-#include <synctex_parser.h>
+#include <synctex/synctex_parser.h>
 
 
 
@@ -84,7 +84,7 @@ bool fileLoaded;
 QPointer<QProcess> proc;
 QString lastFile;
 int lastPage, altern;
-synctex_scanner_t scanner;
+synctex_scanner_p scanner;
 QStringList scalePercents;
 QLineEdit *zoomCustom;
 int lastSearchPos;
Index: texmaker-5.0.2/pdfviewerwidget.cpp
===================================================================
--- texmaker-5.0.2.orig/pdfviewerwidget.cpp
+++ texmaker-5.0.2/pdfviewerwidget.cpp
@@ -502,7 +502,7 @@ if (scanner == NULL)
   }
 const QFileInfo sourceFileInfo(sourceFile);
 QDir curDir(QFileInfo(pdf_file).canonicalPath());
-synctex_node_t node = synctex_scanner_input(scanner);
+synctex_node_p node = synctex_scanner_input(scanner);
 QString name;
 bool found = false;
 while (node != NULL) 
@@ -522,11 +522,11 @@ if (!found)
   return;
   }
 
-if (synctex_display_query(scanner, name.toUtf8().data(), source_line, 0) > 0) 
+if (synctex_display_query(scanner, name.toUtf8().data(), source_line, 0, -1) > 0) 
   {
   int page = -1;
   path= QPainterPath();
-  while ((node = synctex_next_result(scanner)) != NULL) 
+  while ((node = synctex_scanner_next_result(scanner)) != NULL) 
     {
     if (page == -1) page = synctex_node_page(node);
     if (synctex_node_page(node) != page) continue;
@@ -984,8 +984,8 @@ void PdfViewerWidget::jumpToEditor(int p
 if (scanner == NULL) return;
 if (synctex_edit_query(scanner, page+1, pos.x(), pos.y()) > 0) 
   {
-  synctex_node_t node;
-  while ((node = synctex_next_result(scanner)) != NULL) 
+  synctex_node_p node;
+  while ((node = synctex_scanner_next_result(scanner)) != NULL) 
     {
     QString filename = QString::fromUtf8(synctex_scanner_get_name(scanner, synctex_node_tag(node)));
     QDir curDir(QFileInfo(pdf_file).canonicalPath());
Index: texmaker-5.0.2/pdfviewerwidget.h
===================================================================
--- texmaker-5.0.2.orig/pdfviewerwidget.h
+++ texmaker-5.0.2/pdfviewerwidget.h
@@ -38,7 +38,7 @@
 
 #include "qpdfdocument.h"
 #include "documentview.h"
-#include <synctex_parser.h>
+#include <synctex/synctex_parser.h>
 #include "minisplitter.h"
 
 
@@ -83,7 +83,7 @@ bool fileLoaded;
 QPointer<QProcess> proc;
 QString lastFile;
 int lastPage, altern;
-synctex_scanner_t scanner;
+synctex_scanner_p scanner;
 QStringList scalePercents;
 QLineEdit *zoomCustom;
 int lastSearchPos;


More information about the debian-science-maintainers mailing list