head 1.1; access; symbols pkgsrc-2026Q1:1.1.0.4 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.2 pkgsrc-2025Q4-base:1.1; locks; strict; comment @// @; 1.1 date 2025.11.10.13.54.53; author wiz; state Exp; branches; next ; commitid hyzMB6cB0jFgP0iG; desc @@ 1.1 log @print/scribus: import scribus-1.7.0 This is the qt6 version of scribus, previously in scribus-qt5. Scribus is a publishing layout program for X using the QT interface. It can be used to create stationery, small posters and brochures and to layout newsletters and other documents. It can export in Postscript and PDF formats; and the data is saved in XML format. Scribus aims to be similar to Adobe PageMaker and Quark XPress. It can do typical tasks like kerning text and placing and rotating text and images. @ text @$NetBSD$ Fix build with podofo 1.0. https://github.com/scribusproject/scribus/commit/760ff25fcc250099c0dca3949f62739be126c231 --- scribus/pdflib_core.cpp.orig 2025-01-25 21:57:39.000000000 +0000 +++ scribus/pdflib_core.cpp @@@@ -6188,7 +6188,7 @@@@ QByteArray PDFLibCore::PDF_TransparenzFi float r, g, b; qStopColor.getRgbF(&r, &g, &b); if ((GType == GradMask_LinearLumAlpha) || (GType == GradMask_RadialLumAlpha)) - a = /* 1.0 - */ (0.3 * r + 0.59 * g + 0.11 * b); + a = 0.3 * r + 0.59 * g + 0.11 * b; if ((cst == 0) && (actualStop != 0.0)) { stopVec.append(0.0); @@@@ -9808,7 +9808,11 @@@@ bool PDFLibCore::PDF_EmbeddedPDF(PageIte 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) { @@@@ -9829,8 +9833,15 @@@@ bool PDFLibCore::PDF_EmbeddedPDF(PageIte 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(); // 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; @@@@ -9950,8 +9961,15 @@@@ bool PDFLibCore::PDF_EmbeddedPDF(PageIte 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(); // 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; @