forked from pool/scribus
Compare commits
16 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| a0443dc74b | |||
|
|
59abf9ced5 | ||
| f59b91dfb2 | |||
|
|
3e0b125871 | ||
|
|
7a1bbf9d63 | ||
|
|
374a6b23d6 | ||
| 3b4f83bf48 | |||
|
|
7f44fe5908 | ||
|
|
f9de24a2b0 | ||
|
|
776fda4fd6 | ||
|
|
13cc8acd02 | ||
|
|
a70158db01 | ||
| 23aeb75955 | |||
|
|
27ea792001 | ||
| 46258da329 | |||
|
|
b803e95928 |
132
0001-Fix-build-with-PoDoFo-1.0.0.patch
Normal file
132
0001-Fix-build-with-PoDoFo-1.0.0.patch
Normal file
@@ -0,0 +1,132 @@
|
||||
From 857b62b7e88eb024539650a3de3c9b26c338ff64 Mon Sep 17 00:00:00 2001
|
||||
From: jghali <jghali@11d20701-8431-0410-a711-e3c959e3b870>
|
||||
Date: Fri, 6 Jun 2025 23:40:58 +0000
|
||||
Subject: [PATCH] Fix build with PoDoFo 1.0.0
|
||||
|
||||
git-svn-id: svn://scribus.net/trunk/Scribus@26920 11d20701-8431-0410-a711-e3c959e3b870
|
||||
---
|
||||
scribus/pdf_analyzer.cpp | 31 +++++++++++++++++++++++++++++++
|
||||
scribus/pdflib_core.cpp | 18 ++++++++++++++++++
|
||||
2 files changed, 49 insertions(+)
|
||||
|
||||
diff --git a/scribus/pdf_analyzer.cpp b/scribus/pdf_analyzer.cpp
|
||||
index d923148..3ecff48 100644
|
||||
--- a/scribus/pdf_analyzer.cpp
|
||||
+++ b/scribus/pdf_analyzer.cpp
|
||||
@@ -276,7 +276,11 @@ bool PDFAnalyzer::inspectCanvas(PdfCanvas* canvas, QList<PDFColorSpace> & usedCo
|
||||
try
|
||||
{
|
||||
// start parsing the content stream
|
||||
+#if (PODOFO_VERSION >= PODOFO_MAKE_VERSION(1, 0, 0))
|
||||
+ PdfContentReaderArgs tokenizerArgs;
|
||||
+#else
|
||||
PdfContentReaderArgs tokenizerArgs = { PdfContentReaderFlags::DontFollowXObjectForms };
|
||||
+#endif
|
||||
PdfContentStreamReader tokenizer(*canvas, tokenizerArgs);
|
||||
PdfContent pdfContent;
|
||||
PdfVariant var;
|
||||
@@ -289,13 +293,29 @@ bool PDFAnalyzer::inspectCanvas(PdfCanvas* canvas, QList<PDFColorSpace> & usedCo
|
||||
while (tokenizer.TryReadNext(pdfContent))
|
||||
{
|
||||
++tokenNumber;
|
||||
+#if (PODOFO_VERSION >= PODOFO_MAKE_VERSION(1, 0, 0))
|
||||
+ if (pdfContent.GetType() == PdfContentType::Operator)
|
||||
+#else
|
||||
if (pdfContent.Type == PdfContentType::Operator)
|
||||
+#endif
|
||||
{
|
||||
args.clear();
|
||||
+#if (PODOFO_VERSION >= PODOFO_MAKE_VERSION(1, 0, 0))
|
||||
+ const auto& pdfContentStack = pdfContent.GetStack();
|
||||
+ size_t stackSize = pdfContentStack.size();
|
||||
+ for (size_t i = 0; i < stackSize; ++i)
|
||||
+ args.append(pdfContentStack[stackSize - 1 - i]);
|
||||
+#else
|
||||
+
|
||||
size_t stackSize = pdfContent.Stack.size();
|
||||
for (size_t i = 0; i < stackSize; ++i)
|
||||
args.append(pdfContent.Stack[stackSize - 1 - i]);
|
||||
+#endif
|
||||
+#if (PODOFO_VERSION >= PODOFO_MAKE_VERSION(1, 0, 0))
|
||||
+ switch (pdfContent.GetOperator())
|
||||
+#else
|
||||
switch (pdfContent.Operator)
|
||||
+#endif
|
||||
{
|
||||
case PdfOperator::q:
|
||||
gsStack.push(currGS);
|
||||
@@ -677,12 +697,23 @@ bool PDFAnalyzer::inspectCanvas(PdfCanvas* canvas, QList<PDFColorSpace> & usedCo
|
||||
}
|
||||
args.clear();
|
||||
}
|
||||
+#if (PODOFO_VERSION >= PODOFO_MAKE_VERSION(1, 0, 0))
|
||||
+ if (pdfContent.GetType() == PdfContentType::DoXObject)
|
||||
+#else
|
||||
if (pdfContent.Type == PdfContentType::DoXObject)
|
||||
+#endif
|
||||
{
|
||||
args.clear();
|
||||
+#if (PODOFO_VERSION >= PODOFO_MAKE_VERSION(1, 0, 0))
|
||||
+ const auto& pdfContentStack = pdfContent.GetStack();
|
||||
+ size_t stackSize = pdfContentStack.size();
|
||||
+ for (size_t i = 0; i < stackSize; ++i)
|
||||
+ args.append(pdfContentStack[stackSize - 1 - i]);
|
||||
+#else
|
||||
size_t stackSize = pdfContent.Stack.size();
|
||||
for (size_t i = 0; i < stackSize; ++i)
|
||||
args.append(pdfContent.Stack[stackSize - 1 - i]);
|
||||
+#endif
|
||||
if (!processedNamedXObj.contains(args[0].GetName()))
|
||||
{
|
||||
if (args.size() == 1 && args[0].IsName() && xObjectsDict)
|
||||
diff --git a/scribus/pdflib_core.cpp b/scribus/pdflib_core.cpp
|
||||
index 3465ccd..5c6ebd1 100644
|
||||
--- a/scribus/pdflib_core.cpp
|
||||
+++ b/scribus/pdflib_core.cpp
|
||||
@@ -9834,7 +9834,11 @@ bool PDFLibCore::PDF_EmbeddedPDF(PageItem* c, const QString& fn, double sx, doub
|
||||
PoDoFo::PdfPage& page = doc->GetPages().GetPageAt(qMin(qMax(1, c->pixm.imgInfo.actualPageNumber), c->pixm.imgInfo.numberOfPages) - 1);
|
||||
PoDoFo::PdfObject& pageObj = page.GetObject();
|
||||
PoDoFo::PdfObject* contents = page.GetContents() ? &(page.GetContents()->GetObject()) : nullptr;
|
||||
+#if (PODOFO_VERSION >= PODOFO_MAKE_VERSION(1, 0, 0))
|
||||
+ const PoDoFo::PdfObject* resources = &(page.GetResources().GetObject());
|
||||
+#else
|
||||
PoDoFo::PdfObject* resources = page.GetResources() ? &(page.GetResources()->GetObject()) : nullptr;
|
||||
+#endif
|
||||
PoDoFo::PdfDictionary* pageObjDict = pageObj.IsDictionary() ? &(pageObj.GetDictionary()) : nullptr;
|
||||
for (PoDoFo::PdfDictionary* par = pageObjDict, *parentDict = nullptr; par && !resources; par = parentDict)
|
||||
{
|
||||
@@ -9855,8 +9859,15 @@ bool PDFLibCore::PDF_EmbeddedPDF(PageItem* c, const QString& fn, double sx, doub
|
||||
importedObjects[page.GetObject().GetIndirectReference()] = xObj;
|
||||
writer.startObj(xObj);
|
||||
PutDoc("<<\n/Type /XObject\n/Subtype /Form\n/FormType 1");
|
||||
+#if (PODOFO_VERSION >= PODOFO_MAKE_VERSION(1, 0, 0))
|
||||
+ PoDoFo::Rect pageRect = page.GetArtBoxRaw().GetNormalized(); // Because scimagedataloader_pdf use ArtBox
|
||||
+ double rotation = 0;
|
||||
+ if (!page.TryGetRotationRaw(rotation))
|
||||
+ rotation = 0;
|
||||
+#else
|
||||
PoDoFo::Rect pageRect = page.GetArtBox(true); // Because scimagedataloader_pdf use ArtBox
|
||||
int rotation = page.GetRotationRaw();
|
||||
+#endif
|
||||
double imgWidth = (rotation == 90 || rotation == 270) ? pageRect.Height : pageRect.Width;
|
||||
double imgHeight = (rotation == 90 || rotation == 270) ? pageRect.Width : pageRect.Height;
|
||||
QTransform pageM;
|
||||
@@ -9976,8 +9987,15 @@ bool PDFLibCore::PDF_EmbeddedPDF(PageItem* c, const QString& fn, double sx, doub
|
||||
importedObjects[page.GetObject().GetIndirectReference()] = xObj;
|
||||
writer.startObj(xObj);
|
||||
PutDoc("<<\n/Type /XObject\n/Subtype /Form\n/FormType 1");
|
||||
+#if (PODOFO_VERSION >= PODOFO_MAKE_VERSION(1, 0, 0))
|
||||
+ PoDoFo::Rect pageRect = page.GetArtBoxRaw().GetNormalized(); // Because scimagedataloader_pdf use ArtBox
|
||||
+ double rotation = 0;
|
||||
+ if (!page.TryGetRotationRaw(rotation))
|
||||
+ rotation = 0;
|
||||
+#else
|
||||
PoDoFo::Rect pageRect = page.GetArtBox(true); // Because scimagedataloader_pdf use ArtBox
|
||||
int rotation = page.GetRotationRaw();
|
||||
+#endif
|
||||
double imgWidth = (rotation == 90 || rotation == 270) ? pageRect.Height : pageRect.Width;
|
||||
double imgHeight = (rotation == 90 || rotation == 270) ? pageRect.Width : pageRect.Height;
|
||||
QTransform pageM;
|
||||
--
|
||||
2.49.0
|
||||
|
||||
30
0001-Fix-build-with-poppler-25.06.0.patch
Normal file
30
0001-Fix-build-with-poppler-25.06.0.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
From 5386d1fd7e33d94d9caa33b1f166e60c1338e5e5 Mon Sep 17 00:00:00 2001
|
||||
From: jghali <jghali@11d20701-8431-0410-a711-e3c959e3b870>
|
||||
Date: Tue, 3 Jun 2025 22:50:26 +0000
|
||||
Subject: [PATCH] Fix build with poppler 25.06.0
|
||||
|
||||
git-svn-id: svn://scribus.net/trunk/Scribus@26919 11d20701-8431-0410-a711-e3c959e3b870
|
||||
---
|
||||
scribus/plugins/import/pdf/slaoutput.cpp | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
index 418df0a..3c65c3f 100644
|
||||
--- a/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||
@@ -606,7 +606,12 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor,
|
||||
FormWidget *fm = m_formWidgets->getWidget(i);
|
||||
if (!fm)
|
||||
continue;
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 06, 0)
|
||||
+ std::shared_ptr<AnnotWidget> anoSharedPtr = fm->getWidgetAnnotation();
|
||||
+ AnnotWidget* ano = anoSharedPtr.get();
|
||||
+#else
|
||||
AnnotWidget *ano = fm->getWidgetAnnotation();
|
||||
+#endif
|
||||
if (!ano)
|
||||
continue;
|
||||
if (ano != (AnnotWidget*) annota)
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7eff9b1f47e372e56bb369f1dbe18fe49101789b5e6bcfdb7890e0346b641383
|
||||
size 73129400
|
||||
@@ -1,6 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iF0EABECAB0WIQRlWL6E0nJzpDihURmL6kgRiuvuZAUCZm2mxQAKCRCL6kgRiuvu
|
||||
ZArHAJ0Ru6M6nyTplBSK4zzmPb2q7eqHrACfYR3rpqPw7A2/Acw3CDJ/NL8St5U=
|
||||
=hugY
|
||||
-----END PGP SIGNATURE-----
|
||||
3
scribus-1.6.4.tar.xz
Normal file
3
scribus-1.6.4.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:533be7af03acfaa736ec5f7a3fc2562abd200fef5ca2a7cdee02b5f44d61829e
|
||||
size 74761856
|
||||
6
scribus-1.6.4.tar.xz.asc
Normal file
6
scribus-1.6.4.tar.xz.asc
Normal file
@@ -0,0 +1,6 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iF0EABECAB0WIQRlWL6E0nJzpDihURmL6kgRiuvuZAUCaAUFVAAKCRCL6kgRiuvu
|
||||
ZFWiAKCAiEPNRcY2nmc8xFn5u1zudqqvLACdFLIANX9Q1CoXHCXjLYdE9vG1Yio=
|
||||
=G20f
|
||||
-----END PGP SIGNATURE-----
|
||||
@@ -1,3 +1,53 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 8 08:55:14 UTC 2025 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
- Update to 1.6.4:
|
||||
* Avoid custom font encodings when embedding TTF fonts in PDFs.
|
||||
* Fixes to PDF import and export, and checkbox rendering on MS
|
||||
Edge.
|
||||
* Fixes for PDF/X-4 export when attempting to use ICC profile
|
||||
unsuitable for output.
|
||||
* Fixes some images being incorrectly imported as black when
|
||||
importing PDF.
|
||||
* Addressed compilation issues when building against newer
|
||||
versions of poppler.
|
||||
* Added new Python functions for page sizing, bounding boxes
|
||||
for page items, min/max word kerning and a fix to locked
|
||||
layer detection.
|
||||
* Updated translation files
|
||||
- Drop patch, merged upstream:
|
||||
* 0001-Fix-build-error-with-poppler-25.02.0.patch
|
||||
- Add patches:
|
||||
* 0001-Fix-build-with-poppler-25.06.0.patch
|
||||
* 0001-Fix-build-with-PoDoFo-1.0.0.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
|
||||
32
scribus.spec
32
scribus.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package scribus
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# Copyright (c) 2025 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,13 +19,21 @@
|
||||
|
||||
%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.2
|
||||
Version: 1.6.4
|
||||
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.2/
|
||||
# https://sourceforge.net/projects/scribus/files/scribus/1.6.4/
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
%if %{with released}
|
||||
Source1: %{name}-%{version}.tar.xz.asc
|
||||
@@ -33,8 +41,10 @@ Source2: scribus.keyring
|
||||
%endif
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch0: 0001-Make-sure-information-displayed-on-the-about-window-.patch
|
||||
# PATCH-FIX-UPSTREAM poppler...
|
||||
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch1: 0001-Fix-build-with-poppler-25.06.0.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch2: 0001-Fix-build-with-PoDoFo-1.0.0.patch
|
||||
BuildRequires: cmake >= 3.14.0
|
||||
BuildRequires: cups-devel
|
||||
BuildRequires: dos2unix
|
||||
@@ -56,7 +66,7 @@ BuildRequires: libwpd-devel
|
||||
BuildRequires: libwpg-devel
|
||||
BuildRequires: libzmf-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: %{pyver}-devel
|
||||
BuildRequires: cmake(Qt5Core) >= 5.14.0
|
||||
BuildRequires: cmake(Qt5Gui)
|
||||
BuildRequires: cmake(Qt5LinguistTools)
|
||||
@@ -68,7 +78,6 @@ BuildRequires: cmake(Qt5Widgets)
|
||||
BuildRequires: cmake(Qt5Xml)
|
||||
BuildRequires: pkgconfig(GraphicsMagick)
|
||||
BuildRequires: pkgconfig(cairo)
|
||||
BuildRequires: pkgconfig(libpng16)
|
||||
BuildRequires: pkgconfig(fontconfig)
|
||||
BuildRequires: pkgconfig(freetype2)
|
||||
BuildRequires: pkgconfig(harfbuzz)
|
||||
@@ -77,13 +86,14 @@ 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: python3-Pillow
|
||||
Recommends: python3-tk
|
||||
Recommends: %{pyver}-Pillow
|
||||
Recommends: %{pyver}-tk
|
||||
Recommends: scribus-doc
|
||||
# Not packaged anymore
|
||||
Provides: scribus-devel = %{version}
|
||||
@@ -114,7 +124,11 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user