From: Martin Quinson
Date: Sun Aug 24 23:27:24 CEST 2025
Subject: [DISABLED] Ensure that gziped files are properly dealed with by Dia
 For some reason, dia fails to properly extract the gziped files. It
 may be linked to the fact that gz is not part of their name, but it
 actually works when I manually uncompress the files before feeding
 them to dia. The error was:
 .
   source-temp/figures/software-organization.dia:1: parser error : Start tag expected, '<' not found
   (dia:2613274): CRITICAL **: 10:37:51.197: dia error: need valid input file source-temp/figures/software-organization.dia
 .
 The exact same command works in my git checkout, but fails in my pbuilder chroot.
 .
 This patch is disabled (not in the serie) because I disabled the doc
 building all together for sake of space on the Debian servers.
Upstream-status: Reported per email today, but they cannot reproduce the issue.
 I prefer to work it around instead of digging any further.
--- a/ns-3.45/doc/manual/Makefile
+++ b/ns-3.45/doc/manual/Makefile
@@ -124,11 +124,15 @@
 
 %.eps : %.dia
 	@echo dia $(notdir $<)
-	@$(DIA) -t eps $< -e $@ >/dev/null
+	@zcat $< > temp-file.dia
+	@$(DIA) -t eps temp-file.dia -e $@ >/dev/null
+	@rm temp-file.dia
 
 %.png : %.dia
 	@echo dia $(notdir $<)
-	@$(DIA) -t png $< -e $@ >/dev/null
+	@zcat $< > temp-file.dia
+	@$(DIA) -t png temp-file.dia -e $@ >/dev/null
+	@rm temp-file.dia
 
 %.png : %.eps
 	@echo convert $(notdir $<)
--- a/ns-3.45/doc/models/Makefile
+++ b/ns-3.45/doc/models/Makefile
@@ -588,11 +588,15 @@
 
 %.eps : %.dia
 	@echo dia $(notdir $<)
-	@$(DIA) -t eps $< -e $@ >/dev/null
+	@zcat $< > temp-file.dia
+	@$(DIA) -t eps temp-file.dia -e $@ >/dev/null
+	@rm temp-file.dia
 
 %.png : %.dia
 	@echo dia $(notdir $<)
-	@$(DIA) -t png $< -e $@ >/dev/null
+	@zcat $< > temp-file.dia
+	@$(DIA) -t png temp-file.dia -e $@ >/dev/null
+	@rm temp-file.dia
 
 %.png : %.eps
 	@echo convert $(notdir $<)
