1
0
forked from ports/contrib

inkscape: update for system poppler 21.11.0

This commit is contained in:
Danny Rawlins 2021-11-02 19:23:28 +11:00
parent 6ff6517445
commit d943584c05
3 changed files with 39 additions and 9 deletions

View File

@ -1,6 +1,7 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF39vkqPMz/Zst1yJB3hXfb5hs5ve3ttES1Lpr4iJkwopplq//5ncRx1qx65SkW9z5diYy9VAmXEV27Gbg2t+DwgI=
SHA256 (Pkgfile) = 5421c03fc8a7a5ca291491a1c44f21a33328c58cb5446f94cdfaa87a040e360c
RWSagIOpLGJF3x1/fZo6ycnk059O3cLvIiJYwN6PZcRnIhYgrPMWxzs8oQPtS9nqfZJqno5Z4E8ZPyEtCmyJFVZ4W0rkjvyGVwA=
SHA256 (Pkgfile) = fe282a8284dabe047c5d511e4b2635149b5849b869ce0c87caa645eabc5c013d
SHA256 (.footprint) = 8a957107d077ffd8cdedcb76c718f9f2796605e628afb302f1ab99a91743bcae
SHA256 (inkscape-1.1.1_2021-09-20_3bf5ae0d25.tar.xz) = aeca0b9d33b5b1cfa9aa70433bdee6a8c3d020ffafc2e6f0c9a60eed7a7978af
SHA256 (poppler-21.10.0.tar.xz) = 964b5b16290fbec3fae57c2a5bcdea49bb0736bd750c3a3711c47995c9efc394
SHA256 (inkscape-1.1.1.tar.xz) = aeca0b9d33b5b1cfa9aa70433bdee6a8c3d020ffafc2e6f0c9a60eed7a7978af
SHA256 (poppler-21.11.0.tar.xz) = 31b76b5cac0a48612fdd154c02d9eca01fd38fb8eaa77c1196840ecdeb53a584
SHA256 (poppler-21.11.0.patch) = 76bd1cc64ce7abef0f1758a7f05d9ca9e2cf44506318fb8ae9da029543aa1762

View File

@ -7,12 +7,12 @@ name=inkscape
_name=inkscape-INKSCAPE
version=1.1.1
_version=1.1.1_2021-09-20_3bf5ae0d25
_pversion=21.10.0
_psoversion=114
_pversion=21.11.0
_psoversion=115
release=1
source=(#https://media.inkscape.org/dl/resources/file/$name-$version.tar.xz
https://inkscape.org/gallery/item/29255/inkscape-$_version.tar.xz
https://poppler.freedesktop.org/poppler-$_pversion.tar.xz)
source=(https://inkscape.org/gallery/item/29255/inkscape-$version.tar.xz
https://poppler.freedesktop.org/poppler-$_pversion.tar.xz
poppler-21.11.0.patch)
poppler() {
cmake -S poppler-$_pversion -B build-poppler -G Ninja \
@ -43,6 +43,9 @@ poppler() {
build() {
[ ! -e "/usr/lib/libpoppler.so.$_psoversion" ] && poppler
# https://gitlab.com/inkscape/inkscape/-/merge_requests/3622
patch -d $name-$_version -p1 -i $SRC/poppler-21.11.0.patch
# https://gitlab.gnome.org/GNOME/glib/-/issues/2331
CFLAGS+=' -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_66'
CXXFLAGS+=' -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_66'

View File

@ -0,0 +1,26 @@
From ff61b5e3df3351d4ab5437181fe6d34729f4cbbb Mon Sep 17 00:00:00 2001
From: Evangelos Foutras <evangelos@foutrelis.com>
Date: Mon, 1 Nov 2021 21:45:38 +0200
Subject: [PATCH] Fix build with poppler 21.11.0
GfxFont::tag is now of type std::string instead of GooString *.
---
src/extension/internal/pdfinput/pdf-parser.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
index e3d04d544b..feecefa043 100644
--- a/src/extension/internal/pdfinput/pdf-parser.cpp
+++ b/src/extension/internal/pdfinput/pdf-parser.cpp
@@ -2169,7 +2169,11 @@ void PdfParser::opSetFont(Object args[], int /*numArgs*/)
}
if (printCommands) {
printf(" font: tag=%s name='%s' %g\n",
+#if POPPLER_CHECK_VERSION(21,11,0)
+ font->getTag().c_str(),
+#else
font->getTag()->getCString(),
+#endif
font->getName() ? font->getName()->getCString() : "???",
args[1].getNum());
fflush(stdout);