summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlilac2022-08-05 20:23:29 +0800
committerlilac2022-08-05 20:23:29 +0800
commitb25a965b738ca9008871675367f85589239a9e06 (patch)
tree1d98bffd5bff6918b2583e8de059e8e73b8b1d2a
parentf4f78aa7f6ff072ca88d07250ca63668b4c88589 (diff)
downloadaur-b25a965b738ca9008871675367f85589239a9e06.tar.gz
[lilac] updated to 6672.4cd048d43-2
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD7
-rw-r--r--pdf-import.patch77
3 files changed, 71 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a683b9280785..466fafa3f0eb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = dia-git
pkgdesc = A GTK+ based diagram creation program (GIT VERSION)
- pkgver = 6667.e866497fe
+ pkgver = 6672.4cd048d43
pkgrel = 2
url = http://live.gnome.org/Dia
arch = x86_64
@@ -27,6 +27,6 @@ pkgbase = dia-git
source = git+https://gitlab.gnome.org/GNOME/dia.git
source = pdf-import.patch
md5sums = SKIP
- md5sums = dbf8336aeaa854be4a60d4588c8fb0b2
+ md5sums = 741e89bf69b002e7bf40f62631bb1e7b
pkgname = dia-git
diff --git a/PKGBUILD b/PKGBUILD
index a637f1a45b4f..815875d33904 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=dia-git
_pkgname=dia
-pkgver=6667.e866497fe
+pkgver=6672.4cd048d43
pkgrel=2
pkgdesc="A GTK+ based diagram creation program (GIT VERSION)"
arch=('x86_64')
@@ -18,7 +18,8 @@ provides=('dia')
conflicts=('dia')
options=('docs' '!emptydirs')
source=("git+https://gitlab.gnome.org/GNOME/dia.git" "pdf-import.patch")
-md5sums=('SKIP' 'dbf8336aeaa854be4a60d4588c8fb0b2')
+md5sums=('SKIP'
+ '741e89bf69b002e7bf40f62631bb1e7b')
pkgver() {
cd "${srcdir}/${_pkgname}"
@@ -44,7 +45,7 @@ build() {
export PYTHON=/usr/bin/python2
arch-meson . build
- ninja -j1 -C build
+ ninja -C build
}
package() {
diff --git a/pdf-import.patch b/pdf-import.patch
index fa8b5def0b21..f729a845e194 100644
--- a/pdf-import.patch
+++ b/pdf-import.patch
@@ -1,26 +1,79 @@
--- plug-ins/pdf/pdf-import.cpp 2022-03-12 08:17:49.242369295 +0800
+++ plug-ins/pdf/pdf-import.cpp 2022-03-12 08:19:04.302435181 +0800
-@@ -867,11 +867,11 @@ extern "C"
- gboolean
- import_pdf(const gchar *filename, DiagramData *dia, DiaContext *ctx, void* user_data)
- {
-- PDFDoc *doc;
-+ std::unique_ptr<PDFDoc> doc;
+@@ -318,10 +318,10 @@
+ //FIXME: Dia is really unhappy about zero size fonts
+ if (!(state->getFontSize() > 0.0))
+ return;
+- GfxFont *f = state->getFont();
+-
++ const std::shared_ptr<GfxFont> f = state->getFont(); // poppler 22.05 ... header changed
++ gconstpointer f1 = &f; // GLib typedef const void * gconstpointer;
+ // instead of building the same font over and over again
+- if (g_hash_table_lookup (this->font_map, f)) {
++ if (g_hash_table_lookup (this->font_map, f1)) {
+ ++font_map_hits;
+ return;
+ }
+@@ -333,10 +333,9 @@ public :
+ gchar *family = g_strdup (f->getFamily() ? f->getFamily()->c_str() : "sans");
+
+ // we are (not anymore) building the same font over and over again
+- g_print ("Font 0x%x: '%s' size=%g (* %g)\n",
+- GPOINTER_TO_INT (f), family, state->getTransformedFontSize(), scale);
+-
+ // now try to make a fontname Dia/Pango can cope with
++ f1 = &f;
++ g_print ("Font 0x%x: '%s' size=%g (* %g)\n", GPOINTER_TO_INT (f1), family, state->getTransformedFontSize(), scale);
+ // strip style postfix - we already have extracted the style bits above
+ char *pf;
+ if ((pf = strstr (family, " Regular")) != NULL)
+@@ -353,8 +353,9 @@
+ if (fm[0] != 0)
+ fsize *= fabs(fm[3] / fm[0]);
+ font = dia_font_new (family, style, fsize * scale / 0.8);
+-
+- g_hash_table_insert (this->font_map, f, font);
++ f1 = &f;
++ gpointer f2 = (gpointer)f1; // GLib typedef void* gpointer;
++ g_hash_table_insert (this->font_map, f2, font);
+ g_free (family);
+ }
+ void updateTextShift(GfxState *state, double shift)
+@@ -721,11 +722,12 @@
+ return;
+ if (!(state->getFontSize() > 0.0))
+ return;
+- font = (DiaFont *)g_hash_table_lookup (this->font_map, state->getFont());
++ font = (DiaFont *)g_hash_table_lookup (this->font_map, &(state->getFont()));
+
+ // we have to decode the string data first
+ {
+- GfxFont *f = state->getFont();
++// GfxFont *f = state->getFont();
++ const std::shared_ptr<GfxFont> f = state->getFont();
+ const char *p = s->c_str();
+ CharCode code;
+ int j = 0, m, n;
+@@ -870,8 +872,10 @@
+ std::unique_ptr<PDFDoc> doc;
GooString *fileName = new GooString(filename);
// no passwords yet
- GooString *ownerPW = NULL;
- GooString *userPW = NULL;
++ //GooString *ownerPW = NULL;
++ //GooString *userPW = NULL;
+ const std::optional<GooString> ownerPW;
+ const std::optional<GooString> userPW;
gboolean ret = FALSE;
-
+
// without this we will get strange crashes (at least with /O2 build)
-@@ -899,7 +899,7 @@ import_pdf(const gchar *filename, Diagra
+@@ -899,7 +903,8 @@
delete diaOut;
ret = TRUE;
}
-- delete doc;
-+ doc.reset();
- delete fileName;
-
+- delete fileName;
++ doc.reset();
++ delete fileName;
+
return ret;
+ }