mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
scribus: update to 1.6.3
This commit is contained in:
parent
c05651d74a
commit
0971f2b53c
2 changed files with 175 additions and 3 deletions
172
srcpkgs/scribus/patches/fix_build_with_poppler_25.02.0.patch
Normal file
172
srcpkgs/scribus/patches/fix_build_with_poppler_25.02.0.patch
Normal file
|
@ -0,0 +1,172 @@
|
||||||
|
diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp
|
||||||
|
index 92539d1..ac8e2eb 100644
|
||||||
|
--- a/scribus/plugins/import/pdf/importpdf.cpp
|
||||||
|
+++ b/scribus/plugins/import/pdf/importpdf.cpp
|
||||||
|
@@ -462,11 +462,11 @@ bool PdfPlug::convert(const QString& fn)
|
||||||
|
|
||||||
|
if (dev->isOk())
|
||||||
|
{
|
||||||
|
- OCGs* ocg = pdfDoc->getOptContentConfig();
|
||||||
|
+ POPPLER_CONST_25_02 OCGs* ocg = pdfDoc->getOptContentConfig();
|
||||||
|
if (ocg && ocg->hasOCGs())
|
||||||
|
{
|
||||||
|
QStringList ocgNames;
|
||||||
|
- Array *order = ocg->getOrderArray();
|
||||||
|
+ POPPLER_CONST_25_02 Array *order = ocg->getOrderArray();
|
||||||
|
if (order)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < order->getLength (); ++i)
|
||||||
|
diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h
|
||||||
|
index b922816..b3d35f0 100644
|
||||||
|
--- a/scribus/plugins/import/pdf/importpdfconfig.h
|
||||||
|
+++ b/scribus/plugins/import/pdf/importpdfconfig.h
|
||||||
|
@@ -15,6 +15,12 @@ for which a new license (GPL+exception) is in place.
|
||||||
|
+ ((micro) * 1))
|
||||||
|
#define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MAJOR, POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO)
|
||||||
|
|
||||||
|
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||||
|
+#define POPPLER_CONST_25_02 const
|
||||||
|
+#else
|
||||||
|
+#define POPPLER_CONST_25_02
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 82, 0)
|
||||||
|
#define POPPLER_CONST_082 const
|
||||||
|
#else
|
||||||
|
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||||
|
index 0244c9f..72e11b4 100644
|
||||||
|
--- a/scribus/plugins/import/pdf/slaoutput.cpp
|
||||||
|
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
|
||||||
|
@@ -2932,7 +2932,7 @@ void SlaOutputDev::beginMarkedContent(const char *name, Object *dictRef)
|
||||||
|
{
|
||||||
|
if (dictRef->isNull())
|
||||||
|
return;
|
||||||
|
- OCGs *contentConfig = m_catalog->getOptContentConfig();
|
||||||
|
+ POPPLER_CONST_25_02 OCGs *contentConfig = m_catalog->getOptContentConfig();
|
||||||
|
OptionalContentGroup *oc;
|
||||||
|
if (dictRef->isRef())
|
||||||
|
{
|
||||||
|
@@ -3081,10 +3081,11 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||||
|
SplashFontFile *fontFile;
|
||||||
|
SplashFontSrc *fontsrc = nullptr;
|
||||||
|
Object refObj, strObj;
|
||||||
|
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 4, 0)
|
||||||
|
- int tmpBufLen = 0;
|
||||||
|
-#endif
|
||||||
|
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||||
|
+ std::vector<int> codeToGID;
|
||||||
|
+#else
|
||||||
|
int *codeToGID = nullptr;
|
||||||
|
+#endif
|
||||||
|
const double *textMat = nullptr;
|
||||||
|
double m11, m12, m21, m22, fontSize;
|
||||||
|
SplashCoord mat[4] = { 1.0, 0.0, 0.0, 1.0 };
|
||||||
|
@@ -3244,10 +3245,20 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||||
|
+ codeToGID.clear();
|
||||||
|
+#else
|
||||||
|
codeToGID = nullptr;
|
||||||
|
+#endif
|
||||||
|
n = 0;
|
||||||
|
}
|
||||||
|
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||||
|
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||||
|
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, std::move(codeToGID), fontLoc->fontNum)))
|
||||||
|
+ {
|
||||||
|
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||||
|
+ goto err2;
|
||||||
|
+ }
|
||||||
|
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||||
|
if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, codeToGID, n, fontLoc->fontNum)))
|
||||||
|
{
|
||||||
|
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||||
|
@@ -3278,6 +3289,18 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
case fontCIDType0COT:
|
||||||
|
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||||
|
+ if (((GfxCIDFont*) gfxFont)->getCIDToGIDLen() > 0)
|
||||||
|
+ {
|
||||||
|
+ codeToGID = ((GfxCIDFont*) gfxFont)->getCIDToGID();
|
||||||
|
+ n = codeToGID.size();
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ codeToGID.clear();
|
||||||
|
+ n = 0;
|
||||||
|
+ }
|
||||||
|
+#else
|
||||||
|
if (((GfxCIDFont *) gfxFont)->getCIDToGID())
|
||||||
|
{
|
||||||
|
n = ((GfxCIDFont *) gfxFont)->getCIDToGIDLen();
|
||||||
|
@@ -3289,7 +3312,15 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||||
|
codeToGID = nullptr;
|
||||||
|
n = 0;
|
||||||
|
}
|
||||||
|
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||||
|
+#endif
|
||||||
|
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||||
|
+ if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(std::move(id), fontsrc, std::move(codeToGID), fontLoc->fontNum)))
|
||||||
|
+ {
|
||||||
|
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
|
||||||
|
+ gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||||
|
+ goto err2;
|
||||||
|
+ }
|
||||||
|
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||||
|
if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(std::move(id), fontsrc, codeToGID, n, fontLoc->fontNum)))
|
||||||
|
{
|
||||||
|
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
|
||||||
|
@@ -3307,6 +3338,15 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||||
|
break;
|
||||||
|
case fontCIDType2:
|
||||||
|
case fontCIDType2OT:
|
||||||
|
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||||
|
+ codeToGID.clear();
|
||||||
|
+ n = 0;
|
||||||
|
+ if (((GfxCIDFont*) gfxFont)->getCIDToGIDLen() > 0)
|
||||||
|
+ {
|
||||||
|
+ codeToGID = ((GfxCIDFont*) gfxFont)->getCIDToGID();
|
||||||
|
+ n = codeToGID.size();
|
||||||
|
+ }
|
||||||
|
+#else
|
||||||
|
codeToGID = nullptr;
|
||||||
|
n = 0;
|
||||||
|
if (((GfxCIDFont *) gfxFont)->getCIDToGID())
|
||||||
|
@@ -3318,6 +3358,7 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||||
|
memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), n * sizeof(*codeToGID));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||||
|
@@ -3338,15 +3379,20 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||||
|
#endif
|
||||||
|
if (! ff)
|
||||||
|
goto err2;
|
||||||
|
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0)
|
||||||
|
- codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get(), &n);
|
||||||
|
- ff.reset();
|
||||||
|
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||||
|
+ codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get());
|
||||||
|
#else
|
||||||
|
- codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n);
|
||||||
|
- delete ff;
|
||||||
|
+ codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get(), &n);
|
||||||
|
#endif
|
||||||
|
+ ff.reset();
|
||||||
|
}
|
||||||
|
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||||
|
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||||
|
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, std::move(codeToGID), fontLoc->fontNum)))
|
||||||
|
+ {
|
||||||
|
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||||
|
+ goto err2;
|
||||||
|
+ }
|
||||||
|
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||||
|
if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, codeToGID, n, fontLoc->fontNum)))
|
||||||
|
{
|
||||||
|
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'scribus'
|
# Template file for 'scribus'
|
||||||
pkgname=scribus
|
pkgname=scribus
|
||||||
version=1.6.2
|
version=1.6.3
|
||||||
revision=2
|
revision=1
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="-DCMAKE_SKIP_RPATH=TRUE -DQT_PREFIX=${XBPS_CROSS_BASE}/usr
|
configure_args="-DCMAKE_SKIP_RPATH=TRUE -DQT_PREFIX=${XBPS_CROSS_BASE}/usr
|
||||||
-DWANT_GRAPHICSMAGICK=1 -DWANT_CPP20=ON"
|
-DWANT_GRAPHICSMAGICK=1 -DWANT_CPP20=ON"
|
||||||
|
@ -17,7 +17,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
|
||||||
license="GPL-2.0-or-later"
|
license="GPL-2.0-or-later"
|
||||||
homepage="https://scribus.net"
|
homepage="https://scribus.net"
|
||||||
distfiles="$SOURCEFORGE_SITE/scribus/scribus/${version}/scribus-${version}.tar.xz"
|
distfiles="$SOURCEFORGE_SITE/scribus/scribus/${version}/scribus-${version}.tar.xz"
|
||||||
checksum=7eff9b1f47e372e56bb369f1dbe18fe49101789b5e6bcfdb7890e0346b641383
|
checksum=0ae58ced410101e82655e3b4c20a070cf1767145ada233dcef7c20b8ba6bd487
|
||||||
python_version=3
|
python_version=3
|
||||||
|
|
||||||
do_patch() {
|
do_patch() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue