Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package calligra for openSUSE:Factory 
checked in at 2022-05-01 18:53:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/calligra (Old)
 and      /work/SRC/openSUSE:Factory/.calligra.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "calligra"

Sun May  1 18:53:51 2022 rev:83 rq:974171 version:3.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/calligra/calligra.changes        2022-03-11 
11:40:49.554577991 +0100
+++ /work/SRC/openSUSE:Factory/.calligra.new.1538/calligra.changes      
2022-05-01 18:54:00.179186030 +0200
@@ -1,0 +2,8 @@
+Sun May  1 08:52:41 UTC 2022 - Christophe Giboudeaux <christo...@krop.fr>
+
+- Add the monthly poppler compatibility fixes. Replace
+  poppler-22.03.0.patch with:
+  * poppler-22.04_1.patch
+  * poppler-22.04_2.patch
+
+-------------------------------------------------------------------

Old:
----
  poppler-22.03.0.patch

New:
----
  poppler-22.04_1.patch
  poppler-22.04_2.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ calligra.spec ++++++
--- /var/tmp/diff_new_pack.UKXc89/_old  2022-05-01 18:54:00.879186680 +0200
+++ /var/tmp/diff_new_pack.UKXc89/_new  2022-05-01 18:54:00.883186683 +0200
@@ -35,7 +35,8 @@
 # PATCH-FIX-UPSTREAM
 Patch2:         Fix-some-more-warnings.patch
 # PATCH-FIX-UPSTREAM
-Patch3:         poppler-22.03.0.patch
+Patch3:         poppler-22.04_1.patch
+Patch4:         poppler-22.04_2.patch
 BuildRequires:  OpenEXR-devel
 BuildRequires:  extra-cmake-modules
 BuildRequires:  fdupes

++++++ poppler-22.04_1.patch ++++++
>From 529115cef08dd8136672ac9da08e63b241c58974 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aa...@kde.org>
Date: Wed, 13 Apr 2022 01:25:44 +0200
Subject: [PATCH] PdfImport: Fix compile with newer poppler

