rebuilt by autoport with build requirements: libokular-devel>=23.08.0-1mamba [release 3.2.1-5mamba;Thu Sep 07 2023]

This commit is contained in:
Automatic Build System 2024-01-05 21:06:39 +01:00
parent 2f71a50c43
commit 99d5dd22c5
4 changed files with 186 additions and 14 deletions

View File

@ -0,0 +1,11 @@
--- calligra-3.2.1/CMakeLists.txt
+++ calligra-3.2.1/CMakeLists.txt
@@ -108,7 +108,7 @@ message(STATUS "Release build: ${RELEASE
if (CMAKE_VERSION VERSION_LESS "3.1")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else ()
- set (CMAKE_CXX_STANDARD 11)
+ set (CMAKE_CXX_STANDARD 17)
endif ()
############

View File

@ -0,0 +1,65 @@
From 236bacbe13739414e919de868283b0caf2df5d8a Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Wed, 13 Apr 2022 01:25:44 +0200
Subject: 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.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 51f1d65b8e6..06bbad5c24c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -952,6 +952,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 8fddf1ad757..b71c92cbf04 100644
--- a/filters/karbon/pdf/CMakeLists.txt
+++ b/filters/karbon/pdf/CMakeLists.txt
@@ -3,7 +3,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 abbe681b4e8..e97974fc133 100644
--- a/filters/karbon/pdf/PdfImport.cpp
+++ b/filters/karbon/pdf/PdfImport.cpp
@@ -17,6 +17,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"
@@ -54,8 +58,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;

View File

@ -0,0 +1,86 @@
From 6b75bec784c9835c78993349845d8c2ef22ec3de Mon Sep 17 00:00:00 2001
From: Dag Andersen <dag.andersen@kdemail.net>
Date: Wed, 13 Apr 2022 14:45:33 +0200
Subject: PdfImport: Fix compile with newer poppler
Also fixes odg2pdf filter.
Same solution as commit 236bacbe13739414e919de868283b0caf2df5d8a
by accid@kde.org.
diff --git a/filters/karbon/pdf/CMakeLists.txt b/filters/karbon/pdf/CMakeLists.txt
index b71c92cbf04..4ce138ccdd6 100644
--- a/filters/karbon/pdf/CMakeLists.txt
+++ b/filters/karbon/pdf/CMakeLists.txt
@@ -13,6 +13,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 934e31dd5aa..a21eac97a77 100644
--- a/filters/karbon/pdf/Pdf2OdgImport.cpp
+++ b/filters/karbon/pdf/Pdf2OdgImport.cpp
@@ -27,6 +27,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"
@@ -36,6 +38,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>();)
@@ -69,8 +73,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 0e6e5a934ca..7caec15175a 100644
--- a/filters/karbon/pdf/SvgOutputDev.cpp
+++ b/filters/karbon/pdf/SvgOutputDev.cpp
@@ -22,6 +22,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:
@@ -386,7 +390,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;

View File

@ -1,6 +1,6 @@
Name: calligra Name: calligra
Version: 3.2.1 Version: 3.2.1
Release: 4mamba Release: 5mamba
Epoch: 1 Epoch: 1
Summary: An integrated office suite built on the KDE platform (formerly known as koffice) Summary: An integrated office suite built on the KDE platform (formerly known as koffice)
Group: Graphical Desktop/Applications/Office Group: Graphical Desktop/Applications/Office
@ -24,6 +24,9 @@ Patch9: calligra-3.2.1-Fix-inserting-a-large-JPEG-image-into-a-presentati
Patch10: calligra-3.2.1-gcc11.patch Patch10: calligra-3.2.1-gcc11.patch
Patch11: calligra-3.2.1-Partial-update-of-Commit-62f51070-to-make-it-compile.patch Patch11: calligra-3.2.1-Partial-update-of-Commit-62f51070-to-make-it-compile.patch
Patch12: calligra-3.2.1-kundo2_aware_xgettext.sh-fix-a-gawk-warning.patch Patch12: calligra-3.2.1-kundo2_aware_xgettext.sh-fix-a-gawk-warning.patch
Patch13: calligra-3.2.1-poppler-22.08.0-1.patch
Patch14: calligra-3.2.1-poppler-22.08.0-2.patch
Patch15: calligra-3.2.1-c++17.patch
License: GPL, LGPL License: GPL, LGPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
@ -91,8 +94,8 @@ BuildRequires: libz-devel
BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtdeclarative-devel BuildRequires: qt5-qtdeclarative-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: libokular-devel >= 23.08.0-1mamba
BuildRequires: libgit2-devel >= 1.1.0-1mamba BuildRequires: libgit2-devel >= 1.1.0-1mamba
BuildRequires: libokular-devel >= 22.04.0
BuildRequires: libwps-devel >= 0.4.0-1mamba BuildRequires: libwps-devel >= 0.4.0-1mamba
BuildRequires: libxbase-devel >= 2.1.1 BuildRequires: libxbase-devel >= 2.1.1
BuildRequires: cmake BuildRequires: cmake
@ -292,10 +295,14 @@ This package provides the run-time library used by most of the Calligra componen
%patch 10 -p1 -b .gcc11 %patch 10 -p1 -b .gcc11
%patch 11 -p1 -b .Partial-update-of-Commit-62f51070-to-make-it-compile %patch 11 -p1 -b .Partial-update-of-Commit-62f51070-to-make-it-compile
%patch 12 -p1 -b .kundo2_aware_xgettext.sh-fix-a-gawk-warning %patch 12 -p1 -b .kundo2_aware_xgettext.sh-fix-a-gawk-warning
%patch 13 -p1 -b .poppler-22.08.0-1
%patch 14 -p1 -b .poppler-22.08.0-2
%patch 15 -p1 -b .c++17
%build %build
#:<< _EOF #:<< _EOF
%cmake_kde5 -d build \ %cmake_kde5 -d build \
-Wno-dev \
-DEIGEN3_INCLUDE_DIR=%{_includedir}/eigen32 -DEIGEN3_INCLUDE_DIR=%{_includedir}/eigen32
%make %make
@ -451,6 +458,9 @@ This package provides the run-time library used by most of the Calligra componen
%{_libdir}/lib*.so %{_libdir}/lib*.so
%changelog %changelog
* Thu Sep 07 2023 Automatic Build System <autodist@mambasoft.it> 3.2.1-5mamba
- rebuilt by autoport with build requirements: libokular-devel>=23.08.0-1mamba
* Thu Apr 28 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.1-4mamba * Thu Apr 28 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.1-4mamba
- rebuilt with okular 22.04.0 - rebuilt with okular 22.04.0