* [bug#68203] [PATCH] gnu: scribus: Update to 1.6.0
@ 2024-01-02 7:32 Andy Tai
2024-01-02 14:25 ` Nicolas Goaziou via Guix-patches via
2024-01-06 6:53 ` [bug#68203] [PATCH v2] " Andy Tai
0 siblings, 2 replies; 5+ messages in thread
From: Andy Tai @ 2024-01-02 7:32 UTC (permalink / raw)
To: 68203; +Cc: Andy Tai
* gnu/packages/scribus.scm (scribus): Update to 1.6.0
Change-Id: I5ed35e9a8fe8b9473a0fe90599769088a0837419
---
gnu/packages/scribus.scm | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm
index ba32361575..b8c845edd5 100644
--- a/gnu/packages/scribus.scm
+++ b/gnu/packages/scribus.scm
@@ -50,20 +50,14 @@ (define-module (gnu packages scribus)
(define-public scribus
(package
(name "scribus")
- (version "1.5.8")
+ (version "1.6.0")
(source
(origin
(method url-fetch)
- (uri (string-append "mirror://sourceforge/scribus/scribus-devel/"
- version "/scribus-" version ".tar.xz"))
+ (uri (string-append "mirror://sourceforge/scribus/scribus/"
+ version "/scribus-" version ".tar.gz"))
(sha256
- (base32 "0x3bw58v920akca8jxvsfwf468pzjyglk93ay67ph1bdry7nx0a7"))
- (patches
- (search-patches "scribus-1.5.8-poppler-22.2.0-1.patch"
- "scribus-1.5.8-poppler-22.2.0-2.patch"
- "scribus-1.5.8-poppler-22.03.0.patch"
- "scribus-1.5.8-poppler-22.04.0.patch"
- "scribus-1.5.8-poppler-22.09.0.patch"))))
+ (base32 "10ixrvi1rn20r8nni6cllvkszcx77pyca68vrixjsy7nk1brx9nw"))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f ;no test target
base-commit: f2102cb5b9239be2ed2023b908b726af542e0124
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#68203] [PATCH] gnu: scribus: Update to 1.6.0
2024-01-02 7:32 [bug#68203] [PATCH] gnu: scribus: Update to 1.6.0 Andy Tai
@ 2024-01-02 14:25 ` Nicolas Goaziou via Guix-patches via
2024-01-04 21:53 ` Andy Tai
2024-01-06 6:53 ` [bug#68203] [PATCH v2] " Andy Tai
1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Goaziou via Guix-patches via @ 2024-01-02 14:25 UTC (permalink / raw)
To: Andy Tai; +Cc: 68203
Hello,
Andy Tai <atai@atai.org> writes:
> * gnu/packages/scribus.scm (scribus): Update to 1.6.0
Thanks.
> - (patches
> - (search-patches "scribus-1.5.8-poppler-22.2.0-1.patch"
> - "scribus-1.5.8-poppler-22.2.0-2.patch"
> - "scribus-1.5.8-poppler-22.03.0.patch"
> - "scribus-1.5.8-poppler-22.04.0.patch"
> - "scribus-1.5.8-poppler-22.09.0.patch"))))
> + (base32 "10ixrvi1rn20r8nni6cllvkszcx77pyca68vrixjsy7nk1brx9nw"))))
It looks like you forgot to delete the patch files, and update local.mk accordingly.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#68203] [PATCH] gnu: scribus: Update to 1.6.0
2024-01-02 14:25 ` Nicolas Goaziou via Guix-patches via
@ 2024-01-04 21:53 ` Andy Tai
0 siblings, 0 replies; 5+ messages in thread
From: Andy Tai @ 2024-01-04 21:53 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: 68203
will send updated patch
On Tue, Jan 2, 2024 at 6:25 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
>
> > - (patches
> > - (search-patches "scribus-1.5.8-poppler-22.2.0-1.patch"
> > - "scribus-1.5.8-poppler-22.2.0-2.patch"
> > - "scribus-1.5.8-poppler-22.03.0.patch"
> > - "scribus-1.5.8-poppler-22.04.0.patch"
> > - "scribus-1.5.8-poppler-22.09.0.patch"))))
> > + (base32 "10ixrvi1rn20r8nni6cllvkszcx77pyca68vrixjsy7nk1brx9nw"))))
>
> It looks like you forgot to delete the patch files, and update local.mk accordingly.
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#68203] [PATCH v2] gnu: scribus: Update to 1.6.0
2024-01-02 7:32 [bug#68203] [PATCH] gnu: scribus: Update to 1.6.0 Andy Tai
2024-01-02 14:25 ` Nicolas Goaziou via Guix-patches via
@ 2024-01-06 6:53 ` Andy Tai
2024-03-04 17:39 ` bug#68203: " Nicolas Goaziou via Guix-patches via
1 sibling, 1 reply; 5+ messages in thread
From: Andy Tai @ 2024-01-06 6:53 UTC (permalink / raw)
To: 68203
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: v2-0001-gnu-scribus-Update-to-1.6.0.patch --]
[-- Type: text/x-patch, Size: 25045 bytes --]
From d999845778edfec6a5b06871383605d5e850b0d6 Mon Sep 17 00:00:00 2001
Message-Id: <d999845778edfec6a5b06871383605d5e850b0d6.1704523803.git.atai@atai.org>
From: Andy Tai <atai@atai.org>
Date: Mon, 1 Jan 2024 23:32:18 -0800
Subject: [PATCH v2] gnu: scribus: Update to 1.6.0
To: 68203@debbugs.gnu.org
* gnu/packages/scribus.scm (scribus): Update to 1.6.0.
* gnu/packages/patches/scribus-1.5.8-poppler-22.03.0.patch: Delete file.
* gnu/packages/patches/scribus-1.5.8-poppler-22.04.0.patch: Delete file.
* gnu/packages/patches/scribus-1.5.8-poppler-22.09.0.patch: Delete file.
* gnu/packages/patches/scribus-1.5.8-poppler-22.2.0-1.patch: Delete file.
* gnu/packages/patches/scribus-1.5.8-poppler-22.2.0-2.patch" Delete file.
* gnu/local.mk: Apply file removal.
Change-Id: I5ed35e9a8fe8b9473a0fe90599769088a0837419
---
gnu/local.mk | 5 -
.../scribus-1.5.8-poppler-22.03.0.patch | 52 ----
.../scribus-1.5.8-poppler-22.04.0.patch | 291 ------------------
.../scribus-1.5.8-poppler-22.09.0.patch | 20 --
.../scribus-1.5.8-poppler-22.2.0-1.patch | 129 --------
.../scribus-1.5.8-poppler-22.2.0-2.patch | 28 --
gnu/packages/scribus.scm | 14 +-
7 files changed, 4 insertions(+), 535 deletions(-)
delete mode 100644 gnu/packages/patches/scribus-1.5.8-poppler-22.03.0.patch
delete mode 100644 gnu/packages/patches/scribus-1.5.8-poppler-22.04.0.patch
delete mode 100644 gnu/packages/patches/scribus-1.5.8-poppler-22.09.0.patch
delete mode 100644 gnu/packages/patches/scribus-1.5.8-poppler-22.2.0-1.patch
delete mode 100644 gnu/packages/patches/scribus-1.5.8-poppler-22.2.0-2.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index f804f4ef5b..cb6200c176 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1788,11 +1788,6 @@ dist_patch_DATA = \
%D%/packages/patches/quodlibet-fix-invalid-glob.patch \
%D%/packages/patches/quodlibet-fix-mtime-tests.patch \
%D%/packages/patches/qxlsx-fix-include-directory.patch \
- %D%/packages/patches/scribus-1.5.8-poppler-22.03.0.patch \
- %D%/packages/patches/scribus-1.5.8-poppler-22.04.0.patch \
- %D%/packages/patches/scribus-1.5.8-poppler-22.09.0.patch \
- %D%/packages/patches/scribus-1.5.8-poppler-22.2.0-1.patch \
- %D%/packages/patches/scribus-1.5.8-poppler-22.2.0-2.patch \
%D%/packages/patches/sdcc-disable-non-free-code.patch \
%D%/packages/patches/sdl-pango-api_additions.patch \
%D%/packages/patches/sdl-pango-blit_overflow.patch \
diff --git a/gnu/packages/patches/scribus-1.5.8-poppler-22.03.0.patch b/gnu/packages/patches/scribus-1.5.8-poppler-22.03.0.patch
deleted file mode 100644
index f7a0c03fdd..0000000000
--- a/gnu/packages/patches/scribus-1.5.8-poppler-22.03.0.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From f19410ac3b27e33dd62105746784e61e85b90a1d Mon Sep 17 00:00:00 2001
-From: Jean Ghali <jghali@libertysurf.fr>
-Date: Wed, 2 Mar 2022 22:22:53 +0000
-Subject: [PATCH] #16764: Build break with poppler 22.03.0
-
-git-svn-id: svn://scribus.net/trunk/Scribus@24982 11d20701-8431-0410-a711-e3c959e3b870
----
- scribus/plugins/import/pdf/importpdf.cpp | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp
-index 154e58a3f0..392dcd9e64 100644
---- a/scribus/plugins/import/pdf/importpdf.cpp
-+++ b/scribus/plugins/import/pdf/importpdf.cpp
-@@ -89,7 +89,11 @@ QImage PdfPlug::readThumbnail(const QString& fName)
- #endif
- globalParams->setErrQuiet(gTrue);
-
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0)
-+ PDFDoc pdfDoc{ std::make_unique<GooString>(fname) };
-+#else
- PDFDoc pdfDoc{fname, nullptr, nullptr, nullptr};
-+#endif
- if (!pdfDoc.isOk() || pdfDoc.getErrorCode() == errEncrypted)
- return QImage();
-
-@@ -342,7 +346,11 @@ bool PdfPlug::convert(const QString& fn)
- globalParams->setErrQuiet(gTrue);
- // globalParams->setPrintCommands(gTrue);
- QList<OptionalContentGroup*> ocgGroups;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0)
-+ auto pdfDoc = std::make_unique<PDFDoc>(std::make_unique<GooString>(fname));
-+#else
- auto pdfDoc = std::unique_ptr<PDFDoc>(new PDFDoc(fname, nullptr, nullptr, nullptr));
-+#endif
- if (pdfDoc)
- {
- if (pdfDoc->getErrorCode() == errEncrypted)
-@@ -361,8 +369,13 @@ bool PdfPlug::convert(const QString& fn)
- #else
- auto fname = new GooString(QFile::encodeName(fn).data());
- #endif
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0)
-+ std::optional<GooString> userPW(std::in_place, text.toLocal8Bit().data());
-+ pdfDoc.reset(new PDFDoc(std::make_unique<GooString>(fname), userPW, userPW, nullptr));
-+#else
- auto userPW = new GooString(text.toLocal8Bit().data());
- pdfDoc.reset(new PDFDoc(fname, userPW, userPW, nullptr));
-+#endif
- qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
- }
- if ((!pdfDoc) || (pdfDoc->getErrorCode() != errNone))
diff --git a/gnu/packages/patches/scribus-1.5.8-poppler-22.04.0.patch b/gnu/packages/patches/scribus-1.5.8-poppler-22.04.0.patch
deleted file mode 100644
index 290484e7e8..0000000000
--- a/gnu/packages/patches/scribus-1.5.8-poppler-22.04.0.patch
+++ /dev/null
@@ -1,291 +0,0 @@
-https://bugs.gentoo.org/843287
-https://github.com/scribusproject/scribus/commit/f2237b8f0b5cf7690e864a22ef7a63a6d769fa36.patch
-
-From f2237b8f0b5cf7690e864a22ef7a63a6d769fa36 Mon Sep 17 00:00:00 2001
-From: Jean Ghali <jghali@libertysurf.fr>
-Date: Fri, 1 Apr 2022 23:52:32 +0000
-Subject: [PATCH] Fix build with poppler 22.04.0
-
-git-svn-id: svn://scribus.net/trunk/Scribus@25074 11d20701-8431-0410-a711-e3c959e3b870
----
- scribus/plugins/import/pdf/slaoutput.cpp | 123 ++++++++++++++---------
- 1 file changed, 78 insertions(+), 45 deletions(-)
-
-diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
-index e20a81f99e..5626fe3477 100644
---- a/scribus/plugins/import/pdf/slaoutput.cpp
-+++ b/scribus/plugins/import/pdf/slaoutput.cpp
-@@ -174,8 +174,13 @@ void AnoOutputDev::drawString(GfxState *state, POPPLER_CONST GooString *s)
- int shade = 100;
- currColorText = getColor(state->getFillColorSpace(), state->getFillColor(), &shade);
- fontSize = state->getFontSize();
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
-+ if (state->getFont() && state->getFont()->getName())
-+ fontName = new GooString(state->getFont()->getName().value());
-+#else
- if (state->getFont())
- fontName = state->getFont()->getName()->copy();
-+#endif
- itemText = s->copy();
- }
-
-@@ -357,7 +362,12 @@ std::unique_ptr<LinkAction> SlaOutputDev::SC_getAdditionalAction(const char *key
- GBool SlaOutputDev::annotations_callback(Annot *annota, void *user_data)
- {
- SlaOutputDev *dev = (SlaOutputDev*)user_data;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
-+ const PDFRectangle& annotRect = annota->getRect();;
-+ const PDFRectangle* box = &annotRect;
-+#else
- PDFRectangle *box = annota->getRect();
-+#endif
- double xCoor = dev->m_doc->currentPage()->xOffset() + box->x1 - dev->cropOffsetX;
- double yCoor = dev->m_doc->currentPage()->yOffset() + dev->m_doc->currentPage()->height() - box->y2 + dev->cropOffsetY;
- double width = box->x2 - box->x1;
-@@ -684,7 +694,12 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor,
- if (apa || !achar)
- {
- AnoOutputDev *annotOutDev = new AnoOutputDev(m_doc, m_importedColors);
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
-+ const PDFRectangle& annotaRect = annota->getRect();
-+ Gfx* gfx = new Gfx(pdfDoc, annotOutDev, pdfDoc->getPage(m_actPage)->getResourceDict(), &annotaRect, nullptr);
-+#else
- Gfx *gfx = new Gfx(pdfDoc, annotOutDev, pdfDoc->getPage(m_actPage)->getResourceDict(), annota->getRect(), nullptr);
-+#endif
- ano->draw(gfx, false);
- if (!bgFound)
- m_currColorFill = annotOutDev->currColorFill;
-@@ -2916,22 +2931,27 @@ void SlaOutputDev::markPoint(POPPLER_CONST char *name, Dict *properties)
-
- void SlaOutputDev::updateFont(GfxState *state)
- {
-- GfxFont *gfxFont;
--#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
-+ std::optional<GfxFontLoc> fontLoc;
-+ std::string fileName;
-+ std::unique_ptr<FoFiTrueType> ff;
-+ std::optional<std::vector<unsigned char>> tmpBuf;
-+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
- std::optional<GfxFontLoc> fontLoc;
- const GooString * fileName = nullptr;
- std::unique_ptr<FoFiTrueType> ff;
-+ char* tmpBuf = nullptr;
- #else
- GfxFontLoc * fontLoc = nullptr;
- GooString * fileName = nullptr;
- FoFiTrueType * ff = nullptr;
-+ char* tmpBuf = nullptr;
- #endif
- GfxFontType fontType;
- SlaOutFontFileID *id;
- SplashFontFile *fontFile;
- SplashFontSrc *fontsrc = nullptr;
- Object refObj, strObj;
-- char *tmpBuf = nullptr;
- int tmpBufLen = 0;
- int *codeToGID = nullptr;
- const double *textMat = nullptr;
-@@ -2943,7 +2963,11 @@ void SlaOutputDev::updateFont(GfxState *state)
-
- m_font = nullptr;
-
-- gfxFont = state->getFont();
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
-+ GfxFont* gfxFont = state->getFont().get();
-+#else
-+ GfxFont* gfxFont = state->getFont();
-+#endif
- if (!gfxFont)
- goto err1;
-
-@@ -2968,15 +2992,23 @@ void SlaOutputDev::updateFont(GfxState *state)
- if (fontLoc->locType == gfxFontLocEmbedded)
- {
- // if there is an embedded font, read it to memory
-- tmpBuf = gfxFont->readEmbFontFile(xref, &tmpBufLen);
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
-+ tmpBuf = gfxFont->readEmbFontFile((xref) ? xref : pdfDoc->getXRef());
- if (! tmpBuf)
- goto err2;
-+#else
-+ tmpBuf = gfxFont->readEmbFontFile(xref, &tmpBufLen);
-+ if (!tmpBuf)
-+ goto err2;
-+#endif
-
- // external font
- }
- else
- { // gfxFontLocExternal
--#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
-+ fileName = fontLoc->path;
-+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
- fileName = fontLoc->pathAsGooString();
- #else
- fileName = fontLoc->path;
-@@ -2985,52 +3017,54 @@ void SlaOutputDev::updateFont(GfxState *state)
- }
-
- fontsrc = new SplashFontSrc;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
-+ if (!fileName.empty())
-+ fontsrc->setFile(fileName);
-+ else
-+ fontsrc->setBuf(std::move(tmpBuf.value()));
-+#else
- if (fileName)
- fontsrc->setFile(fileName, gFalse);
- else
- fontsrc->setBuf(tmpBuf, tmpBufLen, gTrue);
-+#endif
-
- // load the font file
- switch (fontType) {
- case fontType1:
-- if (!(fontFile = m_fontEngine->loadType1Font(
-- id,
-- fontsrc,
-- (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
-+ if (!(fontFile = m_fontEngine->loadType1Font(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
- {
-- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
- goto err2;
- }
- break;
- case fontType1C:
-- if (!(fontFile = m_fontEngine->loadType1CFont(
-- id,
-- fontsrc,
-- (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
-+ if (!(fontFile = m_fontEngine->loadType1CFont(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
- {
-- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
- goto err2;
- }
- break;
- case fontType1COT:
-- if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(
-- id,
-- fontsrc,
-- (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
-+ if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(id, fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding())))
- {
-- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
- goto err2;
- }
- break;
- case fontTrueType:
- case fontTrueTypeOT:
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
-+ if (!fileName.empty())
-+ ff = FoFiTrueType::load(fileName.c_str());
-+ else
-+ ff = FoFiTrueType::make(fontsrc->buf.data(), fontsrc->buf.size());
-+#else
- if (fileName)
- ff = FoFiTrueType::load(fileName->getCString());
- else
- ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
-+#endif
- if (ff)
- {
- #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
-@@ -3047,24 +3081,17 @@ void SlaOutputDev::updateFont(GfxState *state)
- codeToGID = nullptr;
- n = 0;
- }
-- if (!(fontFile = m_fontEngine->loadTrueTypeFont(
-- id,
-- fontsrc,
-- codeToGID, n)))
-+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(id, fontsrc, codeToGID, n)))
- {
-- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
- goto err2;
- }
- break;
- case fontCIDType0:
- case fontCIDType0C:
-- if (!(fontFile = m_fontEngine->loadCIDFont(
-- id,
-- fontsrc)))
-+ if (!(fontFile = m_fontEngine->loadCIDFont(id, fontsrc)))
- {
-- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
- goto err2;
- }
- break;
-@@ -3080,10 +3107,7 @@ void SlaOutputDev::updateFont(GfxState *state)
- codeToGID = nullptr;
- n = 0;
- }
-- if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(
-- id,
-- fontsrc,
-- codeToGID, n)))
-+ if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(id, fontsrc, codeToGID, n)))
- {
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-@@ -3105,10 +3129,17 @@ void SlaOutputDev::updateFont(GfxState *state)
- }
- else
- {
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
-+ if (!fileName.empty())
-+ ff = FoFiTrueType::load(fileName.c_str());
-+ else
-+ ff = FoFiTrueType::make(fontsrc->buf.data(), fontsrc->buf.size());
-+#else
- if (fileName)
- ff = FoFiTrueType::load(fileName->getCString());
- else
- ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
-+#endif
- if (! ff)
- goto err2;
- #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
-@@ -3119,13 +3150,9 @@ void SlaOutputDev::updateFont(GfxState *state)
- delete ff;
- #endif
- }
-- if (!(fontFile = m_fontEngine->loadTrueTypeFont(
-- id,
-- fontsrc,
-- codeToGID, n, faceIndex)))
-+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(id, fontsrc, codeToGID, n, faceIndex)))
- {
-- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
- goto err2;
- }
- break;
-@@ -3269,9 +3296,15 @@ void SlaOutputDev::drawChar(GfxState* state, double x, double y, double dx, doub
- GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, POPPLER_CONST_082 Unicode *u, int uLen)
- {
- // qDebug() << "beginType3Char";
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 4, 0)
- GfxFont *gfxFont;
-+ if (!(gfxFont = state->getFont().get()))
-+ return gTrue;
-+#else
-+ GfxFont* gfxFont;
- if (!(gfxFont = state->getFont()))
- return gTrue;
-+#endif
- if (gfxFont->getType() != fontType3)
- return gTrue;
- F3Entry f3e;
diff --git a/gnu/packages/patches/scribus-1.5.8-poppler-22.09.0.patch b/gnu/packages/patches/scribus-1.5.8-poppler-22.09.0.patch
deleted file mode 100644
index 106a6f5162..0000000000
--- a/gnu/packages/patches/scribus-1.5.8-poppler-22.09.0.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/scribus/plugins/import/pdf/slaoutput.cpp
-+++ b/scribus/plugins/import/pdf/slaoutput.cpp
-@@ -3741,9 +3741,16 @@ void SlaOutputDev::getPenState(GfxState *state)
- break;
- }
- double lw = state->getLineWidth();
-- double *dashPattern;
- int dashLength;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 9, 0)
-+ const double *dashPattern;
-+ const std::vector<double> &dash = state->getLineDash(&DashOffset);
-+ dashPattern = dash.data();
-+ dashLength = dash.size();
-+#else
-+ double *dashPattern;
- state->getLineDash(&dashPattern, &dashLength, &DashOffset);
-+#endif
- QVector<double> pattern(dashLength);
- for (int i = 0; i < dashLength; ++i)
- {
diff --git a/gnu/packages/patches/scribus-1.5.8-poppler-22.2.0-1.patch b/gnu/packages/patches/scribus-1.5.8-poppler-22.2.0-1.patch
deleted file mode 100644
index 4e0f607c6a..0000000000
--- a/gnu/packages/patches/scribus-1.5.8-poppler-22.2.0-1.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-From 85c0dff3422fa3c26fbc2e8d8561f597ec24bd92 Mon Sep 17 00:00:00 2001
-From: Jean Ghali <jghali@libertysurf.fr>
-Date: Wed, 2 Feb 2022 23:12:52 +0000
-Subject: [PATCH] #16734: Build break with poppler 22.2.0
-
-git-svn-id: svn://scribus.net/trunk/Scribus@24884 11d20701-8431-0410-a711-e3c959e3b870
----
- scribus/plugins/import/pdf/slaoutput.cpp | 47 +++++++++++++++++++-----
- 1 file changed, 37 insertions(+), 10 deletions(-)
-
-diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
-index 5894bf2ad6..3650c96f52 100644
---- a/scribus/plugins/import/pdf/slaoutput.cpp
-+++ b/scribus/plugins/import/pdf/slaoutput.cpp
-@@ -7,6 +7,11 @@ for which a new license (GPL+exception) is in place.
-
- #include "slaoutput.h"
-
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
-+#include <memory>
-+#include <optional>
-+#endif
-+
- #include <poppler/GlobalParams.h>
- #include <poppler/poppler-config.h>
- #include <poppler/FileSpec.h>
-@@ -3027,18 +3032,24 @@ void SlaOutputDev::markPoint(POPPLER_CONST char *name, Dict *properties)
- void SlaOutputDev::updateFont(GfxState *state)
- {
- GfxFont *gfxFont;
-- GfxFontLoc *fontLoc;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
-+ std::optional<GfxFontLoc> fontLoc;
-+ const GooString * fileName = nullptr;
-+ std::unique_ptr<FoFiTrueType> ff;
-+#else
-+ GfxFontLoc * fontLoc = nullptr;
-+ GooString * fileName = nullptr;
-+ FoFiTrueType * ff = nullptr;
-+#endif
- GfxFontType fontType;
- SlaOutFontFileID *id;
- SplashFontFile *fontFile;
- SplashFontSrc *fontsrc = nullptr;
-- FoFiTrueType *ff;
- Object refObj, strObj;
-- GooString *fileName;
-- char *tmpBuf;
-+ char *tmpBuf = nullptr;
- int tmpBufLen = 0;
-- int *codeToGID;
-- const double *textMat;
-+ int *codeToGID = nullptr;
-+ const double *textMat = nullptr;
- double m11, m12, m21, m22, fontSize;
- SplashCoord mat[4];
- int n = 0;
-@@ -3046,9 +3057,6 @@ void SlaOutputDev::updateFont(GfxState *state)
- SplashCoord matrix[6];
-
- m_font = nullptr;
-- fileName = nullptr;
-- tmpBuf = nullptr;
-- fontLoc = nullptr;
-
- gfxFont = state->getFont();
- if (!gfxFont)
-@@ -3083,7 +3091,11 @@ void SlaOutputDev::updateFont(GfxState *state)
- }
- else
- { // gfxFontLocExternal
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
-+ fileName = fontLoc->pathAsGooString();
-+#else
- fileName = fontLoc->path;
-+#endif
- fontType = fontLoc->fontType;
- }
-
-@@ -3136,9 +3148,14 @@ void SlaOutputDev::updateFont(GfxState *state)
- ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
- if (ff)
- {
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
-+ codeToGID = ((Gfx8BitFont*) gfxFont)->getCodeToGIDMap(ff.get());
-+ ff.reset();
-+#else
- codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
-- n = 256;
- delete ff;
-+#endif
-+ n = 256;
- }
- else
- {
-@@ -3209,8 +3226,13 @@ void SlaOutputDev::updateFont(GfxState *state)
- ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
- if (! ff)
- goto err2;
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
-+ codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get(), &n);
-+ ff.reset();
-+#else
- codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n);
- delete ff;
-+#endif
- }
- if (!(fontFile = m_fontEngine->loadTrueTypeFont(
- id,
-@@ -3247,14 +3269,19 @@ void SlaOutputDev::updateFont(GfxState *state)
- mat[3] = -m22;
- m_font = m_fontEngine->getFont(fontFile, mat, matrix);
-
-+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 2, 0)
- delete fontLoc;
-+#endif
- if (fontsrc && !fontsrc->isFile)
- fontsrc->unref();
- return;
-
- err2:
- delete id;
-+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 2, 0)
- delete fontLoc;
-+#endif
-+
- err1:
- if (fontsrc && !fontsrc->isFile)
- fontsrc->unref();
diff --git a/gnu/packages/patches/scribus-1.5.8-poppler-22.2.0-2.patch b/gnu/packages/patches/scribus-1.5.8-poppler-22.2.0-2.patch
deleted file mode 100644
index 73beac2d70..0000000000
--- a/gnu/packages/patches/scribus-1.5.8-poppler-22.2.0-2.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From f75c1613db67f4067643d0218a2db3235e42ec9f Mon Sep 17 00:00:00 2001
-From: Jean Ghali <jghali@libertysurf.fr>
-Date: Thu, 3 Feb 2022 19:46:13 +0000
-Subject: [PATCH] Small update vs latest code in poppler
-
-git-svn-id: svn://scribus.net/trunk/Scribus@24885 11d20701-8431-0410-a711-e3c959e3b870
----
- scribus/plugins/import/pdf/slaoutput.cpp | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
-index 3650c96f52..a6f4e00fa9 100644
---- a/scribus/plugins/import/pdf/slaoutput.cpp
-+++ b/scribus/plugins/import/pdf/slaoutput.cpp
-@@ -3072,10 +3072,10 @@ void SlaOutputDev::updateFont(GfxState *state)
- delete id;
- else
- {
-- if (!(fontLoc = gfxFont->locateFont(xref, nullptr)))
-+ fontLoc = gfxFont->locateFont((xref) ? xref : pdfDoc->getXRef(), nullptr);
-+ if (!fontLoc)
- {
-- error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
- goto err2;
- }
-
diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm
index ba32361575..b8c845edd5 100644
--- a/gnu/packages/scribus.scm
+++ b/gnu/packages/scribus.scm
@@ -50,20 +50,14 @@ (define-module (gnu packages scribus)
(define-public scribus
(package
(name "scribus")
- (version "1.5.8")
+ (version "1.6.0")
(source
(origin
(method url-fetch)
- (uri (string-append "mirror://sourceforge/scribus/scribus-devel/"
- version "/scribus-" version ".tar.xz"))
+ (uri (string-append "mirror://sourceforge/scribus/scribus/"
+ version "/scribus-" version ".tar.gz"))
(sha256
- (base32 "0x3bw58v920akca8jxvsfwf468pzjyglk93ay67ph1bdry7nx0a7"))
- (patches
- (search-patches "scribus-1.5.8-poppler-22.2.0-1.patch"
- "scribus-1.5.8-poppler-22.2.0-2.patch"
- "scribus-1.5.8-poppler-22.03.0.patch"
- "scribus-1.5.8-poppler-22.04.0.patch"
- "scribus-1.5.8-poppler-22.09.0.patch"))))
+ (base32 "10ixrvi1rn20r8nni6cllvkszcx77pyca68vrixjsy7nk1brx9nw"))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f ;no test target
base-commit: 05fad99a431c6708ec18c7d0db67178bd8d36597
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#68203: [PATCH v2] gnu: scribus: Update to 1.6.0
2024-01-06 6:53 ` [bug#68203] [PATCH v2] " Andy Tai
@ 2024-03-04 17:39 ` Nicolas Goaziou via Guix-patches via
0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou via Guix-patches via @ 2024-03-04 17:39 UTC (permalink / raw)
To: Andy Tai; +Cc: 68203-done
Hello,
Andy Tai <atai@atai.org> writes:
> From d999845778edfec6a5b06871383605d5e850b0d6 Mon Sep 17 00:00:00 2001
> Message-Id: <d999845778edfec6a5b06871383605d5e850b0d6.1704523803.git.atai@atai.org>
> From: Andy Tai <atai@atai.org>
> Date: Mon, 1 Jan 2024 23:32:18 -0800
> Subject: [PATCH v2] gnu: scribus: Update to 1.6.0
> To: 68203@debbugs.gnu.org
I updated it to 1.6.1 and applied your patch. Thank you (and sorry for
the delay).
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-04 17:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-02 7:32 [bug#68203] [PATCH] gnu: scribus: Update to 1.6.0 Andy Tai
2024-01-02 14:25 ` Nicolas Goaziou via Guix-patches via
2024-01-04 21:53 ` Andy Tai
2024-01-06 6:53 ` [bug#68203] [PATCH v2] " Andy Tai
2024-03-04 17:39 ` bug#68203: " Nicolas Goaziou via Guix-patches via
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.