From ebd449ddb8bea789ee0cae7b739aeec33336e8d1 Mon Sep 17 00:00:00 2001 From: 4fury-c3440d8 Date: Wed, 8 Mar 2023 21:15:56 +0300 Subject: [PATCH] add dia. --- office/misc/dia/actions.py | 29 +++++++++ office/misc/dia/files/CVE-2019-19451.patch | 12 ++++ .../dia/files/dia-unregister-import.patch | 37 +++++++++++ office/misc/dia/files/isinf.patch | 16 +++++ office/misc/dia/pspec.xml | 65 +++++++++++++++++++ 5 files changed, 159 insertions(+) create mode 100644 office/misc/dia/actions.py create mode 100644 office/misc/dia/files/CVE-2019-19451.patch create mode 100644 office/misc/dia/files/dia-unregister-import.patch create mode 100644 office/misc/dia/files/isinf.patch create mode 100644 office/misc/dia/pspec.xml diff --git a/office/misc/dia/actions.py b/office/misc/dia/actions.py new file mode 100644 index 0000000000..d0b2dda188 --- /dev/null +++ b/office/misc/dia/actions.py @@ -0,0 +1,29 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file https://www.gnu.org/licenses/gpl-3.0.txt + +from pisi.actionsapi import autotools, pisitools, get + +i = ''.join([ + ' --with-python', + ' --with-swig', + ' --disable-nls', + ' --disable-gnome', + ' --disable-static ' + ' --disable-hardbooks', + ]) + +def setup(): + pisitools.dosed("Makefile.in", "samples po sheets", "samples sheets") + autotools.configure(i) + +def build(): + autotools.make() + +def install(): + autotools.rawInstall("DESTDIR=%s" % get.installDIR()) + pisitools.removeDir("/usr/share/man/fr") + + pisitools.dodoc("AUTHORS", "MAINTAINERS", "NEWS", "THANKS") diff --git a/office/misc/dia/files/CVE-2019-19451.patch b/office/misc/dia/files/CVE-2019-19451.patch new file mode 100644 index 0000000000..fdc8386fba --- /dev/null +++ b/office/misc/dia/files/CVE-2019-19451.patch @@ -0,0 +1,12 @@ +diff --git a/app/app_procs.c b/app/app_procs.c +index d0f2d3d..423fe2f 100644 +--- a/app/app_procs.c ++++ b/app/app_procs.c +@@ -801,6 +801,7 @@ app_init (int argc, char **argv) + + if (!filename) { + g_print (_("Filename conversion failed: %s\n"), filenames[i]); ++ ++i; + continue; + } + diff --git a/office/misc/dia/files/dia-unregister-import.patch b/office/misc/dia/files/dia-unregister-import.patch new file mode 100644 index 0000000000..15feba0cac --- /dev/null +++ b/office/misc/dia/files/dia-unregister-import.patch @@ -0,0 +1,37 @@ +From a6e2409b85414b3d82dacd390ce9c9f007e254e8 Mon Sep 17 00:00:00 2001 +From: Jiri Popelka +Date: Wed, 5 Sep 2012 11:12:59 +0200 +Subject: [PATCH] Unregister vdx, xfig import filters during plugin unloading. + +--- + plug-ins/vdx/vdx.c | 1 + + plug-ins/xfig/xfig.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/plug-ins/vdx/vdx.c b/plug-ins/vdx/vdx.c +index 64bc4b0..82ddc4b 100644 +--- a/plug-ins/vdx/vdx.c ++++ b/plug-ins/vdx/vdx.c +@@ -43,6 +43,7 @@ static void + _plugin_unload (PluginInfo *info) + { + filter_unregister_export(&vdx_export_filter); ++ filter_unregister_import(&vdx_import_filter); + } + + +diff --git a/plug-ins/xfig/xfig.c b/plug-ins/xfig/xfig.c +index 966c294..10d68aa 100644 +--- a/plug-ins/xfig/xfig.c ++++ b/plug-ins/xfig/xfig.c +@@ -41,6 +41,7 @@ static void + _plugin_unload (PluginInfo *info) + { + filter_unregister_export(&xfig_export_filter); ++ filter_unregister_import(&xfig_import_filter); + } + + +-- +1.7.11.4 + diff --git a/office/misc/dia/files/isinf.patch b/office/misc/dia/files/isinf.patch new file mode 100644 index 0000000000..4cd4adbc86 --- /dev/null +++ b/office/misc/dia/files/isinf.patch @@ -0,0 +1,16 @@ +--- ./configure.orig ++++ ./configure +@@ -17436,11 +17436,11 @@ + #ifdef __cplusplus + extern "C" + #endif +-char isinf (); ++#include + int + main () + { +-return isinf (); ++return isinf (0.0); + ; + return 0; + } diff --git a/office/misc/dia/pspec.xml b/office/misc/dia/pspec.xml new file mode 100644 index 0000000000..6116e36584 --- /dev/null +++ b/office/misc/dia/pspec.xml @@ -0,0 +1,65 @@ + + + + + dia + http://wiki.gnome.org/Apps/Dia + + fury + uglyside@yandex.ru + + GPL-2 + app:gui + office.misc + Versatile diagramming tool. + Dia is a program for drawing diagrams. + + https://download.gnome.org/sources/dia/0.97/dia-0.97.3.tar.xz + + + swig + intltool + gtk2-devel + libpng-devel + libxml2-devel + libxslt-devel + python-devel + docbook-xsl + libart_lgpl-devel + + + + dia-unregister-import.patch + isinf.patch + CVE-2019-19451.patch + + + + + dia + + gtk2 + pango + cairo + libart_lgpl + + + /usr/bin + /usr/lib/dia + /usr/share + /usr/share/dia + /usr/share/man/man1 + /usr/share/mime-info + + + + + + 2023-03-08 + 0.97.3 + First build. + fury + uglyside@yandex.ru + + +