Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Marek Kasik
a661d17c4b Rebuild for poppler 24.08.0
Backport of changes necessary to do the rebuild.
2024-08-22 11:25:22 +02:00
6 changed files with 196 additions and 0 deletions

View file

@ -0,0 +1,30 @@
From 3116328e804c7366ec64c4224cbf20b0f14e52c8 Mon Sep 17 00:00:00 2001
From: Jean Ghali <jghali@libertysurf.fr>
Date: Sun, 31 Mar 2024 21:40:42 +0000
Subject: Fix C++20 related warning "template-id is not allowed for constructor
in C++20"
git-svn-id: svn://scribus.net/trunk/Scribus@26079 11d20701-8431-0410-a711-e3c959e3b870
diff --git a/scribus/third_party/lib2geom/rect.h b/scribus/third_party/lib2geom/rect.h
index c740d847f..ae1934782 100644
--- a/scribus/third_party/lib2geom/rect.h
+++ b/scribus/third_party/lib2geom/rect.h
@@ -56,14 +56,14 @@ class D2<Interval> {
private:
Interval f[2];
public:
- D2<Interval>() { f[X] = f[Y] = Interval(0, 0); }
+ D2() { f[X] = f[Y] = Interval(0, 0); }
- D2<Interval>(Interval const &a, Interval const &b) {
+ D2(Interval const &a, Interval const &b) {
f[X] = a;
f[Y] = b;
}
- D2<Interval>(Point const & a, Point const & b) {
+ D2(Point const & a, Point const & b) {
f[X] = Interval(a[X], b[X]);
f[Y] = Interval(a[Y], b[Y]);
}

27
scribus-1.6.1-c++20.patch Normal file
View file

@ -0,0 +1,27 @@
From 985b7944e50b23f4558ba4ca539659f37b4b7ba4 Mon Sep 17 00:00:00 2001
From: Jean Ghali <jghali@libertysurf.fr>
Date: Thu, 2 May 2024 22:26:03 +0000
Subject: Enforce C++20 when building with poppler >= 24.05.0
git-svn-id: svn://scribus.net/trunk/Scribus@26125 11d20701-8431-0410-a711-e3c959e3b870
diff --git a/CMakeLists_Dependencies.cmake b/CMakeLists_Dependencies.cmake
index a19acfc23..33f827298 100644
--- a/CMakeLists_Dependencies.cmake
+++ b/CMakeLists_Dependencies.cmake
@@ -28,7 +28,14 @@ if (poppler_FOUND)
message(STATUS "Found poppler")
message(STATUS "Found poppler libs: ${poppler_LIBRARY}")
message(STATUS "Found poppler includes: ${poppler_INCLUDE_DIR}")
- if (poppler_VERSION VERSION_GREATER_EQUAL 22.01.0)
+ if (poppler_VERSION VERSION_GREATER_EQUAL 24.05.0)
+ message(STATUS "Poppler Version:" ${poppler_VERSION})
+ if (CMAKE_CXX_STANDARD LESS 20)
+ message(STATUS "C++20 is the minimum C++ standard since poppler 24.05.0")
+ message(STATUS "Enabling C++20 compiler features")
+ set(CMAKE_CXX_STANDARD 20)
+ endif()
+ elseif (poppler_VERSION VERSION_GREATER_EQUAL 22.01.0)
message(STATUS "Poppler Version:" ${poppler_VERSION})
if (CMAKE_CXX_STANDARD LESS 17)
message(STATUS "C++17 is the minimum C++ standard since poppler 22.01.0")

View file

@ -0,0 +1,42 @@
From 8beacae24242c683d60cd280fec14ba5db6d8090 Mon Sep 17 00:00:00 2001
From: Jean Ghali <jghali@libertysurf.fr>
Date: Sat, 1 Jun 2024 22:03:54 +0000
Subject: #17229: scribus fails to compile with boost 1.85.0
git-svn-id: svn://scribus.net/trunk/Scribus@26169 11d20701-8431-0410-a711-e3c959e3b870
diff --git a/scribus/third_party/lib2geom/point.h b/scribus/third_party/lib2geom/point.h
index 9aa62461a..4e86740e1 100644
--- a/scribus/third_party/lib2geom/point.h
+++ b/scribus/third_party/lib2geom/point.h
@@ -121,10 +121,14 @@ class Point {
Point &operator*=(Matrix const &m);
- inline int operator == (const Point &in_pnt) {
+ inline bool operator==(const Point &in_pnt) const {
return ((_pt[X] == in_pnt[X]) && (_pt[Y] == in_pnt[Y]));
}
+ inline bool operator!=(const Point &in_pnt) const {
+ return ((_pt[X] != in_pnt[X]) || (_pt[Y] != in_pnt[Y]));
+ }
+
friend inline std::ostream &operator<< (std::ostream &out_file, const Geom::Point &in_pnt);
};
@@ -144,14 +148,6 @@ inline Point operator^(Point const &a, Point const &b) {
return ret;
}
-//IMPL: boost::EqualityComparableConcept
-inline bool operator==(Point const &a, Point const &b) {
- return (a[X] == b[X]) && (a[Y] == b[Y]);
-}
-inline bool operator!=(Point const &a, Point const &b) {
- return (a[X] != b[X]) || (a[Y] != b[Y]);
-}
-
/** This is a lexicographical ordering for points. It is remarkably useful for sweepline algorithms*/
inline bool operator<=(Point const &a, Point const &b) {
return ( ( a[Y] < b[Y] ) ||

View file

@ -0,0 +1,32 @@
From 53e715d2f65ffaf6b78833d9dd012a93dbaaca93 Mon Sep 17 00:00:00 2001
From: Jean Ghali <jghali@libertysurf.fr>
Date: Tue, 5 Mar 2024 16:42:40 +0000
Subject: Fix incorrect value used in initial build fix against poppler 24.03.
See
https://gitlab.freedesktop.org/poppler/poppler/-/commit/6e3824d45d42cb806a28a2df84e4ab6bb3587083
for details.
git-svn-id: svn://scribus.net/trunk/Scribus@26047 11d20701-8431-0410-a711-e3c959e3b870
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
index f5297bba7..e69c4177c 100644
--- a/scribus/plugins/import/pdf/slaoutput.cpp
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
@@ -1758,7 +1758,7 @@ bool SlaOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, do
}
}
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 3, 0)
- else if ((func->getType() == Function::Type::Exponential) || (func->getType() == Function::Type::Identity))
+ else if ((func->getType() == Function::Type::Exponential) || (func->getType() == Function::Type::Sampled))
#else
else if ((func->getType() == 2) || (func->getType() == 0))
#endif
@@ -1900,7 +1900,7 @@ bool SlaOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading,
}
}
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 3, 0)
- else if ((func->getType() == Function::Type::Exponential) || (func->getType() == Function::Type::Identity))
+ else if ((func->getType() == Function::Type::Exponential) || (func->getType() == Function::Type::Sampled))
#else
else if ((func->getType() == 2) || (func->getType() == 0))
#endif