Brings a dependency on poppler-qt5 to be able to include the version
header, honestly it's not strictly needed, one could do a
check_cxx_source_compiles, but I don't care about Calligra enough to
spend more time making it compile while it's using poppler the wrong
way.
---
 CMakeLists.txt                    | 1 +
 filters/karbon/pdf/CMakeLists.txt | 2 +-
 filters/karbon/pdf/PdfImport.cpp  | 9 +++++++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f87b7cf..446b29f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -999,6 +999,7 @@ calligra_drop_product_on_bad_condition( FILTER_WPG_TO_ODG
 calligra_drop_product_on_bad_condition( FILTER_PDF_TO_SVG
     NOT_WIN "not supported on Windows"
     PopplerXPDFHeaders_FOUND "poppler xpdf headers not found"
+    Poppler_FOUND "poppler qt5 headers not found"
     )
 
 calligra_drop_product_on_bad_condition( FILTER_HTML_TO_ODS
diff --git a/filters/karbon/pdf/CMakeLists.txt 
b/filters/karbon/pdf/CMakeLists.txt
index 94d4071..ef360f4 100644
--- a/filters/karbon/pdf/CMakeLists.txt
+++ b/filters/karbon/pdf/CMakeLists.txt
@@ -19,7 +19,7 @@ set(pdf2svg_PART_SRCS PdfImportDebug.cpp PdfImport.cpp 
SvgOutputDev.cpp )
 add_library(calligra_filter_pdf2svg MODULE ${pdf2svg_PART_SRCS})
 calligra_filter_desktop_to_json(calligra_filter_pdf2svg 
calligra_filter_pdf2svg.desktop)
 
-target_link_libraries(calligra_filter_pdf2svg komain Poppler::Core)
+target_link_libraries(calligra_filter_pdf2svg komain Poppler::Core 
Poppler::Qt5)
 
 install(TARGETS calligra_filter_pdf2svg DESTINATION 
${PLUGIN_INSTALL_DIR}/calligra/formatfilters)
 
diff --git a/filters/karbon/pdf/PdfImport.cpp b/filters/karbon/pdf/PdfImport.cpp
index 286f5fa..c171c75 100644
--- a/filters/karbon/pdf/PdfImport.cpp
+++ b/filters/karbon/pdf/PdfImport.cpp
@@ -30,6 +30,10 @@
 
 #include <kpluginfactory.h>
 
+#include <poppler-version.h>
+
+#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | 
(POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO))
+
 // Don't show this warning: it's an issue in poppler
 #ifdef __GNUC__
 #pragma GCC diagnostic ignored "-Wunused-parameter"
@@ -73,8 +77,13 @@ KoFilter::ConversionStatus PdfImport::convert(const 
QByteArray& from, const QByt
     if (! globalParams)
         return KoFilter::NotImplemented;
 
+#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0)
     GooString * fname = new 
GooString(QFile::encodeName(m_chain->inputFile()).data());
     PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0);
+#else
+    std::unique_ptr<GooString> fname = 
std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data());
+    PDFDoc * pdfDoc = new PDFDoc(std::move(fname));
+#endif
     if (! pdfDoc) {
 #ifdef HAVE_POPPLER_PRE_0_83
         delete globalParams;
-- 
2.36.0


++++++ poppler-22.04_2.patch ++++++
>From f5947617dc9cff71a9e97c22ffc64c074bdb3219 Mon Sep 17 00:00:00 2001
From: Dag Andersen <dag.ander...@kdemail.net>
Date: Wed, 13 Apr 2022 14:45:33 +0200
Subject: [PATCH] PdfImport: Fix compile with newer poppler

Also fixes odg2pdf filter.

Same solution as commit 236bacbe13739414e919de868283b0caf2df5d8a
by ac...@kde.org.
---
 filters/karbon/pdf/CMakeLists.txt    | 2 +-
 filters/karbon/pdf/Pdf2OdgImport.cpp | 9 +++++++++
 filters/karbon/pdf/SvgOutputDev.cpp  | 9 +++++++++
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/filters/karbon/pdf/CMakeLists.txt 
b/filters/karbon/pdf/CMakeLists.txt
index ef360f4..849baa7 100644
--- a/filters/karbon/pdf/CMakeLists.txt
+++ b/filters/karbon/pdf/CMakeLists.txt
@@ -29,6 +29,6 @@ set(pdf2odg_PART_SRCS PdfImportDebug.cpp Pdf2OdgImport.cpp 
SvgOutputDev.cpp)
 add_library(calligra_filter_pdf2odg MODULE ${pdf2odg_PART_SRCS})
 calligra_filter_desktop_to_json(calligra_filter_pdf2odg 
calligra_filter_pdf2odg.desktop)
 
-target_link_libraries(calligra_filter_pdf2odg kopageapp karbonui Poppler::Core)
+target_link_libraries(calligra_filter_pdf2odg kopageapp karbonui Poppler::Core 
Poppler::Qt5)
 
 install(TARGETS calligra_filter_pdf2odg DESTINATION 
${PLUGIN_INSTALL_DIR}/calligra/formatfilters)
diff --git a/filters/karbon/pdf/Pdf2OdgImport.cpp 
b/filters/karbon/pdf/Pdf2OdgImport.cpp
index 745239c..b5f3722 100644
--- a/filters/karbon/pdf/Pdf2OdgImport.cpp
+++ b/filters/karbon/pdf/Pdf2OdgImport.cpp
@@ -40,6 +40,8 @@
 
 #include <kpluginfactory.h>
 
+#include <poppler-version.h>
+
 // Don't show this warning: it's an issue in poppler
 #ifdef __GNUC__
 #pragma GCC diagnostic ignored "-Wunused-parameter"
@@ -49,6 +51,8 @@
 #include <PDFDoc.h>
 #include <GlobalParams.h>
 
+#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | 
(POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO))
+
 K_PLUGIN_FACTORY_WITH_JSON(Pdf2OdgImportFactory, 
"calligra_filter_pdf2odg.json",
                            registerPlugin<Pdf2OdgImport>();)
 
@@ -86,8 +90,13 @@ KoFilter::ConversionStatus Pdf2OdgImport::convert(const 
QByteArray& from, const
     if (! globalParams)
         return KoFilter::NotImplemented;
 
+#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0)
     GooString * fname = new 
GooString(QFile::encodeName(m_chain->inputFile()).data());
     PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0);
+#else
+    std::unique_ptr<GooString> fname = 
std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data());
+    PDFDoc * pdfDoc = new PDFDoc(std::move(fname));
+#endif
     if (! pdfDoc) {
 #ifdef HAVE_POPPLER_PRE_0_83
         delete globalParams;
diff --git a/filters/karbon/pdf/SvgOutputDev.cpp 
b/filters/karbon/pdf/SvgOutputDev.cpp
index b980fdf..76b909e 100644
--- a/filters/karbon/pdf/SvgOutputDev.cpp
+++ b/filters/karbon/pdf/SvgOutputDev.cpp
@@ -35,6 +35,10 @@
 #include <QPen>
 #include <QImage>
 
+#include <poppler-version.h>
+
+#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | 
(POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO))
+
 class SvgOutputDev::Private
 {
 public:
@@ -410,7 +414,12 @@ void SvgOutputDev::drawString(GfxState * state, const 
GooString * s)
     if (s->getLength() == 0)
         return;
 
+#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0)
     GfxFont * font = state->getFont();
+#else
+    std::shared_ptr<GfxFont> font = state->getFont();
+#endif
+
 
     QString str;
 
-- 
2.36.0

Reply via email to