[packages/libdwg] Rel 2

arekm arekm at pld-linux.org
Tue Mar 10 00:14:55 CET 2026


commit a6e2c64e240f06d7df1b440665dd193f442105c0
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Mar 10 00:14:42 2026 +0100

    Rel 2

 decode-entity-handles-prototype.patch         | 11 ++++++++++
 dictionary-return-value.patch                 | 15 ++++++++++++++
 libdwg.spec                                   | 16 +++++++++++---
 missing-prototypes-includes.patch             | 30 +++++++++++++++++++++++++++
 programs-missing-includes-and-prototype.patch | 21 +++++++++++++++++++
 xdata-free-return-value.patch                 | 11 ++++++++++
 6 files changed, 101 insertions(+), 3 deletions(-)
---
diff --git a/libdwg.spec b/libdwg.spec
index 9399ba3..c4eb286 100644
--- a/libdwg.spec
+++ b/libdwg.spec
@@ -3,13 +3,18 @@ Summary:	LibDWG - free implementation of the DWG file format
 Summary(pl.UTF-8):	LibDWG - wolnodostępna implementacja formatu plików DWG
 Name:		libdwg
 Version:	0.6
-Release:	1
+Release:	2
 License:	GPL v3+
 Group:		Libraries
-Source0:	http://downloads.sourceforge.net/libdwg/%{name}-%{version}.tar.bz2
+Source0:	https://downloads.sourceforge.net/libdwg/%{name}-%{version}.tar.bz2
 # Source0-md5:	5801b61de890fd020c3bedfb86870eeb
 Patch0:		%{name}-format.patch
-URL:		http://libdwg.sourceforge.net/
+Patch1:		decode-entity-handles-prototype.patch
+Patch2:		xdata-free-return-value.patch
+Patch3:		dictionary-return-value.patch
+Patch4:		missing-prototypes-includes.patch
+Patch5:		programs-missing-includes-and-prototype.patch
+URL:		https://libdwg.sourceforge.net/
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -51,6 +56,11 @@ Statyczna biblioteka LibDWG.
 %prep
 %setup -q
 %patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
+%patch -P4 -p1
+%patch -P5 -p1
 
 %build
 %configure
diff --git a/decode-entity-handles-prototype.patch b/decode-entity-handles-prototype.patch
new file mode 100644
index 0000000..fbd15b2
--- /dev/null
+++ b/decode-entity-handles-prototype.patch
@@ -0,0 +1,11 @@
+--- libdwg-0.6/src/decode.h.orig	2013-08-06 20:45:32.000000000 +0200
++++ libdwg-0.6/src/decode.h	2026-03-09 17:10:00.000000000 +0100
+@@ -111,6 +111,8 @@
+ 
+ int dwg_decode_entity (Bit_Chain *dat, Dwg_Object_Entity * ent);
+ 
++int dwg_decode_entity_handles (Bit_Chain *dat, Dwg_Object *obj);
++
+ int dwg_decode_nongraph (Bit_Chain *dat, Dwg_Object_Nongraph * ngr);
+ 
+ void dwg_decode_common_entity_handle_data (Bit_Chain *dat, Dwg_Object *obj);
diff --git a/dictionary-return-value.patch b/dictionary-return-value.patch
new file mode 100644
index 0000000..1c1945f
--- /dev/null
+++ b/dictionary-return-value.patch
@@ -0,0 +1,15 @@
+--- libdwg-0.6/src/dwg_object.spe.c.orig	2013-08-06 20:45:32.000000000 +0200
++++ libdwg-0.6/src/dwg_object.spe.c	2026-03-09 17:35:00.000000000 +0100
+@@ -1466,7 +1466,11 @@
+           stderr,
+           "Strange: dictionary with more than 10 thousand entries! Handle: %lu\n",
+           obj->handle.value);
+-      return;
++#ifdef IS_PRINT
++      return;
++#else
++      return (0);
++#endif
+     }
+ 
+   FIELD_TV_VECTOR(text, numitems);
diff --git a/missing-prototypes-includes.patch b/missing-prototypes-includes.patch
new file mode 100644
index 0000000..78c4393
--- /dev/null
+++ b/missing-prototypes-includes.patch
@@ -0,0 +1,30 @@
+--- libdwg-0.6/src/decode_r2000.c.orig	2013-08-06 20:45:32.000000000 +0200
++++ libdwg-0.6/src/decode_r2000.c	2026-03-09 17:28:00.000000000 +0100
+@@ -30,6 +30,7 @@
+ #include "decode.h"
+ #include "decode_r2000.h"
+ #include "variables.h"
++#include "object.h"
+ #include "logging.h"
+ 
+ extern Dwg_Header_Section header;
+--- libdwg-0.6/src/decode_r2004.c.orig	2013-08-06 20:45:32.000000000 +0200
++++ libdwg-0.6/src/decode_r2004.c	2026-03-09 17:28:00.000000000 +0100
+@@ -32,6 +32,7 @@
+ #include "decode.h"
+ #include "decode_r2004.h"
+ #include "variables.h"
++#include "object.h"
+ #include "logging.h"
+ 
+ extern Dwg_Header_Section header;
+--- libdwg-0.6/src/dwg.c.orig	2013-08-06 20:45:32.000000000 +0200
++++ libdwg-0.6/src/dwg.c	2026-03-09 17:28:00.000000000 +0100
+@@ -32,6 +32,7 @@
+ #include "bits.h"
+ #include "decode.h"
+ #include "object.h"
++#include "variables.h"
+ #include "logging.h"
+ 
+ /** DWG version codes */
diff --git a/programs-missing-includes-and-prototype.patch b/programs-missing-includes-and-prototype.patch
new file mode 100644
index 0000000..3f3490e
--- /dev/null
+++ b/programs-missing-includes-and-prototype.patch
@@ -0,0 +1,21 @@
+--- libdwg-0.6/programs/dwg-dxf.c.orig	2013-08-06 20:45:32.000000000 +0200
++++ libdwg-0.6/programs/dwg-dxf.c	2026-03-09 17:36:00.000000000 +0100
+@@ -24,6 +24,7 @@
+ #include <stdint.h>
+ #include <string.h>
+ #include <math.h>
++#include <ctype.h>
+ #include "config.h"
+ 
+ #include "dwg.h"
+--- libdwg-0.6/programs/dump_objects.in.c.orig	2013-08-06 20:45:32.000000000 +0200
++++ libdwg-0.6/programs/dump_objects.in.c	2026-03-09 17:36:00.000000000 +0100
+@@ -191,6 +191,8 @@
+ #define DWG_NONGRAPH_END }
+ 
+ int dump_retzero() {return (0);}
++int dump_entity_handle (Bit_Chain * dat, Dwg_Object * obj);
++
+ 
+ #define IS_PRINT
+ #include "dwg_object.spe.c"
diff --git a/xdata-free-return-value.patch b/xdata-free-return-value.patch
new file mode 100644
index 0000000..6fd1905
--- /dev/null
+++ b/xdata-free-return-value.patch
@@ -0,0 +1,11 @@
+--- libdwg-0.6/src/dwg_object_free.in.c.orig	2013-08-06 20:45:32.000000000 +0200
++++ libdwg-0.6/src/dwg_object_free.in.c	2026-03-09 17:18:00.000000000 +0100
+@@ -78,7 +78,7 @@
+ 
+ #define HANDLE_VECTOR(name, sizefield, code) FIELD_TV(name)
+ 
+-#define FIELD_XDATA(name, size) return;
++#define FIELD_XDATA(name, size) return (0);
+ 
+ #define REACTORS(code) \
+   if (obj->reactors)\
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libdwg.git/commitdiff/a6e2c64e240f06d7df1b440665dd193f442105c0



More information about the pld-cvs-commit mailing list