summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlilac2023-02-22 12:22:11 +0800
committerlilac2023-02-22 12:22:11 +0800
commit3026899772f37637ad8eca85f4ddc385dcee3551 (patch)
tree3d1df6bd73440c25d31d0a277cdef6037cd7e739
parent7743788e7b366f43c1d594acfd0d266e07256835 (diff)
downloadaur-3026899772f37637ad8eca85f4ddc385dcee3551.tar.gz
[lilac] updated to 6728.df831435a-2
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD19
-rw-r--r--pdf-import.patch101
3 files changed, 6 insertions, 120 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c5df9178220e..f428bcc0cf97 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = dia-git
pkgdesc = A GTK+ based diagram creation program (GIT VERSION)
- pkgver = 6673.eb0767cc8
+ pkgver = 6728.df831435a
pkgrel = 2
url = http://live.gnome.org/Dia
arch = x86_64
@@ -16,16 +16,12 @@ pkgbase = dia-git
depends = libxslt
depends = gtk2
depends = freetype2
- depends = python2
depends = graphene
- optdepends = python2
provides = dia
conflicts = dia
options = docs
options = !emptydirs
source = git+https://gitlab.gnome.org/GNOME/dia.git
- source = pdf-import.patch
md5sums = SKIP
- md5sums = 8a8ab2cc59c85686b40ae232495cb449
pkgname = dia-git
diff --git a/PKGBUILD b/PKGBUILD
index 5f38d237e9d7..ca6ecd994bb5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,21 +5,19 @@
pkgname=dia-git
_pkgname=dia
-pkgver=6673.eb0767cc8
+pkgver=6728.df831435a
pkgrel=2
pkgdesc="A GTK+ based diagram creation program (GIT VERSION)"
arch=('x86_64')
license=('GPL')
url="http://live.gnome.org/Dia"
-depends=('poppler' 'python' 'libxslt' 'gtk2' 'freetype2' 'python2' 'graphene')
+depends=('poppler' 'python' 'libxslt' 'gtk2' 'freetype2' 'graphene')
makedepends=('git' 'cmake' 'meson' 'intltool' 'dblatex' 'docbook-xsl')
-optdepends=('python2')
provides=('dia')
conflicts=('dia')
options=('docs' '!emptydirs')
-source=("git+https://gitlab.gnome.org/GNOME/dia.git" "pdf-import.patch")
-md5sums=('SKIP'
- '8a8ab2cc59c85686b40ae232495cb449')
+source=("git+https://gitlab.gnome.org/GNOME/dia.git")
+md5sums=('SKIP')
pkgver() {
cd "${srcdir}/${_pkgname}"
@@ -28,22 +26,15 @@ pkgver() {
prepare() {
cd "${srcdir}/${_pkgname}"
- for file in `find -type f -name '*.py'`; do
- sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' "$file"
- done
sed -i "s/cc.find_library('emf'/cc.find_library('EMF'/g" meson.build
sed -i "s/cc.find_library('ogdf'/cc.find_library('OGDF'/g" meson.build
- sed -i 's/python23/python3/g' build-aux/*.py
- sed -i 's|#include "tool-icons.h"||g' objects/standard/outline.c
- sed -i 's/22.0.0/99.0.0/g' meson.build
sed -i '/ sheet,/d' sheets/meson.build
- patch -p0 < ../pdf-import.patch
+ sed -i 's/POPLLER/POPPLER/g' plug-ins/pdf/pdf-import.cpp
}
build() {
cd "${srcdir}/${_pkgname}"
- export PYTHON=/usr/bin/python2
arch-meson . build
ninja -C build
}
diff --git a/pdf-import.patch b/pdf-import.patch
deleted file mode 100644
index 05d8ffe888ea..000000000000
--- a/pdf-import.patch
+++ /dev/null
@@ -1,101 +0,0 @@
---- plug-ins/pdf/pdf-import.cpp 2022-05-25 17:35:28.000000000 +0200
-+++ plug-ins/pdf/pdf-import.cpp 2022-09-27 20:25:47.183817900 +0200
-@@ -152,13 +152,12 @@ public :
- void
- updateLineDash (GfxState *state)
- {
-- double *dashPattern;
-- int dashLength;
-- double dashStart;
--
-- state->getLineDash (&dashPattern, &dashLength, &dashStart);
-- this->dash_length = dashLength ? dashPattern[0] * scale : 1.0;
--
-+ const double *dashPattern=NULL;
-+ int dashLength=0;
-+ double dashStart=0;
-+ const std::vector<double> &dash = state->getLineDash(&dashStart); // > Poppler 22.09 ...
-+ dashPattern = dash.data();
-+ dashLength = dash.size();
- if (dashLength == 0)
- this->line_style = DIA_LINE_STYLE_SOLID;
- else if (dashLength > 5)
-@@ -318,10 +317,10 @@ public :
- //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,8 +332,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
-+ f1 = &f;
- g_print ("Font 0x%x: '%s' size=%g (* %g)\n",
-- GPOINTER_TO_INT (f), family, state->getTransformedFontSize(), scale);
-+ GPOINTER_TO_INT (f1), family, state->getTransformedFontSize(), scale);
-
- // now try to make a fontname Dia/Pango can cope with
- // strip style postfix - we already have extracted the style bits above
-@@ -353,8 +353,9 @@ public :
- 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,15 @@ DiaOutputDev::drawString(GfxState *state
- return;
- if (!(state->getFontSize() > 0.0))
- return;
-- font = (DiaFont *)g_hash_table_lookup (this->font_map, state->getFont());
-+gconstpointer f_1 = &state->getFont();
-+// g_print ("f_1 %p\n", f_1);
-+font = (DiaFont *)g_hash_table_lookup (this->font_map, f_1);
-+// 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 +875,10 @@ import_pdf(const gchar *filename, Diagra
- 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 +906,8 @@ import_pdf(const gchar *filename, Diagra
- delete diaOut;
- ret = TRUE;
- }
-- delete fileName;
-+ doc.reset();
-+ delete fileName;
-
- return ret;
- }
-