inkscape: 1.1.2 -> 1.2

This commit is contained in:
Danny Rawlins 2022-05-22 17:22:24 +10:00
parent cac594a966
commit 7b9526b1f1
4 changed files with 739 additions and 477 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,6 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF315O3mJQPSIXjKh4auEZkq14pdbfPf1IoQhVRrN+J1HDsY4f2EwW1soCme3wE0XmgrpCoEe2Navaqz+LnGcs6wA=
SHA256 (Pkgfile) = 594e7882a6b4614ec4102bb403d289c2ee1a90b0edf693f5af985413c8e2b7e4
SHA256 (.footprint) = 358e55ae979affb16e2e82d2417c4bcaac6839a932cce35d10b2906055a24150
SHA256 (inkscape-1.1.2.tar.xz) = 3ffe54a06d0b25a4cd8b6eb424536ef1ed205be13443a39cd437c8c7b89b96d1
SHA256 (poppler-22.04.0.tar.xz) = 813fb4b90e7bda63df53205c548602bae728887a60f4048aae4dbd9b1927deff
SHA256 (poppler-22.04-fixes.patch) = 86ef3ec904e40debfcc421baa2edc5c2cfce09cb587cdf70038eeefc5ec198db
RWSagIOpLGJF3ynibx3p451aHkEMhw/YLkrixuE5m5kwhoM+Hs+huXacE23MpGeesGELX7b0g1+grqTe7XurxK0IC8weRRPJiQY=
SHA256 (Pkgfile) = 60ad1356f677d5850b6705f176ce05bd712ef94b3dbcb38e50cea955381ee1ae
SHA256 (.footprint) = d95d67454241722fd49c36300451153f490fb5f6395ee10f7bc6270d9b2a95e0
SHA256 (inkscape-1.2_2022-05-15_dc2aedaf03.tar.xz) = 8d9b31142554945664edfefe2d6b55910a5099765f7176a71107c34f1dcde6ad
SHA256 (poppler-22.05.0.tar.xz) = a969ced458e050d6202367bd7427054e2bd19bae39e8f969910d3b9151abf958

View File

