update to 0.97.2 [release 0.97.2-1mamba;Sat Jul 21 2012]

This commit is contained in:
Automatic Build System 2024-01-05 21:46:30 +01:00
parent e05d528afc
commit 46ee278c99
9 changed files with 627 additions and 0 deletions

View File

@ -1,2 +1,7 @@
# dia
Dia is designed to be much like the commercial Windows program 'Visio'.
It can be used to draw many different kinds of diagrams.
It currently has special objects to help draw entity relationship diagrams, UML diagrams, flowcharts, network diagrams, and simple circuits.
It is also possible to add support for new shapes by writing simple XML files, using a subset of SVG to draw the shape.

View File

@ -0,0 +1,24 @@
diff -pur dia-0.95/app/commands.c dia-0.95-fix/app/commands.c
--- dia-0.95/app/commands.c 2006-01-27 18:48:45.000000000 +0100
+++ dia-0.95-fix/app/commands.c 2006-05-26 09:22:59.000000000 +0200
@@ -575,7 +575,7 @@ help_manual_callback(gpointer data, guin
ShellExecuteA (0, "open", helpindex, NULL, helpdir, SW_SHOWNORMAL);
#else
command = getenv("BROWSER");
- command = g_strdup_printf("%s 'file://%s' &", command ? command : "gnome-open", helpindex);
+ command = g_strdup_printf("%s 'file://%s' &", command ? command : "konqueror", helpindex);
system(command);
g_free(command);
#endif
diff -pur dia-0.95/plug-ins/xfig/xfig-export.c dia-0.95-fix/plug-ins/xfig/xfig-export.c
--- dia-0.95/plug-ins/xfig/xfig-export.c 2005-08-30 05:45:41.000000000 +0200
+++ dia-0.95-fix/plug-ins/xfig/xfig-export.c 2006-05-26 10:55:08.000000000 +0200
@@ -264,7 +264,7 @@ static void
figWarn(XfigRenderer *renderer, int warning)
{
if (renderer->warnings[warning]) {
- message_warning(renderer->warnings[warning]);
+ message_warning("%s", renderer->warnings[warning]);
renderer->warnings[warning] = NULL;
}
}

229
dia-0.95-formatstring.patch Normal file
View File

@ -0,0 +1,229 @@
Only in dia-0.95/app: .#filedlg.c
diff -ur dia-0.95.orig/app/app_procs.c dia-0.95/app/app_procs.c
--- dia-0.95.orig/app/app_procs.c 2006-02-27 22:29:02.000000000 +0100
+++ dia-0.95/app/app_procs.c 2006-05-22 22:22:37.000000000 +0200
@@ -1175,7 +1175,7 @@
# endif
if (!g_option_context_parse (context, &argc, &argv, &error)) {
if (error) { /* IMO !error here is a bug upstream, triggered with --gdk-debug=updates */
- g_print (error->message);
+ g_print ("%s", error->message);
g_error_free (error);
} else {
g_print ("Invalid option?");
@@ -1273,22 +1273,22 @@
g_print(_("The original author of Dia was:\n\n"));
for (i = 0; i < NUMBER_OF_ORIG_AUTHORS; i++) {
- g_print(authors[i]); g_print("\n");
+ g_print("%s\n", authors[i]);
}
g_print(_("\nThe current maintainers of Dia are:\n\n"));
for (i = NUMBER_OF_ORIG_AUTHORS; i < NUMBER_OF_ORIG_AUTHORS + NUMBER_OF_MAINTAINERS; i++) {
- g_print(authors[i]); g_print("\n");
+ g_print("%s\n", authors[i]);
}
g_print(_("\nOther authors are:\n\n"));
for (i = NUMBER_OF_ORIG_AUTHORS + NUMBER_OF_MAINTAINERS; i < nauthors; i++) {
- g_print(authors[i]); g_print("\n");
+ g_print("%s\n", authors[i]);
}
g_print(_("\nDia is documented by:\n\n"));
for (i = 0; i < ndocumentors; i++) {
- g_print(documentors[i]); g_print("\n");
+ g_print("%s\n", documentors[i]);
}
exit(0);
diff -ur dia-0.95.orig/app/display.c dia-0.95/app/display.c
--- dia-0.95.orig/app/display.c 2006-03-20 22:24:26.000000000 +0100
+++ dia-0.95/app/display.c 2006-05-23 09:39:40.000000000 +0200
@@ -1119,7 +1119,6 @@
Diagram *dia;
GtkWidget *dialog, *button;
gchar *fname;
- gchar *msg;
g_return_if_fail(ddisp != NULL);
@@ -1134,10 +1133,6 @@
fname = dia->filename;
if (!fname)
fname = _("<unnamed>");
- msg = g_strdup_printf (
- _("The diagram '%s'\n"
- "has not been saved. Save changes now?"),
- fname);
dialog = gtk_message_dialog_new(GTK_WINDOW (ddisp->shell),
GTK_DIALOG_MODAL,
@@ -1145,8 +1140,9 @@
GTK_BUTTONS_NONE, /* no standard buttons */
_("Closing diagram without saving"),
NULL);
- gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), msg);
- g_free (msg);
+ gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
+ _("The diagram '%s'\n"
+ "has not been saved. Save changes now?"), fname);
gtk_window_set_title (GTK_WINDOW(dialog), _("Close Diagram"));
button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
diff -ur dia-0.95.orig/app/filedlg.c dia-0.95/app/filedlg.c
--- dia-0.95.orig/app/filedlg.c 2006-02-05 14:42:09.000000000 +0100
+++ dia-0.95/app/filedlg.c 2006-05-23 09:41:29.000000000 +0200
@@ -299,7 +299,6 @@
if (stat(filename, &stat_struct) == 0) {
GtkWidget *dialog = NULL;
- char buffer[300];
char *utf8filename = NULL;
if (!g_utf8_validate(filename, -1, NULL)) {
utf8filename = g_filename_to_utf8(filename, -1, NULL, NULL, NULL);
@@ -310,16 +309,15 @@
}
if (utf8filename == NULL) utf8filename = g_strdup(filename);
- g_snprintf(buffer, 300,
- _("The file '%s' already exists.\n"
- "Do you want to overwrite it?"), utf8filename);
- g_free(utf8filename);
dialog = gtk_message_dialog_new (GTK_WINDOW(fs),
GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO,
_("File already exists"));
- gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), buffer);
+ gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
+ _("The file '%s' already exists.\n"
+ "Do you want to overwrite it?"), utf8filename);
+ g_free(utf8filename);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_YES) {
@@ -552,17 +550,15 @@
if (stat(filename, &statbuf) == 0) {
GtkWidget *dialog = NULL;
- char buffer[300];
- g_snprintf(buffer, 300,
- _("The file '%s' already exists.\n"
- "Do you want to overwrite it?"), dia_message_filename(filename));
dialog = gtk_message_dialog_new (GTK_WINDOW(fs),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO,
_("File already exists"));
- gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), buffer);
+ gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
+ _("The file '%s' already exists.\n"
+ "Do you want to overwrite it?"), dia_message_filename(filename));
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_YES) {
diff -ur dia-0.95.orig/app/interface.c dia-0.95/app/interface.c
--- dia-0.95.orig/app/interface.c 2006-05-22 22:23:52.000000000 +0200
+++ dia-0.95/app/interface.c 2006-05-22 21:59:00.000000000 +0200
@@ -914,7 +914,7 @@
{
Sheet *sheet = get_sheet_by_name(string);
if (sheet == NULL) {
- message_warning(g_strdup_printf(_("No sheet named %s"), string));
+ message_warning(_("No sheet named %s"), string);
} else {
persistence_set_string("last-sheet-selected", string);
fill_sheet_wbox(sheet);
diff -ur dia-0.95.orig/app/load_save.c dia-0.95/app/load_save.c
--- dia-0.95.orig/app/load_save.c 2006-02-11 23:48:06.000000000 +0100
+++ dia-0.95/app/load_save.c 2006-05-22 21:57:39.000000000 +0200
@@ -200,7 +200,7 @@
g_hash_table_foreach(unknown_hash,
GHFuncUnknownObjects,
unknown_str);
- message_error(unknown_str->str);
+ message_error("%s", unknown_str->str);
}
g_hash_table_destroy(unknown_hash);
g_string_free(unknown_str, TRUE);
diff -ur dia-0.95.orig/app/sheets.c dia-0.95/app/sheets.c
--- dia-0.95.orig/app/sheets.c 2006-02-26 10:52:32.000000000 +0100
+++ dia-0.95/app/sheets.c 2006-05-22 21:56:44.000000000 +0200
@@ -340,7 +340,7 @@
gdk_pixbuf_render_pixmap_and_mask(pixbuf, pixmap, mask, 1.0);
gdk_pixbuf_unref(pixbuf);
} else {
- message_warning (error->message);
+ message_warning ("%s", error->message);
g_error_free (error);
*pixmap = gdk_pixmap_colormap_create_from_xpm_d
(NULL,
diff -ur dia-0.95.orig/lib/dia_image.c dia-0.95/lib/dia_image.c
--- dia-0.95.orig/lib/dia_image.c 2005-11-03 23:22:03.000000000 +0100
+++ dia-0.95/lib/dia_image.c 2006-05-22 22:06:26.000000000 +0200
@@ -92,7 +92,7 @@
* only if there is something else wrong while loading it.
*/
if (g_file_test(filename, G_FILE_TEST_EXISTS))
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
return NULL;
}
diff -ur dia-0.95.orig/lib/message.c dia-0.95/lib/message.c
--- dia-0.95.orig/lib/message.c 2006-05-22 22:24:18.000000000 +0200
+++ dia-0.95/lib/message.c 2006-05-22 21:55:02.000000000 +0200
@@ -86,7 +86,7 @@
0, /* GtkDialogFlags */
type,
GTK_BUTTONS_CLOSE,
- buf);
+ "%s", buf);
if (title) {
gchar *real_title;
diff -ur dia-0.95.orig/plug-ins/python/diamodule.c dia-0.95/plug-ins/python/diamodule.c
--- dia-0.95.orig/plug-ins/python/diamodule.c 2005-08-29 07:17:51.000000000 +0200
+++ dia-0.95/plug-ins/python/diamodule.c 2006-05-22 22:04:37.000000000 +0200
@@ -393,11 +393,11 @@
return NULL;
if (0 == type)
- message_notice (text);
+ message_notice ("%s", text);
else if (1 == type)
- message_warning (text);
+ message_warning ("%s", text);
else
- message_error (text);
+ message_error ("%s", text);
Py_INCREF(Py_None);
return Py_None;
diff -ur dia-0.95.orig/plug-ins/python/pydia-error.c dia-0.95/plug-ins/python/pydia-error.c
--- dia-0.95.orig/plug-ins/python/pydia-error.c 2005-09-13 22:19:27.000000000 +0200
+++ dia-0.95/plug-ins/python/pydia-error.c 2006-05-22 22:04:02.000000000 +0200
@@ -46,7 +46,7 @@
PyFile_WriteObject (v, ef, 0);
PyTraceBack_Print(tb, ef);
if (((PyDiaError*)ef)->str && popup)
- message_error (((PyDiaError*)ef)->str->str);
+ message_error ("%s", ((PyDiaError*)ef)->str->str);
g_free (sLoc);
Py_DECREF (ef);
Py_XDECREF(exc);
diff -ur dia-0.95.orig/plug-ins/wmf/wmf.cpp dia-0.95/plug-ins/wmf/wmf.cpp
--- dia-0.95.orig/plug-ins/wmf/wmf.cpp 2006-02-20 22:12:02.000000000 +0100
+++ dia-0.95/plug-ins/wmf/wmf.cpp 2006-05-22 22:23:00.000000000 +0200
@@ -223,7 +223,7 @@
va_end (args);
//fprintf(renderer->file, string);
- g_print(string);
+ g_print("%s", string);
g_free(string);
}

