[packages/docbook-to-man] add various build fixes

atler atler at pld-linux.org
Fri Feb 21 02:42:46 CET 2025


commit a0fbe898ff3e97bee13ccede7c6643e03526bc00
Author: Jan Palus <atler at pld-linux.org>
Date:   Fri Feb 21 00:51:27 2025 +0100

    add various build fixes

 docbook-to-man.spec   |  8 ++++++++
 format-security.patch | 12 ++++++++++++
 includes.patch        | 31 +++++++++++++++++++++++++++++++
 link.patch            | 11 +++++++++++
 types.patch           | 34 ++++++++++++++++++++++++++++++++++
 5 files changed, 96 insertions(+)
---
diff --git a/docbook-to-man.spec b/docbook-to-man.spec
index a017484..4564abe 100644
--- a/docbook-to-man.spec
+++ b/docbook-to-man.spec
@@ -13,6 +13,10 @@ Patch0:		http://ftp.debian.org/debian/pool/main/d/docbook-to-man/%{name}_%{versi
 # Patch0-md5:	ac83d1d8852bcaadeb6bb81d559ea5c9
 Patch1:		%{name}-opt.patch
 Patch2:		%{name}-PLD.patch
+Patch3:		includes.patch
+Patch4:		types.patch
+Patch5:		format-security.patch
+Patch6:		link.patch
 URL:		http://www.oasis-open.org/docbook/tools/dtm/
 BuildRequires:	docbook-dtd41-sgml
 BuildRequires:	opensp
@@ -42,6 +46,10 @@ for patch in $(cat debian/patches/00list); do
 done
 %patch -P1 -p1
 %patch -P2 -p1
+%patch -P3 -p1
+%patch -P4 -p1
+%patch -P5 -p1
+%patch -P6 -p1
 
 %build
 %{__make} \
