summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/a2ps/files')
-rw-r--r--app-text/a2ps/files/a2ps-4.13-manpage-chmod.patch12
-rw-r--r--app-text/a2ps/files/a2ps-4.13-stdout.diff13
-rw-r--r--app-text/a2ps/files/a2ps-4.13c-emacs.patch10
-rw-r--r--app-text/a2ps/files/a2ps-4.13c-fnmatch-replacement.patch43
-rw-r--r--app-text/a2ps/files/a2ps-4.13c-locale-gentoo.diff25
-rw-r--r--app-text/a2ps/files/a2ps-4.14-CVE-2001-1593.patch82
-rw-r--r--app-text/a2ps/files/a2ps-4.14-CVE-2014-0466.patch32
-rw-r--r--app-text/a2ps/files/a2ps-4.14-check-mempcpy.patch12
-rw-r--r--app-text/a2ps/files/a2ps-4.14-cleanup.patch106
-rw-r--r--app-text/a2ps/files/a2ps-4.14-fix-stpcpy-proto.patch17
-rw-r--r--app-text/a2ps/files/a2ps-4.14-ja-cleanup.patch122
-rw-r--r--app-text/a2ps/files/a2ps-4.14-psset.patch21
-rw-r--r--app-text/a2ps/files/a2ps-4.14-ptrdiff_t.patch14
-rw-r--r--app-text/a2ps/files/a2ps-4.14-texinfo-5.x.patch147
-rw-r--r--app-text/a2ps/files/a2ps-4.15-lpr-wrapper.patch23
-rw-r--r--app-text/a2ps/files/a2ps-4.15-stdout.patch16
16 files changed, 39 insertions, 656 deletions
diff --git a/app-text/a2ps/files/a2ps-4.13-manpage-chmod.patch b/app-text/a2ps/files/a2ps-4.13-manpage-chmod.patch
deleted file mode 100644
index e0c61124e9df..000000000000
--- a/app-text/a2ps/files/a2ps-4.13-manpage-chmod.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur a2ps-4.13.orig/man/Makefile.maint a2ps-4.13/man/Makefile.maint
---- a2ps-4.13.orig/man/Makefile.maint 2002-03-04 20:46:26.000000000 +0200
-+++ a2ps-4.13/man/Makefile.maint 2007-02-19 21:50:29.000000000 +0200
-@@ -20,7 +20,7 @@
- --include=$(basename $@).x \
- --include=common.x \
- $(executable) > $@-t || exit 1; \
-- chmod -w $@-t || exit 1; \
-+ chmod a-w $@-t || exit 1; \
- rm -f $@ || exit 1; \
- mv $@-t $@ || exit 1; \
- else \
diff --git a/app-text/a2ps/files/a2ps-4.13-stdout.diff b/app-text/a2ps/files/a2ps-4.13-stdout.diff
deleted file mode 100644
index 1e40e618fcbd..000000000000
--- a/app-text/a2ps/files/a2ps-4.13-stdout.diff
+++ /dev/null
@@ -1,13 +0,0 @@
---- lib/printers.c.orig Tue Oct 12 00:01:59 1999
-+++ lib/printers.c Wed May 2 11:23:25 2001
-@@ -315,8 +315,8 @@
- res->ppd = NULL; /* Printer's ppd are not read yet */
-
- /* Output */
-- /* Default is to send to default printer */
-- res->flag_output_is_printer = true;
-+ /* Default is to send to stdout */
-+ res->flag_output_is_printer = false;
- res->flag_output_name = NULL;
- res->output_is_file = true;
- res->output_name = NULL;
diff --git a/app-text/a2ps/files/a2ps-4.13c-emacs.patch b/app-text/a2ps/files/a2ps-4.13c-emacs.patch
deleted file mode 100644
index f1cd5d9ebdfc..000000000000
--- a/app-text/a2ps/files/a2ps-4.13c-emacs.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a2ps-4.13/contrib/emacs/a2ps-print.el.orig 2005-12-05 08:03:48.000000000 +0100
-+++ a2ps-4.13/contrib/emacs/a2ps-print.el 2005-12-06 16:38:14.000000000 +0100
-@@ -93,6 +93,7 @@
- (concat "--center-title=" name)
- (concat "--footer=" (concat name " Emacs buffer"))
- (concat "--pretty-print=" filetype)
-+ (concat "-d")
- ;Uncommenting the following gives a print preview (only):
- ; (concat "--output=/tmp/foo.ps")
- )
diff --git a/app-text/a2ps/files/a2ps-4.13c-fnmatch-replacement.patch b/app-text/a2ps/files/a2ps-4.13c-fnmatch-replacement.patch
deleted file mode 100644
index c49ab78c93c0..000000000000
--- a/app-text/a2ps/files/a2ps-4.13c-fnmatch-replacement.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -Naurp a2ps-4.13.orig/lib/fnmatch.c a2ps-4.13/lib/fnmatch.c
---- a2ps-4.13.orig/lib/fnmatch.c 2002-03-04 12:46:25 -0600
-+++ a2ps-4.13/lib/fnmatch.c 2006-05-27 11:41:15 -0500
-@@ -27,18 +27,6 @@
- #include <fnmatch.h>
- #include <ctype.h>
-
--
--/* Comment out all this code if we are using the GNU C Library, and are not
-- actually compiling the library itself. This code is part of the GNU C
-- Library, but also included in many other GNU distributions. Compiling
-- and linking in this code is a waste when using the GNU C library
-- (especially if it is a shared library). Rather than having every GNU
-- program understand `configure --with-gnu-libc' and omit the object files,
-- it is simpler to just do this in the source for each such file. */
--
--#if defined _LIBC || !defined __GNU_LIBRARY__
--
--
- # if defined STDC_HEADERS || !defined isascii
- # define ISASCII(c) 1
- # else
-@@ -52,10 +40,13 @@
- extern int errno;
- # endif
-
-+/* fnmatch replacement taken from the GNU C Library for systems that
-+ provide a broken implementation. */
-+
- /* Match STRING against the filename pattern PATTERN, returning zero if
- it matches, nonzero if not. */
- int
--fnmatch (const char *pattern, const char *string, int flags)
-+rpl_fnmatch (const char *pattern, const char *string, int flags)
- {
- register const char *p = pattern, *n = string;
- register char c;
-@@ -233,5 +224,3 @@ fnmatch (const char *pattern, const char
-
- # undef FOLD
- }
--
--#endif /* _LIBC or not __GNU_LIBRARY__. */
diff --git a/app-text/a2ps/files/a2ps-4.13c-locale-gentoo.diff b/app-text/a2ps/files/a2ps-4.13c-locale-gentoo.diff
deleted file mode 100644
index 0b59956ebc05..000000000000
--- a/app-text/a2ps/files/a2ps-4.13c-locale-gentoo.diff
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -urN a2ps-4.13.ORIG/config.h.in a2ps-4.13/config.h.in
---- a2ps-4.13.ORIG/config.h.in 2003-09-27 19:33:38.000000000 +0900
-+++ a2ps-4.13/config.h.in 2003-09-27 21:25:46.000000000 +0900
-@@ -181,6 +181,9 @@
- /* Define to 1 if you have the `rename' function. */
- #undef HAVE_RENAME
-
-+/* Define to 1 if you have the <locale.h> header file. */
-+#undef HAVE_LOCALE_H
-+
- /* Define to 1 if you have the `setlocale' function. */
- #undef HAVE_SETLOCALE
-
-diff -urN a2ps-4.13.ORIG/configure.in a2ps-4.13/configure.in
---- a2ps-4.13.ORIG/configure.in 2003-09-27 19:33:38.000000000 +0900
-+++ a2ps-4.13/configure.in 2003-09-27 21:26:05.000000000 +0900
-@@ -71,7 +71,7 @@
- AC_HEADER_DIRENT
- AC_CHECK_HEADERS(sys/time.h sys/stat.h sys/types.h sys/ioctl.h \
- math.h string.h strings.h stdlib.h unistd.h stdarg.h pwd.h malloc.h \
-- memory.h errno.h fcntl.h stdbool.h fnmatch.h)
-+ memory.h errno.h fcntl.h stdbool.h fnmatch.h locale.h)
-
- ## --------------------- ##
- ## Checks for typedefs. ##
diff --git a/app-text/a2ps/files/a2ps-4.14-CVE-2001-1593.patch b/app-text/a2ps/files/a2ps-4.14-CVE-2001-1593.patch
deleted file mode 100644
index 06153f4858c4..000000000000
--- a/app-text/a2ps/files/a2ps-4.14-CVE-2001-1593.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-CVE-2001-1593: Fix insecure use of /tmp
-
-
-Author(s):
-
- * Fri Jan 05 2001 Preston Brown <pbrown@redhat.com>
-
-followed the next month by a fix to that patch:
-
- * Mon Feb 12 2001 Tim Waugh <twaugh@redhat.com>
-
-(see https://bugzilla.redhat.com/show_bug.cgi?id=1060630#c5)
-
-Origin:
-
-http://pkgs.fedoraproject.org/cgit/a2ps.git/plain/a2ps-4.13-security.patch
-
---- a/lib/routines.c
-+++ b/lib/routines.c
-@@ -242,3 +242,50 @@
- /* Don't complain if you can't unlink. Who cares of a tmp file? */
- unlink (filename);
- }
-+
-+/*
-+ * Securely generate a temp file, and make sure it gets
-+ * deleted upon exit.
-+ */
-+static char ** tempfiles;
-+static unsigned ntempfiles;
-+
-+static void
-+cleanup_tempfiles()
-+{
-+ while (ntempfiles--)
-+ unlink(tempfiles[ntempfiles]);
-+}
-+
-+char *
-+safe_tempnam(const char *pfx)
-+{
-+ char *dirname, *filename;
-+ int fd;
-+
-+ if (!(dirname = getenv("TMPDIR")))
-+ dirname = "/tmp";
-+
-+ tempfiles = (char **) realloc(tempfiles,
-+ (ntempfiles+1) * sizeof(char *));
-+ if (tempfiles == NULL)
-+ return NULL;
-+
-+ filename = malloc(strlen(dirname) + strlen(pfx) + sizeof("/XXXXXX"));
-+ if (!filename)
-+ return NULL;
-+
-+ sprintf(filename, "%s/%sXXXXXX", dirname, pfx);
-+
-+ if ((fd = mkstemp(filename)) < 0) {
-+ free(filename);
-+ return NULL;
-+ }
-+ close(fd);
-+
-+ if (ntempfiles == 0)
-+ atexit(cleanup_tempfiles);
-+ tempfiles[ntempfiles++] = filename;
-+
-+ return filename;
-+}
---- a/lib/routines.h
-+++ b/lib/routines.h
-@@ -255,7 +255,8 @@
- /* If _STR_ is not defined, give it a tempname in _TMPDIR_ */
- #define tempname_ensure(Str) \
- do { \
-- (Str) = (Str) ? (Str) : tempnam (NULL, "a2_"); \
-+ (Str) = (Str) ? (Str) : safe_tempnam("a2_"); \
- } while (0)
-+char * safe_tempnam(const char *);
-
- #endif
diff --git a/app-text/a2ps/files/a2ps-4.14-CVE-2014-0466.patch b/app-text/a2ps/files/a2ps-4.14-CVE-2014-0466.patch
deleted file mode 100644
index 56f0b2f527a2..000000000000
--- a/app-text/a2ps/files/a2ps-4.14-CVE-2014-0466.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-CVE-2014-0466: fixps does not invoke gs with -dSAFER
-
-A malicious PostScript file could delete files with the privileges of
-the invoking user.
-
-Author: Salvatore Bonaccorso <carnil@debian.org>
-Origin: https://bugs.debian.org/742902
-
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' a2ps~/contrib/fixps.in a2ps/contrib/fixps.in
---- a2ps~/contrib/fixps.in 2014-03-30 12:24:50.000000000 +0200
-+++ a2ps/contrib/fixps.in 2014-03-30 12:40:36.763249218 +0200
-@@ -389,7 +389,7 @@
- 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 -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' a2ps~/contrib/fixps.m4 a2ps/contrib/fixps.m4
---- a2ps~/contrib/fixps.m4 2014-03-30 12:24:50.000000000 +0200
-+++ a2ps/contrib/fixps.m4 2014-03-30 12:40:36.767249254 +0200
-@@ -307,7 +307,7 @@
- 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/app-text/a2ps/files/a2ps-4.14-check-mempcpy.patch b/app-text/a2ps/files/a2ps-4.14-check-mempcpy.patch
deleted file mode 100644
index 7b820cead05f..000000000000
--- a/app-text/a2ps/files/a2ps-4.14-check-mempcpy.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a2ps-4.14-orig/configure.in 2008-04-16 08:36:03.000000000 +0200
-+++ a2ps-4.14/configure.in 2008-04-16 08:36:29.000000000 +0200
-@@ -137,7 +137,8 @@
- ad_REPLACE_FUNC_STRCASECMP
- ad_REPLACE_FUNC_STRNCASECMP
- ad_REPLACE_FUNC_RENAME
--AC_CHECK_FUNCS(uname strchr strerror strerror_r getcwd bcopy bzero tempnam strsignal psignal setlocale)
-+AC_CHECK_FUNCS(uname strchr strerror strerror_r getcwd bcopy bzero \
-+ tempnam strsignal psignal setlocale mempcpy)
- ad_FUNC_SYSTEMPAPERNAME
- ad_FUNC_ATEXIT
- ad_FUNC_STRFTIME
diff --git a/app-text/a2ps/files/a2ps-4.14-cleanup.patch b/app-text/a2ps/files/a2ps-4.14-cleanup.patch
deleted file mode 100644
index 25187f315384..000000000000
--- a/app-text/a2ps/files/a2ps-4.14-cleanup.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-fix missing prototype and printf warnings
-
---- a/lib/argmatch.c
-+++ b/lib/argmatch.c
-@@ -21,6 +21,7 @@
- #include "argmatch.h"
-
- #include <stdio.h>
-+#include <stdlib.h>
- #ifdef STDC_HEADERS
- # include <string.h>
- #endif
---- a/lib/encoding.c
-+++ b/lib/encoding.c
-@@ -790,7 +790,7 @@ dump_encoding_setup (FILE * stream,
- /* Create the dictionary and fill it */
- fprintf (stream, "%% Dictionary for %s support\n",
- encoding->name);
-- fprintf (stream, "/%sdict %d dict begin\n", encoding->key, nb);
-+ fprintf (stream, "/%sdict %zu dict begin\n", encoding->key, nb);
- for (i = 0 ; i < nb ; i++)
- fprintf (stream, " /f%s %sEncoding /%s reencode_font\n",
- font_names [i],
---- a/lib/output.c
-+++ b/lib/output.c
-@@ -84,7 +84,7 @@ new_derivation (enum derivation_type type)
- static void
- derivation_self_print (struct derivation * derivation, FILE * stream)
- {
-- fprintf (stream, "At %x: ", (int) derivation);
-+ fprintf (stream, "At %p: ", derivation);
- switch (derivation->type)
- {
- case nothing:
-@@ -525,7 +525,7 @@ output_file (struct output * out, a2ps_job * job,
- expand_user_string (job, FIRST_FILE (job),
- (const uchar *) "Expand: requirement",
- (const uchar *) token));
-- output (dest, expansion);
-+ output (dest, "%s", expansion);
- continue;
- }
-
---- a/lib/parseppd.y
-+++ b/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);
- }
-
- /*
---- a/lib/psgen.c
-+++ b/lib/psgen.c
-@@ -232,7 +232,7 @@ output_marker (a2ps_job * job, const char * kind, uchar * marker)
- default:
- *buf = '\0';
- ps_escape_char (job, cp[i], buf);
-- output (jdiv, (char *) buf);
-+ output (jdiv, "%s", buf);
- break;
- }
- }
---- a/lib/quotearg.c
-+++ b/lib/quotearg.c
-@@ -60,6 +60,7 @@
-
- #if HAVE_MBRTOWC && HAVE_WCHAR_H
- # include <wchar.h>
-+# include <wctype.h>
- #else
- # define iswprint(wc) 1
- # define mbrtowc(pwc, s, n, ps) 1
---- a/lib/title.c
-+++ b/lib/title.c
-@@ -28,6 +28,7 @@
- #endif
-
- #include <stdio.h>
-+#include <string.h>
-
- #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
- # if __STDC__
---- a/src/long-options.c
-+++ b/src/long-options.c
-@@ -22,6 +22,7 @@
- #endif
-
- #include <stdio.h>
-+#include <stdlib.h>
- #include <getopt.h>
- #include "closeout.h"
- #include "long-options.h"
---- a/src/parsessh.y
-+++ b/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/app-text/a2ps/files/a2ps-4.14-fix-stpcpy-proto.patch b/app-text/a2ps/files/a2ps-4.14-fix-stpcpy-proto.patch
deleted file mode 100644
index 7c3c69076ae9..000000000000
--- a/app-text/a2ps/files/a2ps-4.14-fix-stpcpy-proto.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-=== modified file 'lib/xstrrpl.c'
---- lib/xstrrpl.c 2008-04-14 18:04:50 +0000
-+++ lib/xstrrpl.c 2008-04-14 18:20:20 +0000
-@@ -20,12 +20,10 @@
-
- #include "system.h"
- #include <assert.h>
- #include "xstrrpl.h"
-
--extern char * stpcpy();
--
- /* Perform subsitutions in string. Result is malloc'd
- E.g., result = xstrrrpl ("1234", subst) gives result = "112333"
- where subst = { {"1", "11"}, {"3", "333"}, { "4", ""}}
- */
- char *
-
diff --git a/app-text/a2ps/files/a2ps-4.14-ja-cleanup.patch b/app-text/a2ps/files/a2ps-4.14-ja-cleanup.patch
deleted file mode 100644
index 16271b3ec674..000000000000
--- a/app-text/a2ps/files/a2ps-4.14-ja-cleanup.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-diff --git lib/argmatch.c lib/argmatch.c
-index f983e9d..eadc7ea 100644
---- lib/argmatch.c
-+++ lib/argmatch.c
-@@ -21,6 +21,7 @@
- #include "argmatch.h"
-
- #include <stdio.h>
-+#include <stdlib.h>
- #ifdef STDC_HEADERS
- # include <string.h>
- #endif
-diff --git lib/encoding.c lib/encoding.c
-index 9bd9f2a..f554a6d 100644
---- lib/encoding.c
-+++ lib/encoding.c
-@@ -989,7 +989,7 @@ dump_encoding_setup (FILE * stream,
- /* Create the dictionary and fill it */
- fprintf (stream, "%% Dictionary for %s support\n",
- encoding->name);
-- fprintf (stream, "/%sdict %d dict begin\n", encoding->key,
-+ fprintf (stream, "/%sdict %zu dict begin\n", encoding->key,
- (encoding->composite_flag == true)? nb+nb+ns:nb+ns);
- for (i = 0 ; i < nb ; i++)
- fprintf (stream, " /f%s %sEncoding /%s reencode_font\n",
-diff --git lib/output.c lib/output.c
-index b5fc37d..5f67676 100644
---- lib/output.c
-+++ lib/output.c
-@@ -84,7 +84,7 @@ new_derivation (enum derivation_type type)
- static void
- derivation_self_print (struct derivation * derivation, FILE * stream)
- {
-- fprintf (stream, "At %x: ", (int) derivation);
-+ fprintf (stream, "At %p: ", derivation);
- switch (derivation->type)
- {
- case nothing:
-@@ -525,7 +525,7 @@ output_file (struct output * out, a2ps_job * job,
- expand_user_string (job, FIRST_FILE (job),
- (const uchar *) "Expand: requirement",
- (const uchar *) token));
-- output (dest, expansion);
-+ output (dest, "%s", expansion);
- continue;
- }
-
-diff --git lib/parseppd.y lib/parseppd.y
-index a7558ba..c89d188 100644
---- lib/parseppd.y
-+++ 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 lib/psgen.c lib/psgen.c
-index 9eeef74..9d7a27d 100644
---- lib/psgen.c
-+++ lib/psgen.c
-@@ -232,7 +232,7 @@ output_marker (a2ps_job * job, const char * kind, uchar * marker)
- default:
- *buf = '\0';
- ps_escape_char (job, cp[i], buf);
-- output (jdiv, (char *) buf);
-+ output (jdiv, "%s", buf);
- break;
- }
- }
-diff --git lib/quotearg.c lib/quotearg.c
-index 16d0b91..89db991 100644
---- lib/quotearg.c
-+++ lib/quotearg.c
-@@ -60,6 +60,7 @@
-
- #if HAVE_MBRTOWC && HAVE_WCHAR_H
- # include <wchar.h>
-+# include <wctype.h>
- #else
- # define iswprint(wc) 1
- # define mbrtowc(pwc, s, n, ps) 1
-diff --git lib/title.c lib/title.c
-index cf4a34b..7a3e87b 100644
---- lib/title.c
-+++ lib/title.c
-@@ -28,6 +28,7 @@
- #endif
-
- #include <stdio.h>
-+#include <string.h>
-
- #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
- # if __STDC__
-diff --git src/long-options.c src/long-options.c
-index fb40cd9..7bd77b0 100644
---- src/long-options.c
-+++ src/long-options.c
-@@ -22,6 +22,7 @@
- #endif
-
- #include <stdio.h>
-+#include <stdlib.h>
- #include <getopt.h>
- #include "closeout.h"
- #include "long-options.h"
-diff --git src/parsessh.y src/parsessh.y
-index 21e9559..569fdb6 100644
---- src/parsessh.y
-+++ 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/app-text/a2ps/files/a2ps-4.14-psset.patch b/app-text/a2ps/files/a2ps-4.14-psset.patch
deleted file mode 100644
index 291c3aac4fa4..000000000000
--- a/app-text/a2ps/files/a2ps-4.14-psset.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -Naur a2ps-4.14.orig/contrib/psset.in a2ps-4.14/contrib/psset.in
---- a2ps-4.14.orig/contrib/psset.in 2007-12-29 12:29:01.000000000 +0900
-+++ a2ps-4.14/contrib/psset.in 2009-04-12 12:17:43.000000000 +0900
-@@ -219,7 +219,7 @@
- done
-
- pspagedevice="% Pagedevice definitions:
--countdictstack
-+ countdictstack
- % Push our own mark, since there can be several PS marks pushed depending
- % where the failure really occured.
- /psset_mark
-@@ -227,7 +227,7 @@
- } stopped
- % My cleartomark
- { /psset_mark eq { exit } if } loop
--countdictstack exch sub dup 0 gt
-+ countdictstack exch sub dup 0 gt
- {
- { end } repeat
- }{
diff --git a/app-text/a2ps/files/a2ps-4.14-ptrdiff_t.patch b/app-text/a2ps/files/a2ps-4.14-ptrdiff_t.patch
deleted file mode 100644
index 00d955a819a9..000000000000
--- a/app-text/a2ps/files/a2ps-4.14-ptrdiff_t.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -uNr a2ps-4.14/lib/obstack.h a2ps-4.14.test/lib/obstack.h
---- a2ps-4.14/lib/obstack.h 2007-12-29 09:37:59.000000000 +0800
-+++ a2ps-4.14.test/lib/obstack.h 2009-06-10 18:49:45.000000000 +0900
-@@ -138,9 +138,9 @@
- #define __need_ptrdiff_t
- #endif
- #endif
-+#endif
-
- #include <stddef.h>
--#endif
-
- #if defined (__STDC__) && __STDC__
- #define PTR_INT_TYPE ptrdiff_t
diff --git a/app-text/a2ps/files/a2ps-4.14-texinfo-5.x.patch b/app-text/a2ps/files/a2ps-4.14-texinfo-5.x.patch
deleted file mode 100644
index 44cd4bfd099d..000000000000
--- a/app-text/a2ps/files/a2ps-4.14-texinfo-5.x.patch
+++ /dev/null
@@ -1,147 +0,0 @@
---- a2ps-4.14/doc/a2ps.texi.bero 2013-03-26 10:31:31.230137555 +0100
-+++ a2ps-4.14/doc/a2ps.texi 2013-03-26 11:01:01.504006086 +0100
-@@ -44,10 +44,6 @@
- @end ifnottex
-
- @c TeX variants
--@macro LaTeX
--La@TeX{}
--@end macro
--
- @macro PreTeX
- Pre@TeX{}
- @end macro
-@@ -417,9 +413,9 @@ Genesis
- @c Now, that's what I call humor :)
- @cindex First Page
- This document describes GNU @pack{} version @value{VERSION}. The latest
--versions may be found on the @href{@value{WWWHOME},@pack{} home page}.
--We plan to update the @href{http://www.gnu.org/software/a2ps/, GNU
--@pack{} home page} in the near future, in which case the latter will be
-+versions may be found on the @uref{@value{WWWHOME}, home page}.
-+We plan to update the @uref{@value{WWWHOME}, GNU home page}
-+in the near future, in which case the latter will be
- a better source of information.
-
- We tried to make this document informative and pleasant. It tries to be
-@@ -431,8 +427,8 @@ difficult to use. @xref{Glossary}, for
- information.
-
- Please, send us emailcards @code{:)}. Whatever the comment is, or if you
--just like @pack{}, write to @email{Miguel.Santana@@st.com, Miguel
--Santana} and @email{akim@@freefriends.org, Akim Demaille}. But
-+just like @pack{}, write to @email{Miguel.Santana@@st.com, Miguel Santana}
-+and @email{akim@@freefriends.org, Akim Demaille}. But
- @emph{never} write to either of us for asking questions, or to report
- bugs. Chances are very high never to receive an answer, as we receive
- too many messages. @xref{a2ps Mailing Lists}, for information on the
-@@ -517,8 +513,8 @@ everybody so that mistakes get fixed as
-
- So, if you have a problem (configuration error, compilation error,
- runtime error, documentation error or unclear), first check in the FAQ
--(@pxref{FAQ}), then on the page @href{@value{WWWHOME}/bugs.html,Known
--@pack{} Bugs} if the issue has not been addressed yet. If it is not the
-+(@pxref{FAQ}), then on the page @uref{@value{WWWHOME}/bugs.html,Known Bugs}
-+if the issue has not been addressed yet. If it is not the
- case, but it appears that the version of @pack{} you have is old,
- consider upgrading.
-
-@@ -2802,8 +2798,7 @@ Thou shalt start your PostScript DSC con
-
- The bad news is that some printers will reject this header. Then you
- may change this header without any worry since the PostScript produced
--by @pack{} is also 100% PostScript level 1@footnote{That is to say, there
--are no PostScript printers that don't understand these files.}.
-+by @pack{} is also 100% PostScript level 1@footnote{That is to say, there are no PostScript printers that don't understand these files.}.
-
- @defvr {Configuration Setting} OutputFirstLine: @var{magic-number}
- @cindex @samp{OutputFirstLine:}
-@@ -3971,13 +3966,13 @@ Quote @var{text} so that no special sequ
- @itemx \end@{enumerate@}
- @itemx \begin@{description@}
- @itemx \end@{description@}
--These commands are legal in @LaTeX but have no sense in @PreTeX{}.
-+These commands are legal in @LaTeX{} but have no sense in @PreTeX{}.
- Hence there are simply ignored and not printed (if immediately followed
- by an end-of-line).
- @end table
-
- @node Differences with LaTeX
--@subsubsection Differences with @LaTeX
-+@subsubsection Differences with @LaTeX{}
- The following symbols, inherited from the style sheet @code{Symbol}, are
- not supported by @LaTeX{}:
-
-@@ -4124,9 +4119,9 @@ beautiful, with any character you might
- prefix part of the file name, and is alpha-numerical, lower case, and
- less than 8 characters long.
-
--Anywhere @pack{} needs to recognize a style sheet by a name, @strong{it
--uses the key} (in the @file{sheets.map} file, with the option @samp{-E},
--etc.).
-+Anywhere @pack{} needs to recognize a style sheet by a name,
-+@strong{it uses the key} (in the @file{sheets.map} file, with the
-+option @samp{-E}, etc.).
-
- As an example, C++ is implemented in a file called @file{cxx.ssh}, in
- which the name is declared to be @samp{C++}.
-@@ -5672,7 +5667,7 @@ supporting a @samp{--help}-like option.
- @subsection Invoking @code{card}
-
- @example
--card [@var{options}] @var{applications} [-- @var{@pack{}-options}]
-+card [@var{options}] @var{applications} [-- @var{-options}]
- @end example
-
- @noindent
-@@ -5680,7 +5675,7 @@ card [@var{options}] @var{applications}
- @var{applications}' help message (typically by the options @samp{--help}
- or @samp{-h}), and pretty prints it thanks to @pack{} (or the content of
- the environment variable @samp{A2PS} if it is set).
--@var{@pack{}-options} are passed to @pack{}.
-+@var{-options} are passed to @pack{}.
-
- Supported options are:
-
-@@ -5874,12 +5869,12 @@ difference finder,wdiff,GNU wdiff}) to e
- @subsection Invoking @code{pdiff}
-
- @example
--pdiff [@var{options}] @var{file-1} @var{file-2} [-- @var{@pack{}-options}]
-+pdiff [@var{options}] @var{file-1} @var{file-2} [-- @var{-options}]
- @end example
-
- @noindent
- make a pretty comparison between @var{file-1} and @var{file-2}.
--@var{@pack{}-options} are passed to @pack{}.
-+@var{-options} are passed to @pack{}.
-
- Supported options are:
-
-@@ -6222,7 +6217,7 @@ Error related questions.
- @subsection Why Does it Print Nothing?
-
- @quotation
--@i{@pack{} works OK, but the printer prints nothing.}
-+@i{works OK, but the printer prints nothing.}
- @end quotation
-
- There are two ways that printing can fail: silently, or with a
-@@ -6351,7 +6346,7 @@ If it is incorrect, ask for help around
- @subsection Why Does it Say my File is Binary?
-
- @quotation
--@i{@pack{} complains that my file is binary though it is not.}
-+@i{complains that my file is binary though it is not.}
- @end quotation
-
- There are several reasons that can cause @pack{} to consider a file is
-@@ -6591,7 +6586,7 @@ format you want for the date: @xref{Esca
- @subsection Why Have the Options Changed?
-
- @quotation
--@i{The options of this @pack{} are not the same as in the previous versions.}
-+@i{The options of this are not the same as in the previous versions.}
- @end quotation
-
- True. But the old scheme (up to version 4.6.1) prevented us from
diff --git a/app-text/a2ps/files/a2ps-4.15-lpr-wrapper.patch b/app-text/a2ps/files/a2ps-4.15-lpr-wrapper.patch
new file mode 100644
index 000000000000..d7b231c0b929
--- /dev/null
+++ b/app-text/a2ps/files/a2ps-4.15-lpr-wrapper.patch
@@ -0,0 +1,23 @@
+# a2ps-lpr-wrapper exits on bogus parameter-count test
+# https://bugs.gentoo.org/913751
+# https://savannah.gnu.org/bugs/?64047
+--- a/src/a2ps-lpr-wrapper
++++ b/src/a2ps-lpr-wrapper
+@@ -5,7 +5,7 @@
+ set -e
+
+ usage() {
+- echo "Usage: $(basename "$0") [-d printer] FILE..." >&2
++ echo "Usage: $(basename "$0") [-d printer] [FILE...]" >&2
+ exit 1
+ }
+
+@@ -17,7 +17,6 @@ while getopts d: flag; do
+ esac
+ done
+ shift $((OPTIND - 1))
+-if [ $# -eq 0 ]; then usage; fi
+
+ # If lp (from CUPS) exists, just use it.
+ if command -pv lp > /dev/null; then
+
diff --git a/app-text/a2ps/files/a2ps-4.15-stdout.patch b/app-text/a2ps/files/a2ps-4.15-stdout.patch
new file mode 100644
index 000000000000..00002ffb9524
--- /dev/null
+++ b/app-text/a2ps/files/a2ps-4.15-stdout.patch
@@ -0,0 +1,16 @@
+https://bugs.gentoo.org/47691
+https://bugs.gentoo.org/47764
+https://lists.gnu.org/archive/html/bug-a2ps/2001-05/msg00000.html
+--- a/liba2ps/printers.c
++++ b/liba2ps/printers.c
+@@ -287,8 +287,8 @@ a2ps_printers_new (struct a2ps_common_s * common)
+ res->ppd = NULL; /* Printer's ppd are not read yet */
+
+ /* Output */
+- /* Default is to send to default printer */
+- res->flag_output_is_printer = true;
++ /* Default is to send to stdout */
++ res->flag_output_is_printer = false;
+ res->flag_output_name = NULL;
+ res->output_is_file = true;
+ res->output_name = NULL;