git: fad4eb7443e3 - main - print/a2ps: add more patches

From: Dirk Meyer <dinoex_at_FreeBSD.org>
Date: Tue, 15 Feb 2022 10:06:59 UTC
The branch main has been updated by dinoex:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fad4eb7443e31d577c4d3ea25b19ce2261eb35aa

commit fad4eb7443e31d577c4d3ea25b19ce2261eb35aa
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2022-02-15 10:02:17 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2022-02-15 10:06:38 +0000

    print/a2ps: add more patches
---
 print/a2ps/files/patch-fixps.in   | 28 ++++++++++++++++++++++++++++
 print/a2ps/files/patch-parseppd.y | 11 +++++++++++
 print/a2ps/files/patch-parsessh.y | 11 +++++++++++
 print/a2ps/files/patch-psgen.c    | 11 +++++++++++
 4 files changed, 61 insertions(+)

diff --git a/print/a2ps/files/patch-fixps.in b/print/a2ps/files/patch-fixps.in
new file mode 100644
index 000000000000..ac4018e56624
--- /dev/null
+++ b/print/a2ps/files/patch-fixps.in
@@ -0,0 +1,28 @@
+--- contrib/fixps.in.orig	2000-02-21 08:16:15 UTC
++++ contrib/fixps.in
+@@ -38,7 +38,7 @@ output=-	# Default is stdout
+ run_gs=0
+ # What action to perform: fixps, cat, check, and gs
+ task=fixps
+-tmpdir=/tmp/$program.$$
++tmpdir=$(mktemp -d -t ${program}) || exit 1
+ verbose=echo
+ 
+ # The version/usage strings
+@@ -191,7 +191,6 @@ else
+   trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
+ fi
+ 
+-mkdir $tmpdir
+ fixps_sed=$tmpdir/fixps.sed
+ 
+ # If printing from stdin, save into a tmp file
+@@ -390,7 +389,7 @@ if test $task != check; then
+   	eval "$command" ;;
+       gs)
+         $verbose "$program: making a full rewrite of the file ($gs)." >&2
+-  	$gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=- -c save pop -f "$file" ;;
++  	$gs -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=- -c save pop -f "$file" ;;
+     esac
+   )
+ fi
diff --git a/print/a2ps/files/patch-parseppd.y b/print/a2ps/files/patch-parseppd.y
new file mode 100644
index 000000000000..06b0121eb1dc
--- /dev/null
+++ b/print/a2ps/files/patch-parseppd.y
@@ -0,0 +1,11 @@
+--- lib/parseppd.y.orig	1999-12-16 01:00:13 UTC
++++ lib/parseppd.y
+@@ -154,7 +154,7 @@ font_clause :
+ void
+ yyerror (const char *msg)
+ {
+-  error_at_line (1, 0, ppdfilename, ppdlineno, msg);
++  error_at_line (1, 0, ppdfilename, ppdlineno, "%s", msg);
+ }
+ 
+ /*
diff --git a/print/a2ps/files/patch-parsessh.y b/print/a2ps/files/patch-parsessh.y
new file mode 100644
index 000000000000..6cf3c874f0a4
--- /dev/null
+++ b/print/a2ps/files/patch-parsessh.y
@@ -0,0 +1,11 @@
+--- src/parsessh.y.orig	1999-12-16 01:06:30 UTC
++++ src/parsessh.y
+@@ -740,7 +740,7 @@ exception_def_opt:
+ void
+ yyerror (const char *msg)
+ {
+-  error_at_line (1, 0, sshfilename, sshlineno, msg);
++  error_at_line (1, 0, sshfilename, sshlineno, "%s", msg);
+ }
+ 
+ /*
diff --git a/print/a2ps/files/patch-psgen.c b/print/a2ps/files/patch-psgen.c
new file mode 100644
index 000000000000..2007d9c4596d
--- /dev/null
+++ b/print/a2ps/files/patch-psgen.c
@@ -0,0 +1,11 @@
+--- lib/psgen.c.orig	2000-01-15 23:15:07 UTC
++++ lib/psgen.c
+@@ -232,7 +232,7 @@ output_marker (a2ps_job * job, const char * kind, ucha
+     default:
+       *buf = '\0';
+       ps_escape_char (job, cp[i], buf);
+-      output (jdiv, (char *) buf);
++      output (jdiv, "%s", (char *) buf);
+       break;
+     }
+   }