25
dia-0.95-pre6-help.patch Normal file
View File

@ -0,0 +1,25 @@
--- dia-0.95-pre6/app/commands.c.help 2006-01-27 18:48:45.000000000 +0100
+++ dia-0.95-pre6/app/commands.c 2006-03-22 16:37:25.000000000 +0100
@@ -526,7 +526,7 @@
const char *dentry;
GError *error = NULL;
- helpdir = dia_get_data_directory("help");
+ helpdir = g_strdup ("/usr/share/gnome/help/dia");
if (!helpdir) {
message_warning(_("Could not find help directory"));
return;
@@ -554,11 +554,11 @@
G_DIR_SEPARATOR_S "dia-manual.chm", NULL);
if (!g_file_test(helpindex, G_FILE_TEST_EXISTS)) {
helpindex = g_strconcat(helpdir, G_DIR_SEPARATOR_S, dentry,
- G_DIR_SEPARATOR_S "index.html", NULL);
+ G_DIR_SEPARATOR_S "dia.xml", NULL);
}
#else
helpindex = g_strconcat(helpdir, G_DIR_SEPARATOR_S, dentry,
- G_DIR_SEPARATOR_S "index.html", NULL);
+ G_DIR_SEPARATOR_S "dia.xml", NULL);
#endif
bestscore = score;
}

