Debian Patches

Status for dia/0.98+git20250126-2

Patch Description Author Forwarded Bugs Origin Last update
fix-python-interpreter.patch Use Python3 as Python interpreter Philippe SWARTVAGHER <phil.swart@gmx.fr> not-needed 2022-05-26
fix-helpdir.patch Use Debian help path This patch fixes Dia to use Debian's help directory for documentation Philippe SWARTVAGHER <phil.swart@gmx.fr> not-needed 2022-05-26
use-local-dbman.patch Use local XSL file Do not let xsltproc to make network requests Philippe SWARTVAGHER <phil.swart@gmx.fr> not-needed 2024-06-28
fix-libdia-install-dir.patch Install libdia.so in the correct folder Philippe SWARTVAGHER <phil.swart@gmx.fr> not-needed 2022-05-26
revert_xpm_loader_replacement.patch Revert switch from gdk_pixbuf_new_from_xpm_data to xpm_pixbuf_load
This patch reverts upstream commit 1ba72d126055130474b4ce589b1f3002972ba490
"general: use xpm-pixbuf to load xpms". As mentioned in the upstream commit
message, GdkPixbuf decided to disable weak-maintained loaders. The
corresponding MR for GdkPixbuf is
https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/163 and its revert
is discussed in this MR
https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/169. From a Debian
perspective, the affected loaders are still included (see
https://salsa.debian.org/gnome-team/gdk-pixbuf/-/commit/fa031d415056ba80ffa35afcd6e1263692849970).

To address this problem, upstream maintainer of Dia decided to maintain
xpm-pixbuf (https://gitlab.gnome.org/ZanderBrown/xpm-pixbuf), "a fork of the
old GdkPixbuf XPM code the acts as a drop-in replacement". However, using
xpm-pixbuf in Dia in Debian would require to package xpm-pixbuf as a standalone
Debian package. Given that:
- so far xpm-pixbuf seems to be used only in Dia,
- xpm is still supported by Debian's GdkPixbuf,
- there are ongoing upstream discussions about this change in GdkPixbuf,
- and finally other projects providing the set of disabled loaders start to
emerge,
do not include the commit switching from gdk_pixbuf_new_from_xpm_data() to
xpm_pixbuf_load().

diff --git a/app/dia-colour-area.c b/app/dia-colour-area.c
index 0b65c98f3..9fb1f40d8 100644
Philippe SWARTVAGHER <phil.swart@gmx.fr> not-needed 2024-06-29
use-gtkfontbutton.patch Use GtkFontButton, fix UML tab-order black hole, and fix possible sheet XML crash
This patch changes the custom font-selector window by a GtkFontButton widget.
This solves bugs #1094927 and #1077628, where the custom font-selector window
was very long to load.


diff --git a/lib/dia-font-selector.c b/lib/dia-font-selector.c
deleted file mode 100644
index fb59d6c98f7fa52fbeb00bed4fda40b369afd1ae..0000000000000000000000000000000000000000
Duncan McIntosh <duncan82013@live.ca> yes upstream https://gitlab.gnome.org/GNOME/dia/-/merge_requests/114 2025-02-03
fix-pythondevmode-crash.patch [PATCH] Fix crash with PYTHONDEVMODE=1
`PYTHONDEVMODE=1 ./dia` segfaults between splash screen and main window:
```
Debug memory block at address p=0x55ca41354dd0: API '!'
0 bytes originally requested
The 7 pad bytes at p-7 are not all FORBIDDENBYTE (0xfd):
at p-7: 0x00 *** OUCH
at p-6: 0x00 *** OUCH
at p-5: 0x00 *** OUCH
at p-4: 0x00 *** OUCH
at p-3: 0x00 *** OUCH
at p-2: 0x00 *** OUCH
at p-1: 0x00 *** OUCH
Because memory is corrupted at the start, the count of bytes requested
may be bogus, and checking the trailing pad bytes may segfault.
The 8 pad bytes at tail=0x55ca41354dd0 are not all FORBIDDENBYTE (0xfd):
at tail+0: 0x64 *** OUCH
at tail+1: 0x00 *** OUCH
at tail+2: 0x00 *** OUCH
at tail+3: 0x00 *** OUCH
at tail+4: 0x69 *** OUCH
at tail+5: 0x00 *** OUCH
at tail+6: 0x00 *** OUCH
at tail+7: 0x00 *** OUCH

Enable tracemalloc to get the memory block allocation traceback

Fatal Python error: _PyMem_DebugRawFree: bad ID: Allocated using API '!', verified using API 'r'
Python runtime state: initialized

Current thread 0x00007faee96adac0 (most recent call first):
<no Python frame>
```

This change mimics more what is done in the documentation
(https://docs.python.org/3/c-api/init_config.html#initialization-with-pyconfig)
and fixes the crash.

Original bug report: https://bugs.debian.org/1101349
Philippe SWARTVAGHER <phil.swart@gmx.fr> yes 2025-03-29
use-png-antialiasing.patch [PATCH] Use antialiasing for Cairo renderer
Fix #566

Antialiasing was disabled in commit
773b2bdbf5297f2ce76cd19ab0961c6876dc6d54, to avoid blurry UML diagrams
(according to the commit message).

It seems today enabling antialiasing doesn't make blurry UML diagrams
anymore, and produces prettier basic shapes (like circles), so we can
enable it by default.
Philippe SWARTVAGHER <phil.swart@gmx.fr> yes 2025-05-15

All known versions for source package 'dia'

Links