@ -5,14 +5,13 @@
name=inkscape
_name=inkscape-INKSCAPE
version=1.1.2
_version=1.1.2_2022-02-04_0a00cf5339
_pversion=22.04.0
_psoversion=120
release=2
source=(https://inkscape.org/gallery/item/31668/inkscape-$version.tar.xz
https://poppler.freedesktop.org/poppler-$_pversion.tar.xz
poppler-22.04-fixes.patch)
version=1.2
_version=1.2_2022-05-15_dc2aedaf03
_pversion=22.05.0
_psoversion=121
release=1
source=(https://media.inkscape.org/dl/resources/file/inkscape-$_version.tar.xz
https://poppler.freedesktop.org/poppler-$_pversion.tar.xz)
poppler() {
cmake -S poppler-$_pversion -B build-poppler -G Ninja \
@ -43,9 +42,6 @@ poppler() {
build() {
[ ! -e "/usr/lib/libpoppler.so.$_psoversion" ] && poppler
patch -d $name-$_version/src/extension/internal/pdfinput \
-p1 -i $SRC/poppler-22.04-fixes.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'
@ -63,14 +59,10 @@ build() {
DESTDIR=$PKG cmake --install build
rm -r $PKG/usr/share/man/?? \
$PKG/usr/share/man/zh_TW \
$PKG/usr/share/locale \
$PKG/usr/share/inkscape/doc
rm $PKG/usr/share/inkscape/extensions/README.md \
$PKG/usr/share/inkscape/extensions/inkex/deprecated-simple/README.rst \
find $PKG/usr/share/inkscape -name README -exec rm -f {} +
find $PKG/usr/share/inkscape \( -name 'README' -o -name 'README.*' \) -exec rm -f {} +
/usr/bin/python3 -mcompileall $PKG
/usr/bin/python3 -O -m compileall $PKG

View File

@ -1,125 +0,0 @@
--- pdfinput.old/pdf-parser.cpp 2022-02-05 01:12:19.000000000 -0000
+++ pdfinput.new/pdf-parser.cpp 2022-04-09 12:09:23.772728790 -0000
@@ -30,6 +30,7 @@
#include "Gfx.h"
#include "pdf-parser.h"
#include "util/units.h"
+#include "poppler-transition-api.h"
#include "glib/poppler-features.h"
#include "goo/gmem.h"
@@ -2158,7 +2159,7 @@ void PdfParser::opSetCharSpacing(Object
// TODO not good that numArgs is ignored but args[] is used:
void PdfParser::opSetFont(Object args[], int /*numArgs*/)
{
- GfxFont *font = res->lookupFont(args[0].getName());
+ auto font = res->lookupFont(args[0].getName());
if (!font) {
// unsetting the font (drawing no text) is better than using the
@@ -2179,7 +2180,9 @@ void PdfParser::opSetFont(Object args[],
fflush(stdout);
}
+#if !POPPLER_CHECK_VERSION(22, 4, 0)
font->incRefCnt();
+#endif
state->setFont(font, args[1].getNum());
fontChanged = gTrue;
}
@@ -2373,7 +2376,6 @@ void PdfParser::doShowText(const GooStri
#else
void PdfParser::doShowText(GooString *s) {
#endif
- GfxFont *font;
int wMode;
double riseX, riseY;
CharCode code;
@@ -2392,7 +2394,7 @@ void PdfParser::doShowText(GooString *s)
#endif
int len, n, uLen;
- font = state->getFont();
+ auto font = state->getFont();
wMode = font->getWMode();
builder->beginString(state);
@@ -2445,8 +2447,8 @@ void PdfParser::doShowText(GooString *s)
//out->updateCTM(state, 1, 0, 0, 1, 0, 0);
if (false){ /*!out->beginType3Char(state, curX + riseX, curY + riseY, tdx, tdy,
code, u, uLen)) {*/
- _POPPLER_CALL_ARGS(charProc, ((Gfx8BitFont *)font)->getCharProc, code);
- if ((resDict = ((Gfx8BitFont *)font)->getResources())) {
+ _POPPLER_CALL_ARGS(charProc, _POPPLER_FONTPTR_TO_GFX8(font)->getCharProc, code);
+ if (resDict = _POPPLER_FONTPTR_TO_GFX8(font)->getResources()) {
pushResources(resDict);
}
if (charProc.isStream()) {
--- pdfinput.old/poppler-transition-api.h 2022-02-05 01:12:19.000000000 -0000
+++ pdfinput.new/poppler-transition-api.h 2022-04-09 12:05:30.179684356 -0000
@@ -14,6 +14,12 @@
#include <glib/poppler-features.h>
+#if POPPLER_CHECK_VERSION(22, 4, 0)
+#define _POPPLER_FONTPTR_TO_GFX8(font_ptr) ((Gfx8BitFont *)font_ptr.get())
+#else
+#define _POPPLER_FONTPTR_TO_GFX8(font_ptr) ((Gfx8BitFont *)font_ptr)
+#endif
+
#if POPPLER_CHECK_VERSION(0, 83, 0)
#define _POPPLER_CONST_83 const
#else
--- pdfinput.old/svg-builder.cpp 2022-02-05 01:21:47.000000000 -0000
+++ pdfinput.new/svg-builder.cpp 2022-04-09 12:03:33.769828329 -0000
@@ -108,7 +108,6 @@ SvgBuilder::~SvgBuilder() = default;
void SvgBuilder::_init() {
_font_style = nullptr;
- _current_font = nullptr;
_font_specification = nullptr;
_font_scaling = 1;
_need_font_update = true;
@@ -1021,11 +1020,8 @@ void SvgBuilder::updateFont(GfxState *st
_need_font_update = false;
updateTextMatrix(state); // Ensure that we have a text matrix built
- if (_font_style) {
- //sp_repr_css_attr_unref(_font_style);
- }
_font_style = sp_repr_css_attr_new();
- GfxFont *font = state->getFont();
+ auto font = state->getFont();
// Store original name
if (font->getName()) {
_font_specification = font->getName()->getCString();
@@ -1171,7 +1167,6 @@ void SvgBuilder::updateFont(GfxState *st
sp_repr_css_set_property(_font_style, "writing-mode", "tb");
}
- _current_font = font;
_invalidated_style = true;
}
--- pdfinput.old/svg-builder.h 2022-02-05 01:21:47.000000000 -0000
+++ pdfinput.new/svg-builder.h 2022-04-09 12:01:49.343290826 -0000
@@ -203,7 +203,6 @@ private:
std::vector<SvgGraphicsState> _state_stack;
SPCSSAttr *_font_style; // Current font style
- GfxFont *_current_font;
const char *_font_specification;
double _font_scaling;
bool _need_font_update;
--- pdfinput.old/pdf-input.cpp 2022-02-05 01:21:47.000000000 -0000
+++ pdfinput.new/pdf-input.cpp 2022-04-09 12:27:11.747978112 -0000
@@ -669,7 +669,7 @@ PdfInput::open(::Inkscape::Extension::In
// poppler does not use glib g_open. So on win32 we must use unicode call. code was copied from
// glib gstdio.c
GooString *filename_goo = new GooString(uri);
- pdf_doc = std::make_shared<PDFDoc>(filename_goo, nullptr, nullptr, nullptr); // TODO: Could ask for password
+ pdf_doc = std::make_shared<PDFDoc>(std::make_unique<GooString>(uri));
if (!pdf_doc->isOk()) {
int error = pdf_doc->getErrorCode();