View File

@ -0,0 +1,12 @@
diff -pur dia-0.95/app/commands.c dia-0.95-fix/app/commands.c
--- dia-0.95/app/commands.c 2006-01-27 18:48:45.000000000 +0100
+++ dia-0.95-fix/app/commands.c 2006-05-26 09:22:59.000000000 +0200
@@ -575,7 +575,7 @@ help_manual_callback(gpointer data, guin
ShellExecuteA (0, "open", helpindex, NULL, helpdir, SW_SHOWNORMAL);
#else
command = getenv("BROWSER");
- command = g_strdup_printf("%s 'file://%s' &", command ? command : "gnome-open", helpindex);
+ command = g_strdup_printf("%s 'file://%s' &", command ? command : "konqueror", helpindex);
system(command);
g_free(command);
#endif

55
dia-0.96.1-dtdfix.patch Normal file
View File

@ -0,0 +1,55 @@
--- dia-0.96.1/doc/pl/dia.xml 2008-07-20 01:49:37.000000000 +0200
+++ dia-0.96.1-gil/doc/pl/dia.xml 2008-07-20 01:56:00.000000000 +0200
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "../../dtd/docbookx.dtd"[
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"[
<!ENTITY VERSION "0.96.1">
<!ENTITY INTRODUCTION SYSTEM "intro.xml">
<!ENTITY QUICKSTART SYSTEM "usage-quickstart.xml">
@@ -17,7 +17,7 @@
<!ENTITY LICENSE SYSTEM "license.xml">
]>
-<book id="index" lang="pl"> <!-- proszę nie zmieniać identyfikatora -->
+<book id="index" lang="pl"> <!-- prosz�nie zmienia�identyfikatora -->
<bookinfo>
<title>Dia</title>
@@ -33,26 +33,26 @@
Zezwolenie obejmuje kopiowanie, rozpowszechnianie i/lub modyfikowanie
dokumentu zgodnie z zasadami licencji
<citetitle>GNU Free Documentation
- License</citetitle> w wersji 1.1 lub dowolnej późniejszej opublikowanej
- przez Free Software Foundation bez niezmiennych akapitów i ukrytej
- treści. Kopię licencji
+ License</citetitle> w wersji 1.1 lub dowolnej p�iejszej opublikowanej
+ przez Free Software Foundation bez niezmiennych akapitďż˝ i ukrytej
+ treci. Kopi�licencji
<citetitle>GNU Free Documentation License</citetitle>
- można pobrać ze strony www Free Software Foundation pod adresem
+ mona pobra�ze strony www Free Software Foundation pod adresem
<ulink type="http" url="http://www.fsf.org">www.fsf.org</ulink>
lub po napisaniu na adres:
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
</para>
<para>
- Wiele z nazw używanych przez firmy do oznaczania swoich produktów oraz
- usług jest traktowana jako znaki handlowe. Wszędzie gdzie te nazwy
- pojawiają się w dowolnej dokumentacji GNOME, i zostały dostrzeżone
- przez członków GNOME Documentation Project zaznaczono je wersalikami.
+ Wiele z nazw uywanych przez firmy do oznaczania swoich produktďż˝ oraz
+ usug jest traktowana jako znaki handlowe. Wsz�zie gdzie te nazwy
+ pojawiaj si�w dowolnej dokumentacji GNOME, i zostay dostrzeone
+ przez czonkďż˝ GNOME Documentation Project zaznaczono je wersalikami.
</para>
</legalnotice>
<releaseinfo>
- To jest wersja 0.1 podręcznika Dia.
+ To jest wersja 0.1 podr�znika Dia.
</releaseinfo>
</bookinfo>
&QUICKSTART;

View File

@ -0,0 +1,52 @@
Index: dia-0.97.1/objects/custom/shape_typeinfo.c
===================================================================
--- dia-0.97.1.orig/objects/custom/shape_typeinfo.c
+++ dia-0.97.1/objects/custom/shape_typeinfo.c
@@ -27,7 +27,7 @@
#include "custom_util.h"
#include <string.h>
#include <stdarg.h>
-#include <glib/gstrfuncs.h>
+#include <glib.h>
#include <glib/gstdio.h>
#include <libxml/parser.h>
Index: dia-0.97.1/plug-ins/pgf/render_pgf.c
===================================================================
--- dia-0.97.1.orig/plug-ins/pgf/render_pgf.c
+++ dia-0.97.1/plug-ins/pgf/render_pgf.c
@@ -61,7 +61,7 @@ TODO:
#endif
#include <errno.h>
-#include <glib/gprintf.h>
+#include <glib.h>
#include <glib/gstdio.h>
#include "intl.h"
Index: dia-0.97.1/tests/test-boundingbox.c
===================================================================
--- dia-0.97.1.orig/tests/test-boundingbox.c
+++ dia-0.97.1/tests/test-boundingbox.c
@@ -28,7 +28,7 @@
#include <glib.h>
#include <glib-object.h>
-#if GLIB_CHECK_VERSION(2,16,0)
+#if GLIB_CHECK_VERSION(2,16,0) && !GLIB_CHECK_VERSION(2,31,0)
#include <glib/gtestutils.h>
#endif
#include "dialib.h"
Index: dia-0.97.1/tests/test-objects.c
===================================================================
--- dia-0.97.1.orig/tests/test-objects.c
+++ dia-0.97.1/tests/test-objects.c
@@ -28,7 +28,7 @@
#include <glib.h>
#include <glib-object.h>
-#if GLIB_CHECK_VERSION(2,16,0)
+#if GLIB_CHECK_VERSION(2,16,0) && !GLIB_CHECK_VERSION(2,31,0)
#include <glib/gtestutils.h>
#endif

View File

@ -0,0 +1,10 @@
--- dia-0.97.2/plug-ins/wmf/wmf.cpp~ 2011-03-13 14:07:48.000000000 +0100
+++ dia-0.97.2/plug-ins/wmf/wmf.cpp 2011-12-31 14:23:18.047623497 +0100
@@ -1273,7 +1273,7 @@
renderer->use_pango = FALSE;
#endif
} else {
- renderer->hPrintDC = (W32::HDC)user_data;
+ renderer->hPrintDC = *((W32::HDC*)user_data);
renderer->use_pango = (user_data != NULL); // always for printing
}