diff --git a/format-security.patch b/format-security.patch
new file mode 100644
index 0000000..aa5c227
--- /dev/null
+++ b/format-security.patch
@@ -0,0 +1,12 @@
+diff -ur docbook-to-man-2.0.0.orig/Instant/browse.c docbook-to-man-2.0.0/Instant/browse.c
+--- docbook-to-man-2.0.0.orig/Instant/browse.c	1999-07-03 14:58:23.000000000 +0200
++++ docbook-to-man-2.0.0/Instant/browse.c	2025-02-21 00:27:50.313026958 +0100
+@@ -168,7 +168,7 @@
+ 	    if (av[1] && isdigit(*av[1])) {
+ 		n = atoi(av[1]);
+ 		if (n < ce->ndcont) {
+-		    printf(ce->dcont[n]);
++		    printf("%s", ce->dcont[n]);
+ 		    fputs("\n", stdout);
+ 		}
+ 		else if (ce->ndcont == 0)
diff --git a/includes.patch b/includes.patch
new file mode 100644
index 0000000..735b90a
--- /dev/null
+++ b/includes.patch
@@ -0,0 +1,31 @@
+diff -ur docbook-to-man-2.0.0.orig/Instant/main.c docbook-to-man-2.0.0/Instant/main.c
+--- docbook-to-man-2.0.0.orig/Instant/main.c	2025-02-21 00:14:34.947248962 +0100
++++ docbook-to-man-2.0.0/Instant/main.c	2025-02-21 00:20:01.078008760 +0100
+@@ -88,6 +88,7 @@
+ #include <sys/stat.h>
+ #include <sys/file.h>
+ #include <time.h>
++#include <unistd.h>
+ 
+ #define STORAGE
+ #include "general.h"
+diff -ur docbook-to-man-2.0.0.orig/Instant/tptregexp/regerror.c docbook-to-man-2.0.0/Instant/tptregexp/regerror.c
+--- docbook-to-man-2.0.0.orig/Instant/tptregexp/regerror.c	1999-07-03 14:58:24.000000000 +0200
++++ docbook-to-man-2.0.0/Instant/tptregexp/regerror.c	2025-02-21 00:24:40.810160974 +0100
+@@ -1,4 +1,5 @@
+ #include <stdio.h>
++#include <stdlib.h>
+ 
+ void
+ tpt_regerror(s)
+diff -ur docbook-to-man-2.0.0.orig/Instant/tptregexp/regexp.c docbook-to-man-2.0.0/Instant/tptregexp/regexp.c
+--- docbook-to-man-2.0.0.orig/Instant/tptregexp/regexp.c	2025-02-21 00:14:34.947720869 +0100
++++ docbook-to-man-2.0.0/Instant/tptregexp/regexp.c	2025-02-21 00:18:49.005720867 +0100
+@@ -23,6 +23,7 @@
+  * regular-expression syntax might require a total rethink.
+  */
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <tptregexp.h>
+ #include "regmagic.h"
diff --git a/link.patch b/link.patch
new file mode 100644
index 0000000..a2dfd45
--- /dev/null
+++ b/link.patch
@@ -0,0 +1,11 @@
+diff -ur docbook-to-man-2.0.0.orig/Instant/main.c docbook-to-man-2.0.0/Instant/main.c
+--- docbook-to-man-2.0.0.orig/Instant/main.c	2025-02-21 00:41:01.489354605 +0100
++++ docbook-to-man-2.0.0/Instant/main.c	2025-02-21 00:41:58.574413270 +0100
+@@ -92,6 +92,7 @@
+ 
+ #define STORAGE
+ #include "general.h"
++#undef STORAGE
+ 
+ /* [ANS-db3l] Included for character mapping in ReadESIS */
+ #include <tptregexp.h>
diff --git a/types.patch b/types.patch
new file mode 100644
index 0000000..acc50de
--- /dev/null
+++ b/types.patch
@@ -0,0 +1,34 @@
+diff -ur docbook-to-man-2.0.0.orig/Instant/traninit.c docbook-to-man-2.0.0/Instant/traninit.c
+--- docbook-to-man-2.0.0.orig/Instant/traninit.c	1999-07-03 14:58:23.000000000 +0200
++++ docbook-to-man-2.0.0/Instant/traninit.c	2025-02-21 00:22:52.436411826 +0100
+@@ -82,6 +82,7 @@
+ 
+ /* forward references */
+ void	RememberTransSpec(Trans_t *, int);
++extern void ExpandVariables(char *in, char *out, Element_t *e);
+ 
+ /* ______________________________________________________________________ */
+ /*  Read the translation specs from the input file, storing in memory.
+diff -ur docbook-to-man-2.0.0.orig/Instant/tranvar.c docbook-to-man-2.0.0/Instant/tranvar.c
+--- docbook-to-man-2.0.0.orig/Instant/tranvar.c	1999-07-03 14:58:23.000000000 +0200
++++ docbook-to-man-2.0.0/Instant/tranvar.c	2025-02-21 00:26:45.617566936 +0100
+@@ -79,6 +79,7 @@
+ void	ChaseIDRefs(Element_t *, char *, char *, FILE *);
+ void	Find(Element_t *, int, char **, FILE *);
+ void	GetIDREFnames();
++extern void CALStable(Element_t *e, FILE *fp, char **av, int ac);
+ 
+ /* ______________________________________________________________________ */
+ /*  Handle "special" variable - read file, run command, do action, etc.
+diff -ur docbook-to-man-2.0.0.orig/Instant/main.c docbook-to-man-2.0.0/Instant/main.c
+--- docbook-to-man-2.0.0.orig/Instant/main.c	2025-02-21 00:31:50.623187330 +0100
++++ docbook-to-man-2.0.0/Instant/main.c	2025-02-21 00:35:10.628664716 +0100
+@@ -191,7 +191,7 @@
+     time_t	tnow;
+     struct tm	*nowtm;
+     char	*cp, buf[100];
+-    extern	int gethostname(char *, int);	/* not in a system .h file... */
++    extern	int gethostname(char *, size_t);	/* not in a system .h file... */
+ 
+     /* where we try to find data/library files */
+     if (!(tpt_lib=getenv(TPT_LIB))) tpt_lib = DEF_TPT_LIB;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/docbook-to-man.git/commitdiff/a0fbe898ff3e97bee13ccede7c6643e03526bc00



More information about the pld-cvs-commit mailing list