From 6f5ea7ac1acb3d1c53baf7620cca66cc87fe5a73 Mon Sep 17 00:00:00 2001 From: Tomas Volf <~@wolfsden.cz> Date: Fri, 16 Feb 2024 22:14:27 +0100 Subject: gnu: podman: Update to 4.9.3. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/containers.scm (podman): Update to 4.9.3. * gnu/packages/patches/podman-program-lookup.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. Change-Id: If764e8456a697d16b76cd4ba1243cc5f633a6049 Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f280b849df..cabd82f532 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1790,6 +1790,7 @@ dist_patch_DATA = \ %D%/packages/patches/plasp-fix-normalization.patch \ %D%/packages/patches/plasp-include-iostream.patch \ %D%/packages/patches/pocketfft-cpp-prefer-preprocessor-if.patch \ + %D%/packages/patches/podman-program-lookup.patch \ %D%/packages/patches/pokerth-boost.patch \ %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \ %D%/packages/patches/procps-strtod-test.patch \ -- cgit v1.2.3 From 3da49b1472919a62df1fe399638f23a246aa325d Mon Sep 17 00:00:00 2001 From: Andy Tai Date: Mon, 4 Mar 2024 16:16:55 +0100 Subject: gnu: scribus: Update to 1.6.1 * gnu/packages/scribus.scm (scribus): Update to 1.6.1. * 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. Signed-off-by: Nicolas Goaziou Change-Id: I7f40863f24f5b5ed82cf81bece6833c9d4b4ad9e --- gnu/local.mk | 5 - .../patches/scribus-1.5.8-poppler-22.03.0.patch | 52 ---- .../patches/scribus-1.5.8-poppler-22.04.0.patch | 291 --------------------- .../patches/scribus-1.5.8-poppler-22.09.0.patch | 20 -- .../patches/scribus-1.5.8-poppler-22.2.0-1.patch | 129 --------- .../patches/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 (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index cabd82f532..67a0eab466 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1821,11 +1821,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 -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(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 ocgGroups; -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0) -+ auto pdfDoc = std::make_unique(std::make_unique(fname)); -+#else - auto pdfDoc = std::unique_ptr(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 userPW(std::in_place, text.toLocal8Bit().data()); -+ pdfDoc.reset(new PDFDoc(std::make_unique(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 -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 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 fontLoc; -+ std::string fileName; -+ std::unique_ptr ff; -+ std::optional> tmpBuf; -+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0) - std::optional fontLoc; - const GooString * fileName = nullptr; - std::unique_ptr 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 &dash = state->getLineDash(&DashOffset); -+ dashPattern = dash.data(); -+ dashLength = dash.size(); -+#else -+ double *dashPattern; - state->getLineDash(&dashPattern, &dashLength, &DashOffset); -+#endif - QVector 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 -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 -+#include -+#endif -+ - #include - #include - #include -@@ -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 fontLoc; -+ const GooString * fileName = nullptr; -+ std::unique_ptr 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 -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..02dd0e3c6e 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.1") (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 "1kqqffx5xz35mwd422s4i110794zzx9sc2bn2mg77rz02hrxdhxg")))) (build-system cmake-build-system) (arguments `(#:tests? #f ;no test target -- cgit v1.2.3 From cd042f3a8efe85754a35979fadb392157ec12367 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 4 Mar 2024 11:55:45 +0200 Subject: gnu: Remove libtommath-1.1. * gnu/packages/multiprecision.scm (libtommath-1.1): Delete variable. * gnu/packages/patches/libtommath-fix-linkage.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. Change-Id: I3a2bb697cbb72716756c24643920008e919889b5 --- gnu/local.mk | 1 - gnu/packages/multiprecision.scm | 25 ----------- gnu/packages/patches/libtommath-fix-linkage.patch | 55 ----------------------- 3 files changed, 81 deletions(-) delete mode 100644 gnu/packages/patches/libtommath-fix-linkage.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 67a0eab466..5e7fbf3545 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1608,7 +1608,6 @@ dist_patch_DATA = \ %D%/packages/patches/libtiff-CVE-2022-34526.patch \ %D%/packages/patches/libtirpc-CVE-2021-46828.patch \ %D%/packages/patches/libtirpc-hurd.patch \ - %D%/packages/patches/libtommath-fix-linkage.patch \ %D%/packages/patches/libtommath-integer-overflow.patch \ %D%/packages/patches/libtool-grep-compat.patch \ %D%/packages/patches/libtool-skip-tests2.patch \ diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm index a81b2771ab..18a269ddc7 100644 --- a/gnu/packages/multiprecision.scm +++ b/gnu/packages/multiprecision.scm @@ -505,28 +505,3 @@ (define-public libtommath simple to work with that provides fairly efficient routines that build out of the box without configuration.") (license unlicense))) - -(define-public libtommath-1.1 - (package - (inherit libtommath) - (version "1.1.0") - (source - (origin - (method url-fetch) - (uri (string-append "https://github.com/libtom/libtommath/releases/" - "download/v" version "/ltm-" version ".tar.xz")) - (sha256 - (base32 - "1bbyagqzfdbg37k1n08nsqzdf44z8zsnjjinqbsyj7rxg246qilh")) - (patches (search-patches "libtommath-fix-linkage.patch")))) - (arguments - (substitute-keyword-arguments (package-arguments libtommath) - ((#:phases phases) - `(modify-phases ,phases - (add-after 'unpack 'patch-coreutils-call - (lambda _ - ;; Don't pull in coreutils. - (substitute* "makefile_include.mk" - (("arch") "uname -m")) - #t)))) - ((#:test-target _) "test_standalone"))))) diff --git a/gnu/packages/patches/libtommath-fix-linkage.patch b/gnu/packages/patches/libtommath-fix-linkage.patch deleted file mode 100644 index 1a9d46eb7c..0000000000 --- a/gnu/packages/patches/libtommath-fix-linkage.patch +++ /dev/null @@ -1,55 +0,0 @@ -https://github.com/libtom/libtommath/commit/93dea3a4162527346cd8856bfda6f17ffe98ab04.patch - -From 93dea3a4162527346cd8856bfda6f17ffe98ab04 Mon Sep 17 00:00:00 2001 -From: Steffen Jaeckel -Date: Thu, 31 Jan 2019 14:12:03 +0100 -Subject: [PATCH] makefile.shared: fix compilation and linkage - ---- - makefile.shared | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) - -diff --git a/makefile.shared b/makefile.shared -index 3955f830..870b18d1 100644 ---- a/makefile.shared -+++ b/makefile.shared -@@ -18,6 +18,7 @@ ifndef LIBTOOL - endif - endif - LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) -+LTLINK = $(LIBTOOL) --mode=link --tag=CC $(CC) - - LCOV_ARGS=--directory .libs --directory . - -@@ -59,7 +60,7 @@ objs: $(OBJECTS) - LOBJECTS = $(OBJECTS:.o=.lo) - - $(LIBNAME): $(OBJECTS) -- $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LOBJECTS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION_SO) $(LIBTOOLFLAGS) -+ $(LTLINK) $(LDFLAGS) $(LOBJECTS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION_SO) $(LIBTOOLFLAGS) - - install: $(LIBNAME) - install -d $(DESTDIR)$(LIBPATH) -@@ -76,16 +77,16 @@ uninstall: - rm $(DESTDIR)$(LIBPATH)/pkgconfig/libtommath.pc - - test: $(LIBNAME) demo/demo.o -- $(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o -- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o test demo/demo.o $(LIBNAME) -+ $(LTCOMPILE) $(CFLAGS) -c demo/demo.c -o demo/demo.o -+ $(LTLINK) $(LDFLAGS) -o test demo/demo.o $(LIBNAME) - - test_standalone: $(LIBNAME) demo/demo.o -- $(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o -- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o test demo/demo.o $(LIBNAME) -+ $(LTCOMPILE) $(CFLAGS) -c demo/demo.c -o demo/demo.o -+ $(LTLINK) $(LDFLAGS) -o test demo/demo.o $(LIBNAME) - - .PHONY: mtest - mtest: -- cd mtest ; $(CC) $(CFLAGS) $(LDFLAGS) mtest.c -o mtest -+ cd mtest ; $(CC) $(CFLAGS) -O0 mtest.c $(LDFLAGS) -o mtest - - timing: $(LIBNAME) demo/timing.c -- $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME) -o timing -+ $(LTLINK) $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME) -o timing -- cgit v1.2.3 From f9207c33780eaf97acdc209ef8bf5125c784a6f2 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 4 Mar 2024 11:58:50 +0200 Subject: gnu: libtommath: Update to 1.2.1. * gnu/packages/multiprecision.scm (libtommath): Update to 1.2.1. [source]: Remove patch. [arguments]: Remove trailing #t from phases. [properties]: Add upstream-name, lint-hidden-cve. * gnu/packages/patches/libtommath-integer-overflow.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. Change-Id: I4c1de43b4083e0649fcb493a5c304736e41ab4b8 --- gnu/local.mk | 1 - gnu/packages/multiprecision.scm | 13 +- .../patches/libtommath-integer-overflow.patch | 140 --------------------- 3 files changed, 6 insertions(+), 148 deletions(-) delete mode 100644 gnu/packages/patches/libtommath-integer-overflow.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 5e7fbf3545..83937db4c8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1608,7 +1608,6 @@ dist_patch_DATA = \ %D%/packages/patches/libtiff-CVE-2022-34526.patch \ %D%/packages/patches/libtirpc-CVE-2021-46828.patch \ %D%/packages/patches/libtirpc-hurd.patch \ - %D%/packages/patches/libtommath-integer-overflow.patch \ %D%/packages/patches/libtool-grep-compat.patch \ %D%/packages/patches/libtool-skip-tests2.patch \ %D%/packages/patches/libtree-fix-check-non-x86.patch \ diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm index 18a269ddc7..daa3144bd3 100644 --- a/gnu/packages/multiprecision.scm +++ b/gnu/packages/multiprecision.scm @@ -455,7 +455,7 @@ (define-public libtomcrypt (define-public libtommath (package (name "libtommath") - (version "1.2.0") + (version "1.2.1") (outputs '("out" "static")) (source (origin @@ -464,8 +464,7 @@ (define-public libtommath "download/v" version "/ltm-" version ".tar.xz")) (sha256 (base32 - "1c8q1qy88cjhdjlk3g24mra94h34c1ldvkjz0n2988c0yvn5xixp")) - (patches (search-patches "libtommath-integer-overflow.patch")))) + "07qdxnmp5bhfw5za6mr2l2w0vb7494v9zs9h5vp6y9vlngbjaq4q")))) (build-system gnu-build-system) (arguments '(#:phases @@ -476,13 +475,11 @@ (define-public libtommath ;; We want the shared library by default so force it to be the ;; default makefile target. (delete-file "makefile") - (symlink "makefile.shared" "makefile") - #t)) + (symlink "makefile.shared" "makefile"))) (add-after 'install 'remove-static-library (lambda* (#:key outputs #:allow-other-keys) (delete-file (string-append (assoc-ref outputs "out") - "/lib/libtommath.a")) - #t)) + "/lib/libtommath.a")))) (replace 'check (lambda* (#:key tests? test-target make-flags #:allow-other-keys) (when tests? @@ -504,4 +501,6 @@ (define-public libtommath integer library written entirely in C. It's designed to provide an API that is simple to work with that provides fairly efficient routines that build out of the box without configuration.") + (properties `((upstream-name . "ltm") + (lint-hidden-cve . ("CVE-2023-36328")))) (license unlicense))) diff --git a/gnu/packages/patches/libtommath-integer-overflow.patch b/gnu/packages/patches/libtommath-integer-overflow.patch deleted file mode 100644 index 5241726775..0000000000 --- a/gnu/packages/patches/libtommath-integer-overflow.patch +++ /dev/null @@ -1,140 +0,0 @@ -This patch is from upstream: -https://github.com/libtom/libtommath/pull/546 - -From beba892bc0d4e4ded4d667ab1d2a94f4d75109a9 Mon Sep 17 00:00:00 2001 -From: czurnieden -Date: Tue, 9 May 2023 17:17:12 +0200 -Subject: [PATCH] Fix possible integer overflow - ---- - bn_mp_2expt.c | 4 ++++ - bn_mp_grow.c | 4 ++++ - bn_mp_init_size.c | 5 +++++ - bn_mp_mul_2d.c | 4 ++++ - bn_s_mp_mul_digs.c | 4 ++++ - bn_s_mp_mul_digs_fast.c | 4 ++++ - bn_s_mp_mul_high_digs.c | 4 ++++ - bn_s_mp_mul_high_digs_fast.c | 4 ++++ - 8 files changed, 33 insertions(+) - -diff --git a/bn_mp_2expt.c b/bn_mp_2expt.c -index 0ae3df1bf..23de0c3c5 100644 ---- a/bn_mp_2expt.c -+++ b/bn_mp_2expt.c -@@ -12,6 +12,10 @@ mp_err mp_2expt(mp_int *a, int b) - { - mp_err err; - -+ if (b < 0) { -+ return MP_VAL; -+ } -+ - /* zero a as per default */ - mp_zero(a); - -diff --git a/bn_mp_grow.c b/bn_mp_grow.c -index 9e904c547..2b1682651 100644 ---- a/bn_mp_grow.c -+++ b/bn_mp_grow.c -@@ -9,6 +9,10 @@ mp_err mp_grow(mp_int *a, int size) - int i; - mp_digit *tmp; - -+ if (size < 0) { -+ return MP_VAL; -+ } -+ - /* if the alloc size is smaller alloc more ram */ - if (a->alloc < size) { - /* reallocate the array a->dp -diff --git a/bn_mp_init_size.c b/bn_mp_init_size.c -index d62268721..99573833f 100644 ---- a/bn_mp_init_size.c -+++ b/bn_mp_init_size.c -@@ -6,6 +6,11 @@ - /* init an mp_init for a given size */ - mp_err mp_init_size(mp_int *a, int size) - { -+ -+ if (size < 0) { -+ return MP_VAL; -+ } -+ - size = MP_MAX(MP_MIN_PREC, size); - - /* alloc mem */ -diff --git a/bn_mp_mul_2d.c b/bn_mp_mul_2d.c -index 87354de20..bfeaf2eb2 100644 ---- a/bn_mp_mul_2d.c -+++ b/bn_mp_mul_2d.c -@@ -9,6 +9,10 @@ mp_err mp_mul_2d(const mp_int *a, int b, mp_int *c) - mp_digit d; - mp_err err; - -+ if (b < 0) { -+ return MP_VAL; -+ } -+ - /* copy */ - if (a != c) { - if ((err = mp_copy(a, c)) != MP_OKAY) { -diff --git a/bn_s_mp_mul_digs.c b/bn_s_mp_mul_digs.c -index 64509d4cb..3682b4980 100644 ---- a/bn_s_mp_mul_digs.c -+++ b/bn_s_mp_mul_digs.c -@@ -16,6 +16,10 @@ mp_err s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs) - mp_word r; - mp_digit tmpx, *tmpt, *tmpy; - -+ if (digs < 0) { -+ return MP_VAL; -+ } -+ - /* can we use the fast multiplier? */ - if ((digs < MP_WARRAY) && - (MP_MIN(a->used, b->used) < MP_MAXFAST)) { -diff --git a/bn_s_mp_mul_digs_fast.c b/bn_s_mp_mul_digs_fast.c -index b2a287b02..3c4176a87 100644 ---- a/bn_s_mp_mul_digs_fast.c -+++ b/bn_s_mp_mul_digs_fast.c -@@ -26,6 +26,10 @@ mp_err s_mp_mul_digs_fast(const mp_int *a, const mp_int *b, mp_int *c, int digs) - mp_digit W[MP_WARRAY]; - mp_word _W; - -+ if (digs < 0) { -+ return MP_VAL; -+ } -+ - /* grow the destination as required */ - if (c->alloc < digs) { - if ((err = mp_grow(c, digs)) != MP_OKAY) { -diff --git a/bn_s_mp_mul_high_digs.c b/bn_s_mp_mul_high_digs.c -index 2bb2a5098..c9dd355f8 100644 ---- a/bn_s_mp_mul_high_digs.c -+++ b/bn_s_mp_mul_high_digs.c -@@ -15,6 +15,10 @@ mp_err s_mp_mul_high_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs) - mp_word r; - mp_digit tmpx, *tmpt, *tmpy; - -+ if (digs < 0) { -+ return MP_VAL; -+ } -+ - /* can we use the fast multiplier? */ - if (MP_HAS(S_MP_MUL_HIGH_DIGS_FAST) - && ((a->used + b->used + 1) < MP_WARRAY) -diff --git a/bn_s_mp_mul_high_digs_fast.c b/bn_s_mp_mul_high_digs_fast.c -index a2c4fb692..4ce7f590c 100644 ---- a/bn_s_mp_mul_high_digs_fast.c -+++ b/bn_s_mp_mul_high_digs_fast.c -@@ -19,6 +19,10 @@ mp_err s_mp_mul_high_digs_fast(const mp_int *a, const mp_int *b, mp_int *c, int - mp_digit W[MP_WARRAY]; - mp_word _W; - -+ if (digs < 0) { -+ return MP_VAL; -+ } -+ - /* grow the destination as required */ - pa = a->used + b->used; - if (c->alloc < pa) { -- cgit v1.2.3 From 68b715ac4db5ff09cf9597e1de1062f384243604 Mon Sep 17 00:00:00 2001 From: Zheng Junjie Date: Wed, 6 Mar 2024 23:38:23 +0800 Subject: gnu: Register sajson-build-with-gcc10.patch. This is a follow-up to commit e34bf9b63423f5846fa3b03be0c970cb3d33ac33 . * gnu/local.mk (dist_patch_DATA): Add sajson-build-with-gcc10.patch. Change-Id: Iaba2a03c0aeda38899225fffbd55b884e14dd3e6 Signed-off-by: Andreas Enge --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 83937db4c8..16241ee441 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2012,6 +2012,7 @@ dist_patch_DATA = \ %D%/packages/patches/rxvt-unicode-fix-cursor-position.patch \ %D%/packages/patches/s7-flint-3.patch \ %D%/packages/patches/sajson-for-gemmi-numbers-as-strings.patch \ + %D%/packages/patches/sajson-build-with-gcc10.patch \ %D%/packages/patches/sbc-fix-build-non-x86.patch \ %D%/packages/patches/sbcl-aserve-add-HTML-5-elements.patch \ %D%/packages/patches/sbcl-aserve-fix-rfe12668.patch \ -- cgit v1.2.3 From 52f9db6503b398bd2c9d73446c51ca99ee76fafe Mon Sep 17 00:00:00 2001 From: dan Date: Mon, 26 Feb 2024 02:27:48 +0800 Subject: gnu: Add sioyek. * gnu/packages/patches/sioyek-fix-build.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/pdf.scm (sioyek): New variable. Change-Id: Id2708745bd7ef672b620b8e9c907126bdc5a1f55 Signed-off-by: Hilton Chain --- gnu/local.mk | 1 + gnu/packages/patches/sioyek-fix-build.patch | 82 +++++++++++++++++++++++++++++ gnu/packages/pdf.scm | 60 +++++++++++++++++++++ 3 files changed, 143 insertions(+) create mode 100644 gnu/packages/patches/sioyek-fix-build.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 16241ee441..3becc8cb13 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1826,6 +1826,7 @@ dist_patch_DATA = \ %D%/packages/patches/sdl-pango-header-guard.patch \ %D%/packages/patches/sdl-pango-matrix_declarations.patch \ %D%/packages/patches/sdl-pango-sans-serif.patch \ + %D%/packages/patches/sioyek-fix-build.patch \ %D%/packages/patches/smalltalk-multiplication-overflow.patch \ %D%/packages/patches/sqlite-hurd.patch \ %D%/packages/patches/strace-readlink-tests.patch \ diff --git a/gnu/packages/patches/sioyek-fix-build.patch b/gnu/packages/patches/sioyek-fix-build.patch new file mode 100644 index 0000000000..521b361f2a --- /dev/null +++ b/gnu/packages/patches/sioyek-fix-build.patch @@ -0,0 +1,82 @@ +Patch fetched from https://git.alpinelinux.org/aports/tree/community/sioyek/mupdf-0.23.0.patch + +From 86e913eccf19b97a16f25d9b6cdf0f50232f1226 Mon Sep 17 00:00:00 2001 +From: ptrcnull +Date: Fri, 25 Aug 2023 22:44:26 +0200 +Subject: community/sioyek: fix build with mupdf-0.23.0 + +--- + +diff --git a/pdf_viewer/document_view.cpp b/pdf_viewer/document_view.cpp +index f48d05e..0bc3855 100644 +--- a/pdf_viewer/document_view.cpp ++++ b/pdf_viewer/document_view.cpp +@@ -1121,7 +1121,7 @@ std::vector DocumentView::find_line_definitions() { + + std::optional pdf_link = current_document->get_link_in_page_rect(get_center_page_number(), line_rects[line_index]); + if (pdf_link.has_value()) { +- auto parsed_uri = parse_uri(mupdf_context, pdf_link.value().uri); ++ auto parsed_uri = parse_uri(mupdf_context, current_document->doc, pdf_link.value().uri); + result.push_back({ parsed_uri.page - 1, parsed_uri.x, parsed_uri.y }); + return result; + } +diff --git a/pdf_viewer/main_widget.cpp b/pdf_viewer/main_widget.cpp +index 19b568b..335a93f 100644 +--- a/pdf_viewer/main_widget.cpp ++++ b/pdf_viewer/main_widget.cpp +@@ -170,7 +170,7 @@ void MainWidget::set_overview_position(int page, float offset) { + + void MainWidget::set_overview_link(PdfLink link) { + +- auto [page, offset_x, offset_y] = parse_uri(mupdf_context, link.uri); ++ auto [page, offset_x, offset_y] = parse_uri(mupdf_context, doc()->doc, link.uri); + if (page >= 1) { + set_overview_position(page - 1, offset_y); + } +@@ -3178,7 +3178,7 @@ void MainWidget::handle_pending_text_command(std::wstring text) { + open_web_url(utf8_decode(selected_link->uri)); + } + else{ +- auto [page, offset_x, offset_y] = parse_uri(mupdf_context, selected_link->uri); ++ auto [page, offset_x, offset_y] = parse_uri(mupdf_context, doc()->doc, selected_link->uri); + long_jump_to_destination(page-1, offset_y); + } + } +@@ -3863,7 +3863,7 @@ void MainWidget::handle_link_click(const PdfLink& link) { + return; + } + +- auto [page, offset_x, offset_y] = parse_uri(mupdf_context, link.uri); ++ auto [page, offset_x, offset_y] = parse_uri(mupdf_context, doc()->doc, link.uri); + + // convert one indexed page to zero indexed page + page--; +diff --git a/pdf_viewer/utils.cpp b/pdf_viewer/utils.cpp +index 22d4265..3150e66 100644 +--- a/pdf_viewer/utils.cpp ++++ b/pdf_viewer/utils.cpp +@@ -116,8 +116,9 @@ bool rects_intersect(fz_rect rect1, fz_rect rect2) { + return range_intersects(rect1.x0, rect1.x1, rect2.x0, rect2.x1) && range_intersects(rect1.y0, rect1.y1, rect2.y0, rect2.y1); + } + +-ParsedUri parse_uri(fz_context* mupdf_context, std::string uri) { +- fz_link_dest dest = pdf_parse_link_uri(mupdf_context, uri.c_str()); ++ParsedUri parse_uri(fz_context* mupdf_context, fz_document* fz_doc, std::string uri) { ++ pdf_document* doc = pdf_document_from_fz_document(mupdf_context, fz_doc); ++ fz_link_dest dest = pdf_resolve_link_dest(mupdf_context, doc, uri.c_str()); + return { dest.loc.page + 1, dest.x, dest.y }; + } + +diff --git a/pdf_viewer/utils.h b/pdf_viewer/utils.h +index 2a12211..643b030 100644 +--- a/pdf_viewer/utils.h ++++ b/pdf_viewer/utils.h +@@ -55,7 +55,7 @@ void get_flat_toc(const std::vector& roots, std::vector& + int mod(int a, int b); + bool range_intersects(float range1_start, float range1_end, float range2_start, float range2_end); + bool rects_intersect(fz_rect rect1, fz_rect rect2); +-ParsedUri parse_uri(fz_context* mupdf_context, std::string uri); ++ParsedUri parse_uri(fz_context* mupdf_context, fz_document* fz_doc, std::string uri); + char get_symbol(int key, bool is_shift_pressed, const std::vector&special_symbols); + + template diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 0d796f65bb..f32403b954 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2022 Paul A. Patience ;;; Copyright © 2022 Petr Hodina ;;; Copyright © 2023 Felix Gruber +;;; Copyright © 2024 dan ;;; ;;; This file is part of GNU Guix. ;;; @@ -1710,3 +1711,62 @@ (define-public weasyprint Keywords: html2pdf, htmltopdf") (license license:bsd-3))) + +(define-public sioyek + (package + (name "sioyek") + (version "2.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ahrm/sioyek") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1vmmp2s032ygh1byz77pg9aljmp8hx745fr7mmz11831f96mlmhq")) + (modules '((guix build utils))) + ;; libmupdf-third.so no longer available since mupdf 1.18.0. + (snippet '(substitute* "pdf_viewer_build_config.pro" + (("-lmupdf-third") ""))) + ;; XXX: Fix build with mupdf-0.23.0+. + ;; See also: https://github.com/ahrm/sioyek/issues/804 + (patches (search-patches "sioyek-fix-build.patch")))) + (build-system gnu-build-system) + (arguments + (list + #:configure-flags + #~(list (string-append "PREFIX=" #$output)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda _ + (substitute* "pdf_viewer/main.cpp" + (("/usr/share") + (string-append #$output "/share")) + (("/etc") + (string-append #$output "/etc"))))) + (replace 'configure + (lambda* (#:key configure-flags #:allow-other-keys) + (apply invoke "qmake" configure-flags))) + (add-after 'install 'instal-man-page + (lambda _ + (install-file "resources/sioyek.1" + (string-append #$output "/share/man/man1"))))))) + (inputs + (list freetype + gumbo-parser + harfbuzz + jbig2dec + libjpeg-turbo + mujs + mupdf + openjpeg + qt3d-5 + qtbase-5 + zlib)) + (home-page "https://sioyek.info/") + (synopsis "PDF viewer with a focus on technical books and research papers") + (description + "Sioyek is a PDF viewer with a focus on textbooks and research papers.") + (license license:gpl3+))) -- cgit v1.2.3 From a10cce5246e333be52acd7d334f59228895db89a Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Mon, 26 Feb 2024 10:28:16 -0600 Subject: gnu: netsurf: Update to 3.11. * gnu/packages/web.scm (netsurf): Update to 3.11. [arguments]: Adjust to new source. Netsurf's JS engine cannot handle DuckDuckGo's redirect urls, so replace websearch form with post to DuckDuckGo Lite. (netsurf-buildsystem): Update to 1.10 (libparserutils): Update to 0.2.5. (hubbub): Update to 0.3.8. [source]: Remove hubbub-maybe-uninitialized.patch. (libcss): Update to 0.9.2. [source]: Remove snippet. Add patch for tests. (libdom): Update to 0.4.2. (libsvgtiny): Update to 0.1.8. (libnsbmp): Update to 0.1.7. (libnsgif): Update to 1.0.0. (libnsutils): Update to 0.1.1. (libnspsl): Update to 0.1.7. (nsgenbind): Update to 0.9. * gnu/packages/patches/netsurf-message-timestamp.patch: Adjust to latest source. * gnu/packages/patches/hubbub-maybe-uninitialized.patch: Delete patch. * gnu/packages/patches/libcss-check-format.patch: New patch. * gnu/local.mk (dist_patch_DATA): Adjust. Change-Id: I5834b0418270309aa30b6cd0a5a307e20c00fd4a --- gnu/local.mk | 2 +- .../patches/hubbub-maybe-uninitialized.patch | 40 ---------- gnu/packages/patches/libcss-check-format.patch | 13 ++++ .../patches/netsurf-message-timestamp.patch | 4 +- gnu/packages/web.scm | 88 +++++++++++----------- 5 files changed, 62 insertions(+), 85 deletions(-) delete mode 100644 gnu/packages/patches/hubbub-maybe-uninitialized.patch create mode 100644 gnu/packages/patches/libcss-check-format.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 3becc8cb13..e5d1700077 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1442,7 +1442,6 @@ dist_patch_DATA = \ %D%/packages/patches/http-parser-CVE-2020-8287.patch \ %D%/packages/patches/htslib-for-stringtie.patch \ %D%/packages/patches/hubbub-sort-entities.patch \ - %D%/packages/patches/hubbub-maybe-uninitialized.patch \ %D%/packages/patches/hueplusplus-mbedtls.patch \ %D%/packages/patches/hurd-add-without-rump-configure-option.patch \ %D%/packages/patches/hurd-fix-rumpdisk-build.patch \ @@ -1512,6 +1511,7 @@ dist_patch_DATA = \ %D%/packages/patches/json-c-0.12-CVE-2020-12762.patch \ %D%/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch \ %D%/packages/patches/julia-Use-MPFR-4.2.patch \ + %D%/packages/patches/libcss-check-format.patch \ %D%/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch \ %D%/packages/patches/libgeotiff-fix-tests-with-proj-9.1.1.patch \ %D%/packages/patches/libgeotiff-fix-tests-with-proj-9.3.0.patch \ diff --git a/gnu/packages/patches/hubbub-maybe-uninitialized.patch b/gnu/packages/patches/hubbub-maybe-uninitialized.patch deleted file mode 100644 index 6f289a770e..0000000000 --- a/gnu/packages/patches/hubbub-maybe-uninitialized.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 69d81a8a4d4c223aad67cde0fdf64d64351b9802 Mon Sep 17 00:00:00 2001 -From: Andy Tai -Date: Sat, 27 May 2023 00:01:34 -0700 -Subject: [PATCH] prevent -Werror=maybe-uninitialized build failure with gcc 11 - when building tests tokeniser2 and tokeniser3 - ---- - test/tokeniser2.c | 2 +- - test/tokeniser3.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/test/tokeniser2.c b/test/tokeniser2.c -index c8ab9c0..4caae38 100644 ---- a/test/tokeniser2.c -+++ b/test/tokeniser2.c -@@ -438,7 +438,7 @@ hubbub_error token_handler(const hubbub_token *token, void *pw) - /* Expected token only contained part of the data - * Calculate how much is left, then try again with - * the next expected token */ -- hubbub_token t; -+ hubbub_token t = { 0 }; - - t.type = HUBBUB_TOKEN_CHARACTER; - t.data.character.ptr += len; -diff --git a/test/tokeniser3.c b/test/tokeniser3.c -index e33d018..b3be901 100644 ---- a/test/tokeniser3.c -+++ b/test/tokeniser3.c -@@ -447,7 +447,7 @@ hubbub_error token_handler(const hubbub_token *token, void *pw) - /* Expected token only contained part of the data - * Calculate how much is left, then try again with - * the next expected token */ -- hubbub_token t; -+ hubbub_token t = { 0 }; - - t.type = HUBBUB_TOKEN_CHARACTER; - t.data.character.ptr += len; --- -2.40.1 - diff --git a/gnu/packages/patches/libcss-check-format.patch b/gnu/packages/patches/libcss-check-format.patch new file mode 100644 index 0000000000..b297ac1c92 --- /dev/null +++ b/gnu/packages/patches/libcss-check-format.patch @@ -0,0 +1,13 @@ +Submitted upstream at https://bugs.netsurf-browser.org/mantis/view.php?id=2870 + +--- libcss-0.9.2/test/dump.h.orig ++++ libcss-0.9.2/test/dump.h +@@ -131,7 +131,7 @@ void dump_rule_media(css_rule_media *s, char **buf, size_t *buflen) + char *ptr = *buf; + css_rule *rule; + +- ptr += sprintf(ptr, "| @media %s%03lx", ++ ptr += sprintf(ptr, "| @media %s%03" PRIx64, + s->media->negate_type ? "not " : "", + s->media->type); + diff --git a/gnu/packages/patches/netsurf-message-timestamp.patch b/gnu/packages/patches/netsurf-message-timestamp.patch index 8df9dbf8f7..03bfdfde3f 100644 --- a/gnu/packages/patches/netsurf-message-timestamp.patch +++ b/gnu/packages/patches/netsurf-message-timestamp.patch @@ -1,5 +1,5 @@ ---- netsurf-3.8/utils/split-messages.pl.orig 1969-12-31 18:00:00.000000000 -0600 -+++ netsurf-3.8/utils/split-messages.pl 2018-08-30 00:18:58.158367530 -0500 +--- netsurf-3.11/tools/split-messages.pl.orig ++++ netsurf-3.11/tools/split-messages.pl @@ -238,7 +238,7 @@ if( $opt{gzip} ) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index e519552a36..ddc673896b 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2015-2024 Ricardo Wurmus ;;; Copyright © 2018 Raoul Jean Pierre Bonnal ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer -;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Eric Bavier +;;; Copyright © 2015-2020, 2024 Eric Bavier ;;; Copyright © 2015 Eric Dvorsak ;;; Copyright © 2016 Sou Bunnbu ;;; Copyright © 2016 Jelle Licht @@ -5459,7 +5459,7 @@ (define-public woof (define netsurf-buildsystem (package (name "netsurf-buildsystem") - (version "1.9") + (version "1.10") (source (origin (method url-fetch) @@ -5467,7 +5467,7 @@ (define netsurf-buildsystem "buildsystem-" version ".tar.gz")) (sha256 (base32 - "0alsmaig9ln8dgllb3z63gq90fiz75jz0ic71fi0k0k898qix14k")))) + "0yadmrpgvl9r08b56qiy5f77jracc7g9n4krn727fip4d7akjgix")))) (build-system gnu-build-system) (inputs `(("perl" ,perl))) (arguments @@ -5498,7 +5498,7 @@ (define netsurf-buildsystem-arguments (define-public libparserutils (package (name "libparserutils") - (version "0.2.4") + (version "0.2.5") (source (origin (method url-fetch) @@ -5506,7 +5506,7 @@ (define-public libparserutils name "-" version "-src.tar.gz")) (sha256 (base32 - "1n2794y2l0c8nv8z2pxwfnbn882987ifmxjv60zdxkhcndhswarj")))) + "0ffi5q1jlcdl66nk3cax0mnzvhrjvvjvlx0rfasjfygi333xazii")))) (build-system gnu-build-system) (native-inputs (list netsurf-buildsystem pkg-config perl)) ;for test harness @@ -5521,7 +5521,7 @@ (define-public libparserutils (define-public hubbub (package (name "hubbub") - (version "0.3.7") + (version "0.3.8") (source (origin (method url-fetch) @@ -5529,15 +5529,14 @@ (define-public hubbub "libhubbub-" version "-src.tar.gz")) (sha256 (base32 - "1dimfyblmym98qa1b80c5jslv2zk8r44xbdrgrsrw1n9wr9y4yly")) - (patches (search-patches - "hubbub-sort-entities.patch" - "hubbub-maybe-uninitialized.patch")))) + "19fm5h8arnsgxd4w5vr9s2fcb422acciffar3la0b36lygsydhca")) + (patches (search-patches "hubbub-sort-entities.patch")))) (build-system gnu-build-system) (native-inputs (list netsurf-buildsystem pkg-config doxygen + gperf json-c-0.12 ; check whether json-c-0.12 can be removed perl)) (propagated-inputs @@ -5705,7 +5704,7 @@ (define-public libwapcaplet (define-public libcss (package (name "libcss") - (version "0.9.1") + (version "0.9.2") (source (origin (method url-fetch) @@ -5713,13 +5712,8 @@ (define-public libcss "libcss-" version "-src.tar.gz")) (sha256 (base32 - "1p66sdiiqm7w4jkq23hsf08khsnmq93hshh9f9m8sbirjdpf3p6j")) - (modules '((guix build utils))) - (snippet - '(begin - ;; This can be removed with the next release. - (substitute* "src/select/computed.c" - (("css_unit unit;") "css_unit unit = CSS_UNIT_PX;")))))) + "0khmf5bdpkc09fpsgwzi23sihpadvyr02jx0q5h1vm9lxjxibwid")) + (patches (search-patches "libcss-check-format.patch")))) (build-system gnu-build-system) (native-inputs (list netsurf-buildsystem pkg-config perl)) @@ -5736,7 +5730,7 @@ (define-public libcss (define-public libdom (package (name "libdom") - (version "0.4.1") + (version "0.4.2") ;TODO include patch for additional tags? (source (origin (method url-fetch) @@ -5744,7 +5738,7 @@ (define-public libdom "libdom-" version "-src.tar.gz")) (sha256 (base32 - "0jpg5hx3y0mdxk5szd47dyijqimd2321brbqk2620pp5f4j0gvlq")))) + "0g0gqcglk8f8gbygbcq5ylcx84zsf0vczbm3n3118w2l2splapnh")))) (build-system gnu-build-system) (native-inputs (list netsurf-buildsystem @@ -5771,7 +5765,7 @@ (define-public libdom (define-public libsvgtiny (package (name "libsvgtiny") - (version "0.1.7") + (version "0.1.8") (source (origin (method url-fetch) @@ -5779,7 +5773,7 @@ (define-public libsvgtiny name "-" version "-src.tar.gz")) (sha256 (base32 - "10bpkmvfpydj74im3r6kqm9vnvgib6afy0alx71q5n0w5yawy39c")))) + "0750q884ax8wygl64wq03zdjj8h838ch3f8jdfkv4gz809zj4my3")))) (build-system gnu-build-system) (native-inputs (list netsurf-buildsystem pkg-config gperf-3.0)) @@ -5800,7 +5794,7 @@ (define-public libsvgtiny (define-public libnsbmp (package (name "libnsbmp") - (version "0.1.6") + (version "0.1.7") (source (origin (method url-fetch) @@ -5808,7 +5802,7 @@ (define-public libnsbmp name "-" version "-src.tar.gz")) (sha256 (base32 - "0krjg69a2amxjsahdgm3wmy9ngnyr3gfs2a1zhdlbvb0z1jr7i3r")))) + "14r2v1ich4lxn3sdwpiwq5adydrd1qlhbd8mbamalaqj59laf1sl")))) (build-system gnu-build-system) (native-inputs (list netsurf-buildsystem)) @@ -5856,7 +5850,7 @@ (define-public libnsfb (define-public libnsgif (package (name "libnsgif") - (version "0.2.1") + (version "1.0.0") (source (origin (method url-fetch) @@ -5864,7 +5858,7 @@ (define-public libnsgif name "-" version "-src.tar.gz")) (sha256 (base32 - "0jwshypgmx16xlsbx3d8njk8a5khazlplca5mxd3rdbhrlsabbly")))) + "06q69hn0nz3c6hnwmzfcldyrppkvimx3s97ql3sx4m0lyr1ch530")))) (build-system gnu-build-system) (native-inputs (list netsurf-buildsystem)) @@ -5907,7 +5901,7 @@ (define-public libnslog (define-public libnsutils (package (name "libnsutils") - (version "0.1.0") + (version "0.1.1") (source (origin (method url-fetch) @@ -5915,7 +5909,7 @@ (define-public libnsutils name "-" version "-src.tar.gz")) (sha256 (base32 - "1w5fyy2i60a3v3if3iqcn9sy9sycx6966rcx53v85gja6hb6a33r")))) + "14pakllwf7a205d0dkvyg8jhmqfbi5sh5riw840d13j5dr9b952n")))) (build-system gnu-build-system) (native-inputs (list netsurf-buildsystem)) @@ -5930,7 +5924,7 @@ (define-public libnsutils (define-public libnspsl (package (name "libnspsl") - (version "0.1.6") + (version "0.1.7") (source (origin (method url-fetch) @@ -5938,7 +5932,7 @@ (define-public libnspsl "libnspsl-" version "-src.tar.gz")) (sha256 (base32 - "02q28n5i6fwqcz1nn167rb71k1q95mx38mfah6zi1lvqrc2q5ifk")))) + "105cjkb622wz11z26il4j1n4ydyrrgv0nglr67aawpam5z1wx11n")))) (build-system gnu-build-system) (native-inputs (list netsurf-buildsystem)) @@ -5953,7 +5947,7 @@ (define-public libnspsl (define-public nsgenbind (package (name "nsgenbind") - (version "0.8") + (version "0.9") (source (origin (method url-fetch) @@ -5961,7 +5955,7 @@ (define-public nsgenbind "nsgenbind-" version "-src.tar.gz")) (sha256 (base32 - "1cqwgwca49jvmijwiyaab2bwxicgxdrnlpinf8kp3nha02nm73ad")))) + "0p9q9ffn9hf1qrphz2qxq2xvyysn5kg2dbl8cbnkwb5wdkvf0b13")))) (build-system gnu-build-system) (native-inputs (list netsurf-buildsystem bison flex)) @@ -5979,7 +5973,7 @@ (define-public nsgenbind (define-public netsurf (package (name "netsurf") - (version "3.10") + (version "3.11") (source (origin (method url-fetch) @@ -5987,7 +5981,7 @@ (define-public netsurf "releases/source/netsurf-" version "-src.tar.gz")) (sha256 (base32 - "0plra64c5xyiw12yx2q13brxsv8apmany97zqa2lcqckw4ll8j1n")) + "1chw40nx7krpy7m14bajfrcj88h98if8py0k7c2qshpfxxm652n2")) (patches (search-patches "netsurf-system-utf8proc.patch" "netsurf-y2038-tests.patch" "netsurf-longer-test-timeout.patch" @@ -6038,22 +6032,17 @@ (define-public netsurf (add-after 'unpack 'remove-timestamps ;; Avoid embedding timestamp for reproducible builds (lambda _ - (substitute* "utils/git-testament.pl" + (substitute* "tools/git-testament.pl" (("WT_COMPILEDATE ..$compiledate") "WT_COMPILEDATE \\\"")))) (add-after 'build 'adjust-welcome (lambda _ (substitute* "frontends/gtk/res/welcome.html" - ;; Close some XHTML tags. + ;; Close some XHTML tags. (("<(img|input)([^>]*)>" _ tag contents) (string-append "<" tag contents " />")) ;; Increase freedom. - ((" open source") ", free software") - ;; Prefer a more privacy-respecting default search engine. - (("www.google.co.uk") "www.duckduckgo.com/html") - (("Google Search") "DuckDuckGo Search") - (("name=\"btnG\"") "")) - ;; Remove default links so it doesn't seem we're endorsing them. + ((" open source") ", free software")) (with-atomic-file-replacement "frontends/gtk/res/welcome.html" (lambda (in out) ;; Leave the DOCTYPE header as is. @@ -6068,8 +6057,23 @@ (define-public netsurf ;; We'd like to use sxml-match here, but it can't ;; match against generic tag symbols... (match sxml + ;; Remove default links so it doesn't seem we're + ;; endorsing them. (`(div (@ (class "links")) . ,rest) '()) + ;; Prefer a more privacy-respecting default search + ;; engine. + (`(form . ,rest) + `(form (@ (action "https://lite.duckduckgo.com/lite/") + (method "post")) + (div (@ (class "websearch")) + (input (@ (type "text") + (size "42") + (name "q") + (autocomplete "off") + (value ""))) + (input (@ (type "submit") + (value "DuckDuckGo Search")))))) (`(ENTITY ,ent) `(*ENTITY* ,ent)) ((x ...) -- cgit v1.2.3 From d53ca793707c2c94a580c572a5cf4ac383c951ee Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sat, 9 Mar 2024 18:44:14 +0200 Subject: gnu: Register patch. This is a follow-up to d1b660a00c1e9a7128ccbd13d01314faedae8ebf. * gnu/local.mk (dist_patch_DATA): Register new patch. Change-Id: I281aa1e7ed9f30dc17fd3092d0db9e193f94f9d5 --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e5d1700077..fb8c4afe1d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1796,6 +1796,7 @@ dist_patch_DATA = \ %D%/packages/patches/prusa-slicer-fix-tests.patch \ %D%/packages/patches/prusa-slicer-with-cereal-1.3.1.patch \ %D%/packages/patches/pthreadpool-system-libraries.patch \ + %D%/packages/patches/python-3.12-fix-tests.patch \ %D%/packages/patches/python-accupy-use-matplotx.patch \ %D%/packages/patches/python-accupy-fix-use-of-perfplot.patch \ %D%/packages/patches/python-chai-drop-python2.patch \ -- cgit v1.2.3