215
dia.spec Normal file
View File

@ -0,0 +1,215 @@
%define with_python 1
%define with_cairo 0
%define majver %(echo %version | cut -d. -f 1-2)
Name: dia
Version: 0.97.2
Release: 1mamba
Summary: Dia is a gtk+ based diagram creation program
Group: Graphical Desktop/Applications/Graphics
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://live.gnome.org/Dia
Source: http://ftp.gnome.org/pub/gnome/sources/%{name}/%{majver}/%{name}-%{version}.tar.xz
##ftp://ftp.gnome.org/pub/gnome/sources/dia/%{version}/dia-%{version}.tar.bz2
Patch0: %{name}-0.95-use_kde_browser.patch
Patch1: %{name}-0.95-cve_2006_2480.patch
Patch2: %{name}-0.95-formatstring.patch
# FC patches
Patch3: %{name}-0.96.1-dtdfix.patch
Patch4: %{name}-0.95-pre6-help.patch
Patch5: %{name}-0.97.2-glib-2.31.patch
Patch6: dia-0.97.2-x86_64-wmf-cast.patch
License: GPL
BuildRequires: intltool >= 0.21
BuildRequires: perl >= 5.8.0
BuildRequires: pkgconfig >= 0.19
BuildRequires: libart_lgpl-devel >= 2.0.0
BuildRequires: gettext-devel >= 0.14.0
BuildRequires: xmlto >= 0.0.18
## AUTOBUILDREQ-BEGIN
BuildRequires: GConf-devel
BuildRequires: glibc-devel
BuildRequires: libart_lgpl-devel
BuildRequires: libatk-devel
BuildRequires: libbonobo-devel
BuildRequires: libbonoboui-devel
%if %with_cairo
BuildRequires: libcairo-devel
%endif
BuildRequires: libfontconfig-devel
BuildRequires: libfreetype-devel >= 2.0.9
BuildRequires: libglib-devel >= 2.0.0
BuildRequires: libgnomecanvas-devel
BuildRequires: libgnome-devel
BuildRequires: libgnome-keyring-devel
BuildRequires: libgnomeui-devel
BuildRequires: libgnome-vfs-devel
BuildRequires: libgtk-devel >= 2.0.0
BuildRequires: libICE-devel
BuildRequires: libpango-devel >= 1.1.5
BuildRequires: libpng-devel >= 1.2.8
BuildRequires: libpopt-devel
BuildRequires: libSM-devel
BuildRequires: libxml2-devel >= 2.0.0
BuildRequires: libxslt-devel >= 1.1.15
BuildRequires: libz-devel >= 1.2.3
BuildRequires: ORBit2-devel
%if %with_python
BuildRequires: pygtk
## AUTOBUILDREQ-END
BuildRequires: python >= 1.5.2
BuildRequires: libpython-devel
BuildRequires: python-pyxml >= 0.8.4
%endif
Requires: %{_bindir}/gnome-open
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Dia is designed to be much like the commercial Windows program 'Visio'.
It can be used to draw many different kinds of diagrams.
It currently has special objects to help draw entity relationship diagrams, UML diagrams, flowcharts, network diagrams, and simple circuits.
It is also possible to add support for new shapes by writing simple XML files, using a subset of SVG to draw the shape.
%package -n python-%{name}
Summary: Python bindings for %{name}
Group: Development/Bindings
Requires: %{name} = %{version}
Requires: python
Requires: pygtk
%description -n python-%{name}
Dia is designed to be much like the commercial Windows program 'Visio'.
It can be used to draw many different kinds of diagrams.
It currently has special objects to help draw entity relationship diagrams, UML diagrams, flowcharts, network diagrams, and simple circuits.
It is also possible to add support for new shapes by writing simple XML files, using a subset of SVG to draw the shape.
This package contains the dia plugins for python.
%prep
%setup -q
# note: remove this comment to use konqueror instead of gnome-open
#%patch0 -p1
#%patch1 -p1 -b .cve_2006_2480
#%patch2 -p1 -b .formatstring
#%patch3 -p1 -b .dtdfix
%patch4 -p1 -b .help
%patch5 -p1
%ifarch x86_64
%patch6 -p1
# FIXME: workaround
sed -i "s|\${py_lib}/libpython|lib64/libpython|" configure
%endif
%build
%configure \
--enable-gnome \
%if %with_cairo
--with-cairo \
%endif
%if %with_python
--with-python \
%endif
%make
#xmlto -o doc/en/manual html doc/en/dia.xml
#xmlto -o doc/pl/manual html doc/pl/dia.xml
# source broken
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%makeinstall
rm -fr %{buildroot}%{_datadir}/gnome/help/dia
install -d %{buildroot}%{_datadir}/gnome/help/dia/en
cp -a doc/en/* %{buildroot}%{_datadir}/gnome/help/dia/en
cp -a doc/en/graphics %{buildroot}%{_datadir}/gnome/help/dia/en/
ln -s en %{buildroot}%{_datadir}/gnome/help/dia/C
# FIXME: link needed to see help pages from dia
ln -s %{_datadir}/gnome/help/dia %{buildroot}%{_datadir}/dia/help
%{find_lang} %{name}
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/*
%dir %{_libdir}/dia
%{_libdir}/dia/*
%{_datadir}/applications/*
%dir %{_datadir}/dia
#%{_datadir}/dia/dia_logo.png
#%dir %{_datadir}/dia/images
#%{_datadir}/dia/images/*
%dir %{_datadir}/dia/ui
%{_datadir}/dia/ui/*-ui.xml
%dir %{_datadir}/dia/shapes
%{_datadir}/dia/shapes/*
%dir %{_datadir}/dia/sheets
%{_datadir}/dia/sheets/*
%dir %{_datadir}/dia/xslt
%{_datadir}/dia/xslt/*
%dir %{_datadir}/dia/help
%{_datadir}/dia/dia-splash.png
%{_datadir}/icons/hicolor/*/apps/dia.png
%{_datadir}/icons/hicolor/scalable/apps/dia.svg
%{_datadir}/omf/dia/dia-C.omf
%{_datadir}/omf/dia/dia-eu.omf
%{_datadir}/omf/dia/dia-fr.omf
%{_datadir}/omf/dia/dia-pl.omf
%dir %{_datadir}/doc/dia
%lang(en) %dir %{_datadir}/doc/dia/en
%lang(en) %{_datadir}/doc/dia/en/*
%lang(eu) %dir %{_datadir}/doc/dia/eu
%lang(eu) %{_datadir}/doc/dia/eu/*
%lang(fr) %dir %{_datadir}/doc/dia/fr
%lang(fr) %{_datadir}/doc/dia/fr/*
%lang(pl) %dir %{_datadir}/doc/dia/pl
%lang(pl) %{_datadir}/doc/dia/pl/*
%{_mandir}/fr/man1/dia.1.gz
%dir %{_datadir}/gnome/help/dia
%{_datadir}/gnome/help/dia/*
%{_datadir}/mime-info/*
#%{_datadir}/pixmaps/*
%{_mandir}/man1/dia.*
%doc AUTHORS COPYING ChangeLog NEWS README THANKS TODO
%if %with_python
%files -n python-%{name}
%defattr(-,root,root)
%dir %{_datadir}/dia/python
%{_datadir}/dia/python-startup.py
%{_datadir}/dia/python/*
%endif
%changelog
* Sat Jul 21 2012 Automatic Build System <autodist@mambasoft.it> 0.97.2-1mamba
- update to 0.97.2
* Sun Jul 20 2008 gil <puntogil@libero.it> 0.96.1-1mamba
- update to 0.96.1
- removed patch 2
- edit: patch 3. URL, Source
* Fri May 26 2006 Davide Madrisan <davide.madrisan@qilinux.it> 0.95-1qilnx
- update to version 0.95 by autospec
- drop gcc4, new-cairo, fix against CVE-2005-2966 (merged upstream)
- security fixes: format strings vulnerabilities CVE-2006-[1550,2453,2480]
* Thu Oct 20 2005 Davide Madrisan <davide.madrisan@qilinux.it> 0.94-2qilnx
- security fix CAN-2005-2966
- patch for gcc4
- rebuild with python support (new package python-%{name})
- do not use netscape as default browser, use konqueror
- build help pages in html format
* Thu Jun 16 2005 Alessandro Ramazzina <alessandro.ramazzina@qilinux.it> 0.94-1qilnx
- package created by autospec