View file

@ -0,0 +1,59 @@
From c57362c4f7bdef67904bf2f3d8126073792bdcf9 Mon Sep 17 00:00:00 2001
From: Jean Ghali <jghali@libertysurf.fr>
Date: Mon, 4 Mar 2024 20:39:54 +0000
Subject: Fix build failure with poppler 24.03.0
git-svn-id: svn://scribus.net/trunk/Scribus@26042 11d20701-8431-0410-a711-e3c959e3b870
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
index 4e31e4b6c..58f030503 100644
--- a/scribus/plugins/import/pdf/slaoutput.cpp
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
@@ -1731,7 +1731,11 @@ bool SlaOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, do
VGradient FillGradient = VGradient(VGradient::linear);
FillGradient.clearStops();
GfxColorSpace *color_space = shading->getColorSpace();
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 3, 0)
+ if (func->getType() == Function::Type::Stitching)
+#else
if (func->getType() == 3)
+#endif
{
StitchingFunction *stitchingFunc = (StitchingFunction*)func;
const double *bounds = stitchingFunc->getBounds();
@@ -1753,7 +1757,11 @@ bool SlaOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, do
FillGradient.addStop( ScColorEngine::getShadeColor(m_doc->PageColors[stopColor], m_doc, shade), stopPoint, 0.5, 1.0, stopColor, shade );
}
}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 3, 0)
+ else if ((func->getType() == Function::Type::Exponential) || (func->getType() == Function::Type::Identity))
+#else
else if ((func->getType() == 2) || (func->getType() == 0))
+#endif
{
GfxColor stop1;
shading->getColor(0.0, &stop1);
@@ -1865,7 +1873,11 @@ bool SlaOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading,
VGradient FillGradient = VGradient(VGradient::linear);
FillGradient.clearStops();
GfxColorSpace *color_space = shading->getColorSpace();
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 3, 0)
+ if (func->getType() == Function::Type::Stitching)
+#else
if (func->getType() == 3)
+#endif
{
StitchingFunction *stitchingFunc = (StitchingFunction*)func;
const double *bounds = stitchingFunc->getBounds();
@@ -1887,7 +1899,11 @@ bool SlaOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading,
FillGradient.addStop( ScColorEngine::getShadeColor(m_doc->PageColors[stopColor], m_doc, shade), stopPoint, 0.5, 1.0, stopColor, shade );
}
}
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 3, 0)
+ else if ((func->getType() == Function::Type::Exponential) || (func->getType() == Function::Type::Identity))
+#else
else if ((func->getType() == 2) || (func->getType() == 0))
+#endif
{
GfxColor stop1;
shading->getColor(0.0, &stop1);

View file

@ -14,6 +14,12 @@ Source0: %{name}-%{version}-free.tar.xz
#Source0: http://downloads.sourceforge.net/%%{name}/%%{name}-%%{version}.tar.xz
#Source1: http://downloads.sourceforge.net/%%{name}/%%{name}-%%{version}.tar.xz.asc
# Enforce C++20 due to poppler
Patch0: scribus-1.6.1-c++20.patch
Patch1: scribus-1.6.1-c++20-warnings.patch
Patch2: scribus-1.6.1-point-operator.patch
Patch3: scribus-1.6.1-poppler-24.03.0.patch
Patch4: scribus-1.6.1-poppler-24.03.0-fix.patch
BuildRequires: boost-devel
BuildRequires: cmake