Compare commits
No commits in common. "factory" and "factory" have entirely different histories.
@ -1,201 +0,0 @@
|
||||
From 1a22e78bc589ea0bdabf5ff2c4dea4d7d6f31402 Mon Sep 17 00:00:00 2001
|
||||
From: Jean Ghali <jghali@libertysurf.fr>
|
||||
Date: Tue, 4 Feb 2025 21:41:03 +0000
|
||||
Subject: [PATCH] #17405: Fix build error with poppler 25.02.0
|
||||
|
||||
git-svn-id: svn://scribus.net/branches/Version16x/Scribus@26668 11d20701-8431-0410-a711-e3c959e3b870
|
||||
---
|
||||
scribus/plugins/import/pdf/importpdf.cpp | 4 +-
|
||||
scribus/plugins/import/pdf/importpdfconfig.h | 6 ++
|
||||
scribus/plugins/import/pdf/slaoutput.cpp | 67 ++++++++++++++++++--
|
||||
3 files changed, 68 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp
|
||||
index f87275c..a0a5cdf 100644
|
||||
--- a/scribus/plugins/import/pdf/importpdf.cpp
|
||||
+++ b/scribus/plugins/import/pdf/importpdf.cpp
|
||||
@@ -462,11 +462,11 @@ bool PdfPlug::convert(const QString& fn)
|
||||
|
||||
if (dev->isOk())
|
||||
{
|
||||
- OCGs* ocg = pdfDoc->getOptContentConfig();
|
||||
+ POPPLER_CONST_25_02 OCGs* ocg = pdfDoc->getOptContentConfig();
|
||||
if (ocg && ocg->hasOCGs())
|
||||
{
|
||||
QStringList ocgNames;
|
||||
- Array *order = ocg->getOrderArray();
|
||||
+ POPPLER_CONST_25_02 Array *order = ocg->getOrderArray();
|
||||
if (order)
|
||||
{
|
||||
for (int i = 0; i < order->getLength (); ++i)
|
||||
diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h
|
||||
index fd57f25..46ecc58 100644
|
||||
--- a/scribus/plugins/import/pdf/importpdfconfig.h
|
||||
+++ b/scribus/plugins/import/pdf/importpdfconfig.h
|
||||
@@ -27,4 +27,10 @@ for which a new license (GPL+exception) is in place.
|
||||
#define POPPLER_CONST_083
|
||||
#endif
|
||||
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
+#define POPPLER_CONST_25_02 const
|
||||
+#else
|
||||
+#define POPPLER_CONST_25_02
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
index 2b8cf94..6f6bf5f 100644
|
||||
--- a/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
@@ -1685,7 +1685,7 @@ void SlaOutputDev::stroke(GfxState *state)
|
||||
|
||||
auto& graphicState = m_graphicStack.top();
|
||||
graphicState.strokeColor = getColor(state->getStrokeColorSpace(), state->getStrokeColor(), &graphicState.strokeShade);
|
||||
-
|
||||
+
|
||||
QString output = convertPath(state->getPath());
|
||||
if ((m_Elements->count() != 0) && (output == m_coords)) // Path is the same as in last fill
|
||||
{
|
||||
@@ -2393,8 +2393,9 @@ bool SlaOutputDev::tilingPatternFill(GfxState *state, Gfx * /*gfx*/, Catalog *ca
|
||||
#endif
|
||||
m_graphicStack.top().clipPath = savedClip;
|
||||
m_inPattern--;
|
||||
- gElements = m_groupStack.pop();
|
||||
m_doc->m_Selection->clear();
|
||||
+
|
||||
+ gElements = m_groupStack.pop();
|
||||
if (gElements.Items.count() > 0)
|
||||
{
|
||||
for (int dre = 0; dre < gElements.Items.count(); ++dre)
|
||||
@@ -2932,7 +2933,7 @@ void SlaOutputDev::beginMarkedContent(const char *name, Object *dictRef)
|
||||
{
|
||||
if (dictRef->isNull())
|
||||
return;
|
||||
- OCGs *contentConfig = m_catalog->getOptContentConfig();
|
||||
+ POPPLER_CONST_25_02 OCGs *contentConfig = m_catalog->getOptContentConfig();
|
||||
OptionalContentGroup *oc;
|
||||
if (dictRef->isRef())
|
||||
{
|
||||
@@ -3084,7 +3085,11 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 4, 0)
|
||||
int tmpBufLen = 0;
|
||||
#endif
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
+ std::vector<int> codeToGID;
|
||||
+#else
|
||||
int *codeToGID = nullptr;
|
||||
+#endif
|
||||
const double *textMat = nullptr;
|
||||
double m11, m12, m21, m22, fontSize;
|
||||
SplashCoord mat[4] = { 1.0, 0.0, 0.0, 1.0 };
|
||||
@@ -3244,10 +3249,20 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
}
|
||||
else
|
||||
{
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
+ codeToGID.clear();
|
||||
+#else
|
||||
codeToGID = nullptr;
|
||||
+#endif
|
||||
n = 0;
|
||||
}
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, std::move(codeToGID), fontLoc->fontNum)))
|
||||
+ {
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
+ goto err2;
|
||||
+ }
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, codeToGID, n, fontLoc->fontNum)))
|
||||
{
|
||||
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
@@ -3278,6 +3293,18 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
#endif
|
||||
break;
|
||||
case fontCIDType0COT:
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
+ if (((GfxCIDFont*) gfxFont)->getCIDToGIDLen() > 0)
|
||||
+ {
|
||||
+ codeToGID = ((GfxCIDFont*) gfxFont)->getCIDToGID();
|
||||
+ n = codeToGID.size();
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ codeToGID.clear();
|
||||
+ n = 0;
|
||||
+ }
|
||||
+#else
|
||||
if (((GfxCIDFont *) gfxFont)->getCIDToGID())
|
||||
{
|
||||
n = ((GfxCIDFont *) gfxFont)->getCIDToGIDLen();
|
||||
@@ -3289,7 +3316,15 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
codeToGID = nullptr;
|
||||
n = 0;
|
||||
}
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
+#endif
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
+ if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(std::move(id), fontsrc, std::move(codeToGID), fontLoc->fontNum)))
|
||||
+ {
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
|
||||
+ gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
+ goto err2;
|
||||
+ }
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(std::move(id), fontsrc, codeToGID, n, fontLoc->fontNum)))
|
||||
{
|
||||
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
|
||||
@@ -3307,6 +3342,15 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
break;
|
||||
case fontCIDType2:
|
||||
case fontCIDType2OT:
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
+ codeToGID.clear();
|
||||
+ n = 0;
|
||||
+ if (((GfxCIDFont*) gfxFont)->getCIDToGIDLen() > 0)
|
||||
+ {
|
||||
+ codeToGID = ((GfxCIDFont*) gfxFont)->getCIDToGID();
|
||||
+ n = codeToGID.size();
|
||||
+ }
|
||||
+#else
|
||||
codeToGID = nullptr;
|
||||
n = 0;
|
||||
if (((GfxCIDFont *) gfxFont)->getCIDToGID())
|
||||
@@ -3318,6 +3362,7 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), n * sizeof(*codeToGID));
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
else
|
||||
{
|
||||
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
@@ -3338,7 +3383,9 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
#endif
|
||||
if (! ff)
|
||||
goto err2;
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
+ codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get());
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||
codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get(), &n);
|
||||
ff.reset();
|
||||
#else
|
||||
@@ -3346,7 +3393,13 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
delete ff;
|
||||
#endif
|
||||
}
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, std::move(codeToGID), fontLoc->fontNum)))
|
||||
+ {
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
+ goto err2;
|
||||
+ }
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, codeToGID, n, fontLoc->fontNum)))
|
||||
{
|
||||
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
--
|
||||
2.48.1
|
||||
|
3
scribus-1.6.2.tar.xz
Normal file
3
scribus-1.6.2.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7eff9b1f47e372e56bb369f1dbe18fe49101789b5e6bcfdb7890e0346b641383
|
||||
size 73129400
|
6
scribus-1.6.2.tar.xz.asc
Normal file
6
scribus-1.6.2.tar.xz.asc
Normal file
@ -0,0 +1,6 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iF0EABECAB0WIQRlWL6E0nJzpDihURmL6kgRiuvuZAUCZm2mxQAKCRCL6kgRiuvu
|
||||
ZArHAJ0Ru6M6nyTplBSK4zzmPb2q7eqHrACfYR3rpqPw7A2/Acw3CDJ/NL8St5U=
|
||||
=hugY
|
||||
-----END PGP SIGNATURE-----
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0ae58ced410101e82655e3b4c20a070cf1767145ada233dcef7c20b8ba6bd487
|
||||
size 74909384
|
@ -1,6 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iF0EABECAB0WIQRlWL6E0nJzpDihURmL6kgRiuvuZAUCZ37jXwAKCRCL6kgRiuvu
|
||||
ZNnVAKCrRLUuYGi15Hd/ZRjDdeJxrSHJWgCePzKCwgxgdY8khnmAVXSkZzjLZM8=
|
||||
=T/s5
|
||||
-----END PGP SIGNATURE-----
|
@ -1,30 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 16 09:05:59 UTC 2025 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||
|
||||
- Add 0001-Fix-build-error-with-poppler-25.02.0.patch: Fix build
|
||||
with poppler 25.02.0.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 9 18:00:48 UTC 2025 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
- Update to 1.6.3. Check the ChangeLog file for the full list of
|
||||
changes.
|
||||
- Drop patch, merged upstream:
|
||||
* fix_build_with_poppler_24.12.0.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 20 17:14:05 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||
|
||||
- Add poppler 24.10 compatibility patch:
|
||||
* Add fix_build_with_poppler_24.12.0.patch
|
||||
* Drop 0001-Fix-build-with-poppler-24.10.0.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 25 14:39:51 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
- Add poppler 24.10 compatibility patch:
|
||||
* 0001-Fix-build-with-poppler-24.10.0.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 2 14:52:57 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
|
30
scribus.spec
30
scribus.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package scribus
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# Copyright (c) Peter Linnell and 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@ -19,21 +19,13 @@
|
||||
|
||||
%bcond_without podofo
|
||||
%bcond_without released
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
%if 0%{?suse_version} > 1500
|
||||
%define pyver python3
|
||||
%else
|
||||
%define pyver python311
|
||||
%endif
|
||||
|
||||
Name: scribus
|
||||
Version: 1.6.3
|
||||
Version: 1.6.2
|
||||
Release: 0
|
||||
Summary: Page Layout and Desktop Publishing (DTP)
|
||||
License: GPL-2.0-or-later
|
||||
URL: https://www.scribus.net/
|
||||
# https://sourceforge.net/projects/scribus/files/scribus/1.6.3/
|
||||
# https://sourceforge.net/projects/scribus/files/scribus/1.6.2/
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
%if %{with released}
|
||||
Source1: %{name}-%{version}.tar.xz.asc
|
||||
@ -41,8 +33,8 @@ Source2: scribus.keyring
|
||||
%endif
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch0: 0001-Make-sure-information-displayed-on-the-about-window-.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch1: 0001-Fix-build-error-with-poppler-25.02.0.patch
|
||||
# PATCH-FIX-UPSTREAM poppler...
|
||||
|
||||
BuildRequires: cmake >= 3.14.0
|
||||
BuildRequires: cups-devel
|
||||
BuildRequires: dos2unix
|
||||
@ -64,7 +56,7 @@ BuildRequires: libwpd-devel
|
||||
BuildRequires: libwpg-devel
|
||||
BuildRequires: libzmf-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: %{pyver}-devel
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: cmake(Qt5Core) >= 5.14.0
|
||||
BuildRequires: cmake(Qt5Gui)
|
||||
BuildRequires: cmake(Qt5LinguistTools)
|
||||
@ -76,6 +68,7 @@ BuildRequires: cmake(Qt5Widgets)
|
||||
BuildRequires: cmake(Qt5Xml)
|
||||
BuildRequires: pkgconfig(GraphicsMagick)
|
||||
BuildRequires: pkgconfig(cairo)
|
||||
BuildRequires: pkgconfig(libpng16)
|
||||
BuildRequires: pkgconfig(fontconfig)
|
||||
BuildRequires: pkgconfig(freetype2)
|
||||
BuildRequires: pkgconfig(harfbuzz)
|
||||
@ -84,14 +77,13 @@ BuildRequires: pkgconfig(icu-i18n)
|
||||
BuildRequires: pkgconfig(icu-uc)
|
||||
BuildRequires: pkgconfig(lcms2)
|
||||
BuildRequires: pkgconfig(libjpeg)
|
||||
BuildRequires: pkgconfig(libpng16)
|
||||
BuildRequires: pkgconfig(libxml-2.0)
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: pkgconfig(poppler) > 21.03.0
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
Requires: hicolor-icon-theme
|
||||
Recommends: %{pyver}-Pillow
|
||||
Recommends: %{pyver}-tk
|
||||
Recommends: python3-Pillow
|
||||
Recommends: python3-tk
|
||||
Recommends: scribus-doc
|
||||
# Not packaged anymore
|
||||
Provides: scribus-devel = %{version}
|
||||
@ -122,11 +114,7 @@ find . -type f \( -iname \*.py -o -iname \*.cpp -o -iname \*.h \) -exec dos2unix
|
||||
# Unused test file still using QQC1
|
||||
rm scribus/ui/qml/qtq_test1.qml
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
find . \( -name "*.py" -o -name "*.html" \) -exec sed -i 's#/usr/bin/env python.*#/usr/bin/python3#' {} \;
|
||||
%else
|
||||
find . \( -name "*.py" -o -name "*.html" \) -exec sed -i 's#/usr/bin/env python.*#/usr/bin/python3.11#' {} \;
|
||||
%endif
|
||||
|
||||
%build
|
||||
# Don't use the %%cmake macro, it causes crashes when starting scribus
|
||||
|
Loading…
x
Reference in New Issue
Block a user