1 |
commit: de87f701b40e0d3c9567e5b4e05c85d0e82be0ad |
2 |
Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 3 07:33:25 2016 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 3 07:33:25 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/dev/bircoph.git/commit/?id=de87f701 |
7 |
|
8 |
app-text/a2ps: fix bug 482748 |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org> |
12 |
|
13 |
app-text/a2ps/Manifest | 2 + |
14 |
app-text/a2ps/a2ps-4.14-r4.ebuild | 137 +++++++++++++++++++ |
15 |
app-text/a2ps/files/50a2ps-gentoo.el | 5 + |
16 |
app-text/a2ps/files/a2ps-4.13-manpage-chmod.patch | 12 ++ |
17 |
app-text/a2ps/files/a2ps-4.13-stdout.diff | 13 ++ |
18 |
app-text/a2ps/files/a2ps-4.13c-emacs.patch | 10 ++ |
19 |
.../files/a2ps-4.13c-fnmatch-replacement.patch | 43 ++++++ |
20 |
app-text/a2ps/files/a2ps-4.13c-locale-gentoo.diff | 25 ++++ |
21 |
app-text/a2ps/files/a2ps-4.14-check-mempcpy.patch | 12 ++ |
22 |
app-text/a2ps/files/a2ps-4.14-cleanup.patch | 106 +++++++++++++++ |
23 |
.../a2ps/files/a2ps-4.14-fix-stpcpy-proto.patch | 17 +++ |
24 |
app-text/a2ps/files/a2ps-4.14-ja-cleanup.patch | 122 +++++++++++++++++ |
25 |
app-text/a2ps/files/a2ps-4.14-psset.patch | 21 +++ |
26 |
app-text/a2ps/files/a2ps-4.14-ptrdiff_t.patch | 14 ++ |
27 |
app-text/a2ps/files/a2ps-4.14-texinfo-5.x.patch | 147 +++++++++++++++++++++ |
28 |
app-text/a2ps/metadata.xml | 12 ++ |
29 |
16 files changed, 698 insertions(+) |
30 |
|
31 |
diff --git a/app-text/a2ps/Manifest b/app-text/a2ps/Manifest |
32 |
new file mode 100644 |
33 |
index 0000000..89dfac0 |
34 |
--- /dev/null |
35 |
+++ b/app-text/a2ps/Manifest |
36 |
@@ -0,0 +1,2 @@ |
37 |
+DIST a2ps-4.14-ja_nls.patch.gz 27576 SHA256 90b2a4caf680f04ac8c325a4bc7434edf038ef7059003179b7fa65a5bafdecdc SHA512 f02f553dd9d9dbd9dfe41ebfe103493000aa4e9de5634c94e7453f73b66d88fea6b0010095913a4a99c7285990a1df1ebcc39da451b2b34f96b0c191112b125f WHIRLPOOL 38a532bc7f696cf3a1addc502b6ad2d26ed4222b770b0e9fc4633fc81cad911df7e64781516a84cdc589965d12d51142c0a06980be7211b0a6d9bf279a11d55e |
38 |
+DIST a2ps-4.14.tar.gz 2552507 SHA256 f3ae8d3d4564a41b6e2a21f237d2f2b104f48108591e8b83497500182a3ab3a4 SHA512 fd6ac8ab47d789114c283e8ca508f7f56feabd1a189f4ac772cad9e6be7e3791e210892cfffd04ad1d39efe4b15386b2e61bf4cd56b70ed581c0554f36bfe06f WHIRLPOOL f0e445b760e0fdee031c9b8204430880f8e46d0eee2b580bec0dca35564818b7a8925b5941346c008a5ef32dedc28768b43f0e58f3a0e71f289bf593e5325e8d |
39 |
|
40 |
diff --git a/app-text/a2ps/a2ps-4.14-r4.ebuild b/app-text/a2ps/a2ps-4.14-r4.ebuild |
41 |
new file mode 100644 |
42 |
index 0000000..9be05f9 |
43 |
--- /dev/null |
44 |
+++ b/app-text/a2ps/a2ps-4.14-r4.ebuild |
45 |
@@ -0,0 +1,137 @@ |
46 |
+# Copyright 1999-2016 Gentoo Foundation |
47 |
+# Distributed under the terms of the GNU General Public License v2 |
48 |
+# $Id$ |
49 |
+ |
50 |
+EAPI=6 |
51 |
+inherit autotools elisp-common flag-o-matic |
52 |
+ |
53 |
+DESCRIPTION="Any to PostScript filter" |
54 |
+HOMEPAGE="http://www.inf.enst.fr/~demaille/a2ps/" |
55 |
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz |
56 |
+ linguas_ja? ( mirror://gentoo/${P}-ja_nls.patch.gz )" |
57 |
+ |
58 |
+LICENSE="GPL-3" |
59 |
+SLOT="0" |
60 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
61 |
+IUSE="emacs latex linguas_ja nls static-libs userland_BSD userland_GNU vanilla" |
62 |
+ |
63 |
+RESTRICT=test |
64 |
+ |
65 |
+RDEPEND="app-text/ghostscript-gpl |
66 |
+ app-text/libpaper |
67 |
+ >=app-text/psutils-1.17 |
68 |
+ app-text/wdiff |
69 |
+ emacs? ( virtual/emacs ) |
70 |
+ latex? ( virtual/latex-base ) |
71 |
+ nls? ( virtual/libintl ) |
72 |
+ userland_GNU? ( >=sys-apps/coreutils-6.10-r1 ) |
73 |
+ userland_BSD? ( sys-freebsd/freebsd-ubin )" |
74 |
+DEPEND="${RDEPEND} |
75 |
+ >=dev-util/gperf-2.7.2 |
76 |
+ virtual/yacc |
77 |
+ nls? ( sys-devel/gettext )" |
78 |
+ |
79 |
+SITEFILE=50${PN}-gentoo.el |
80 |
+ |
81 |
+S=${WORKDIR}/${PN}-${PV:0:4} |
82 |
+ |
83 |
+src_prepare() { |
84 |
+ default |
85 |
+ |
86 |
+ eapply "${FILESDIR}"/${PN}-4.13c-locale-gentoo.diff |
87 |
+ use vanilla || eapply -p0 "${FILESDIR}"/${PN}-4.13-stdout.diff |
88 |
+ if use linguas_ja; then |
89 |
+ eapply "${WORKDIR}"/${P}-ja_nls.patch |
90 |
+ # bug #335803 |
91 |
+ eapply -p0 "${FILESDIR}"/${P}-ja-cleanup.patch |
92 |
+ else |
93 |
+ eapply "${FILESDIR}"/${P}-cleanup.patch |
94 |
+ fi |
95 |
+ |
96 |
+ # fix fnmatch replacement, bug #134546 |
97 |
+ eapply "${FILESDIR}"/${PN}-4.13c-fnmatch-replacement.patch |
98 |
+ |
99 |
+ # bug #122026 |
100 |
+ eapply "${FILESDIR}"/${P}-psset.patch |
101 |
+ |
102 |
+ # fix emacs printing, bug #114627 |
103 |
+ eapply "${FILESDIR}"/a2ps-4.13c-emacs.patch |
104 |
+ |
105 |
+ # fix chmod error, #167670 |
106 |
+ eapply "${FILESDIR}"/a2ps-4.13-manpage-chmod.patch |
107 |
+ |
108 |
+ # add configure check for mempcpy, bug 216588 |
109 |
+ eapply "${FILESDIR}"/${P}-check-mempcpy.patch |
110 |
+ |
111 |
+ # fix compilation error due to invalid stpcpy() prototype, bug 216588 |
112 |
+ eapply -p0 "${FILESDIR}"/${P}-fix-stpcpy-proto.patch |
113 |
+ |
114 |
+ # fix compilation error due to obstack.h issue, bug 269638 |
115 |
+ eapply "${FILESDIR}"/${P}-ptrdiff_t.patch |
116 |
+ |
117 |
+ # fix compilation error due to texinfo 5.x, bug 482748 |
118 |
+ eapply "${FILESDIR}"/${P}-texinfo-5.x.patch |
119 |
+ |
120 |
+ # fix building with sys-devel/automake >= 1.12, bug 420503 |
121 |
+ rm -f {.,ogonkify}/aclocal.m4 || die |
122 |
+ sed -i \ |
123 |
+ -e '/^AM_C_PROTOTYPES/d' \ |
124 |
+ -e '/^AUTOMAKE_OPTIONS.*ansi2knr/d' \ |
125 |
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \ |
126 |
+ -e 's:AM_PROG_CC_STDC:AC_PROG_CC:' \ |
127 |
+ configure.in {contrib/sample,lib,src}/Makefile.am m4/protos.m4 || die |
128 |
+ |
129 |
+ eautoreconf |
130 |
+} |
131 |
+ |
132 |
+src_configure() { |
133 |
+ append-cppflags -DPROTOTYPES #420503 |
134 |
+ |
135 |
+ local myconf="COM_netscape=no COM_acroread=no" |
136 |
+ |
137 |
+ use emacs || myconf="${myconf} EMACS=no" |
138 |
+ use latex || myconf="${myconf} COM_latex=no" |
139 |
+ |
140 |
+ export LANG=C LC_ALL=C |
141 |
+ |
142 |
+ econf \ |
143 |
+ --enable-shared \ |
144 |
+ $(use_enable static-libs static) \ |
145 |
+ --sysconfdir="${EPREFIX}"/etc/a2ps \ |
146 |
+ $(use_enable nls) \ |
147 |
+ ${myconf} |
148 |
+} |
149 |
+ |
150 |
+src_compile() { |
151 |
+ # parallel make b0rked |
152 |
+ emake -j1 |
153 |
+} |
154 |
+ |
155 |
+src_install() { |
156 |
+ emake \ |
157 |
+ DESTDIR="${D}" \ |
158 |
+ lispdir="${EPREFIX}${SITELISP}"/${PN} \ |
159 |
+ install |
160 |
+ |
161 |
+ newdoc "${ED}"/usr/share/a2ps/README README.a2ps |
162 |
+ newdoc "${ED}"/usr/share/a2ps/ppd/README README.a2ps.ppd |
163 |
+ newdoc "${ED}"/usr/share/ogonkify/README README.ogonkify |
164 |
+ |
165 |
+ rm -f "${ED}"/usr/share/{a2ps,a2ps/ppd,ogonkify}/README || die |
166 |
+ |
167 |
+ prune_libtool_files |
168 |
+ |
169 |
+ if use emacs; then |
170 |
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die |
171 |
+ fi |
172 |
+ |
173 |
+ dodoc ANNOUNCE AUTHORS ChangeLog FAQ NEWS README* THANKS TODO |
174 |
+} |
175 |
+ |
176 |
+pkg_postinst() { |
177 |
+ use emacs && elisp-site-regen |
178 |
+} |
179 |
+ |
180 |
+pkg_postrm() { |
181 |
+ use emacs && elisp-site-regen |
182 |
+} |
183 |
|
184 |
diff --git a/app-text/a2ps/files/50a2ps-gentoo.el b/app-text/a2ps/files/50a2ps-gentoo.el |
185 |
new file mode 100644 |
186 |
index 0000000..3e12daa |
187 |
--- /dev/null |
188 |
+++ b/app-text/a2ps/files/50a2ps-gentoo.el |
189 |
@@ -0,0 +1,5 @@ |
190 |
+(add-to-list 'load-path "@SITELISP@") |
191 |
+(autoload 'a2ps-mode "a2ps" nil t) |
192 |
+(autoload 'a2ps-buffer "a2ps-print" nil t) |
193 |
+(autoload 'a2ps-region "a2ps-print" nil t) |
194 |
+(add-to-list 'auto-mode-alist '("\\.a2ps\\'" . a2ps-mode)) |
195 |
|
196 |
diff --git a/app-text/a2ps/files/a2ps-4.13-manpage-chmod.patch b/app-text/a2ps/files/a2ps-4.13-manpage-chmod.patch |
197 |
new file mode 100644 |
198 |
index 0000000..e0c6112 |
199 |
--- /dev/null |
200 |
+++ b/app-text/a2ps/files/a2ps-4.13-manpage-chmod.patch |
201 |
@@ -0,0 +1,12 @@ |
202 |
+diff -ur a2ps-4.13.orig/man/Makefile.maint a2ps-4.13/man/Makefile.maint |
203 |
+--- a2ps-4.13.orig/man/Makefile.maint 2002-03-04 20:46:26.000000000 +0200 |
204 |
++++ a2ps-4.13/man/Makefile.maint 2007-02-19 21:50:29.000000000 +0200 |
205 |
+@@ -20,7 +20,7 @@ |
206 |
+ --include=$(basename $@).x \ |
207 |
+ --include=common.x \ |
208 |
+ $(executable) > $@-t || exit 1; \ |
209 |
+- chmod -w $@-t || exit 1; \ |
210 |
++ chmod a-w $@-t || exit 1; \ |
211 |
+ rm -f $@ || exit 1; \ |
212 |
+ mv $@-t $@ || exit 1; \ |
213 |
+ else \ |
214 |
|
215 |
diff --git a/app-text/a2ps/files/a2ps-4.13-stdout.diff b/app-text/a2ps/files/a2ps-4.13-stdout.diff |
216 |
new file mode 100644 |
217 |
index 0000000..1e40e61 |
218 |
--- /dev/null |
219 |
+++ b/app-text/a2ps/files/a2ps-4.13-stdout.diff |
220 |
@@ -0,0 +1,13 @@ |
221 |
+--- lib/printers.c.orig Tue Oct 12 00:01:59 1999 |
222 |
++++ lib/printers.c Wed May 2 11:23:25 2001 |
223 |
+@@ -315,8 +315,8 @@ |
224 |
+ res->ppd = NULL; /* Printer's ppd are not read yet */ |
225 |
+ |
226 |
+ /* Output */ |
227 |
+- /* Default is to send to default printer */ |
228 |
+- res->flag_output_is_printer = true; |
229 |
++ /* Default is to send to stdout */ |
230 |
++ res->flag_output_is_printer = false; |
231 |
+ res->flag_output_name = NULL; |
232 |
+ res->output_is_file = true; |
233 |
+ res->output_name = NULL; |
234 |
|
235 |
diff --git a/app-text/a2ps/files/a2ps-4.13c-emacs.patch b/app-text/a2ps/files/a2ps-4.13c-emacs.patch |
236 |
new file mode 100644 |
237 |
index 0000000..f1cd5d9 |
238 |
--- /dev/null |
239 |
+++ b/app-text/a2ps/files/a2ps-4.13c-emacs.patch |
240 |
@@ -0,0 +1,10 @@ |
241 |
+--- a2ps-4.13/contrib/emacs/a2ps-print.el.orig 2005-12-05 08:03:48.000000000 +0100 |
242 |
++++ a2ps-4.13/contrib/emacs/a2ps-print.el 2005-12-06 16:38:14.000000000 +0100 |
243 |
+@@ -93,6 +93,7 @@ |
244 |
+ (concat "--center-title=" name) |
245 |
+ (concat "--footer=" (concat name " Emacs buffer")) |
246 |
+ (concat "--pretty-print=" filetype) |
247 |
++ (concat "-d") |
248 |
+ ;Uncommenting the following gives a print preview (only): |
249 |
+ ; (concat "--output=/tmp/foo.ps") |
250 |
+ ) |
251 |
|
252 |
diff --git a/app-text/a2ps/files/a2ps-4.13c-fnmatch-replacement.patch b/app-text/a2ps/files/a2ps-4.13c-fnmatch-replacement.patch |
253 |
new file mode 100644 |
254 |
index 0000000..c49ab78 |
255 |
--- /dev/null |
256 |
+++ b/app-text/a2ps/files/a2ps-4.13c-fnmatch-replacement.patch |
257 |
@@ -0,0 +1,43 @@ |
258 |
+diff -Naurp a2ps-4.13.orig/lib/fnmatch.c a2ps-4.13/lib/fnmatch.c |
259 |
+--- a2ps-4.13.orig/lib/fnmatch.c 2002-03-04 12:46:25 -0600 |
260 |
++++ a2ps-4.13/lib/fnmatch.c 2006-05-27 11:41:15 -0500 |
261 |
+@@ -27,18 +27,6 @@ |
262 |
+ #include <fnmatch.h> |
263 |
+ #include <ctype.h> |
264 |
+ |
265 |
+- |
266 |
+-/* Comment out all this code if we are using the GNU C Library, and are not |
267 |
+- actually compiling the library itself. This code is part of the GNU C |
268 |
+- Library, but also included in many other GNU distributions. Compiling |
269 |
+- and linking in this code is a waste when using the GNU C library |
270 |
+- (especially if it is a shared library). Rather than having every GNU |
271 |
+- program understand `configure --with-gnu-libc' and omit the object files, |
272 |
+- it is simpler to just do this in the source for each such file. */ |
273 |
+- |
274 |
+-#if defined _LIBC || !defined __GNU_LIBRARY__ |
275 |
+- |
276 |
+- |
277 |
+ # if defined STDC_HEADERS || !defined isascii |
278 |
+ # define ISASCII(c) 1 |
279 |
+ # else |
280 |
+@@ -52,10 +40,13 @@ |
281 |
+ extern int errno; |
282 |
+ # endif |
283 |
+ |
284 |
++/* fnmatch replacement taken from the GNU C Library for systems that |
285 |
++ provide a broken implementation. */ |
286 |
++ |
287 |
+ /* Match STRING against the filename pattern PATTERN, returning zero if |
288 |
+ it matches, nonzero if not. */ |
289 |
+ int |
290 |
+-fnmatch (const char *pattern, const char *string, int flags) |
291 |
++rpl_fnmatch (const char *pattern, const char *string, int flags) |
292 |
+ { |
293 |
+ register const char *p = pattern, *n = string; |
294 |
+ register char c; |
295 |
+@@ -233,5 +224,3 @@ fnmatch (const char *pattern, const char |
296 |
+ |
297 |
+ # undef FOLD |
298 |
+ } |
299 |
+- |
300 |
+-#endif /* _LIBC or not __GNU_LIBRARY__. */ |
301 |
|
302 |
diff --git a/app-text/a2ps/files/a2ps-4.13c-locale-gentoo.diff b/app-text/a2ps/files/a2ps-4.13c-locale-gentoo.diff |
303 |
new file mode 100644 |
304 |
index 0000000..0b59956 |
305 |
--- /dev/null |
306 |
+++ b/app-text/a2ps/files/a2ps-4.13c-locale-gentoo.diff |
307 |
@@ -0,0 +1,25 @@ |
308 |
+diff -urN a2ps-4.13.ORIG/config.h.in a2ps-4.13/config.h.in |
309 |
+--- a2ps-4.13.ORIG/config.h.in 2003-09-27 19:33:38.000000000 +0900 |
310 |
++++ a2ps-4.13/config.h.in 2003-09-27 21:25:46.000000000 +0900 |
311 |
+@@ -181,6 +181,9 @@ |
312 |
+ /* Define to 1 if you have the `rename' function. */ |
313 |
+ #undef HAVE_RENAME |
314 |
+ |
315 |
++/* Define to 1 if you have the <locale.h> header file. */ |
316 |
++#undef HAVE_LOCALE_H |
317 |
++ |
318 |
+ /* Define to 1 if you have the `setlocale' function. */ |
319 |
+ #undef HAVE_SETLOCALE |
320 |
+ |
321 |
+diff -urN a2ps-4.13.ORIG/configure.in a2ps-4.13/configure.in |
322 |
+--- a2ps-4.13.ORIG/configure.in 2003-09-27 19:33:38.000000000 +0900 |
323 |
++++ a2ps-4.13/configure.in 2003-09-27 21:26:05.000000000 +0900 |
324 |
+@@ -71,7 +71,7 @@ |
325 |
+ AC_HEADER_DIRENT |
326 |
+ AC_CHECK_HEADERS(sys/time.h sys/stat.h sys/types.h sys/ioctl.h \ |
327 |
+ math.h string.h strings.h stdlib.h unistd.h stdarg.h pwd.h malloc.h \ |
328 |
+- memory.h errno.h fcntl.h stdbool.h fnmatch.h) |
329 |
++ memory.h errno.h fcntl.h stdbool.h fnmatch.h locale.h) |
330 |
+ |
331 |
+ ## --------------------- ## |
332 |
+ ## Checks for typedefs. ## |
333 |
|
334 |
diff --git a/app-text/a2ps/files/a2ps-4.14-check-mempcpy.patch b/app-text/a2ps/files/a2ps-4.14-check-mempcpy.patch |
335 |
new file mode 100644 |
336 |
index 0000000..7b820ce |
337 |
--- /dev/null |
338 |
+++ b/app-text/a2ps/files/a2ps-4.14-check-mempcpy.patch |
339 |
@@ -0,0 +1,12 @@ |
340 |
+--- a2ps-4.14-orig/configure.in 2008-04-16 08:36:03.000000000 +0200 |
341 |
++++ a2ps-4.14/configure.in 2008-04-16 08:36:29.000000000 +0200 |
342 |
+@@ -137,7 +137,8 @@ |
343 |
+ ad_REPLACE_FUNC_STRCASECMP |
344 |
+ ad_REPLACE_FUNC_STRNCASECMP |
345 |
+ ad_REPLACE_FUNC_RENAME |
346 |
+-AC_CHECK_FUNCS(uname strchr strerror strerror_r getcwd bcopy bzero tempnam strsignal psignal setlocale) |
347 |
++AC_CHECK_FUNCS(uname strchr strerror strerror_r getcwd bcopy bzero \ |
348 |
++ tempnam strsignal psignal setlocale mempcpy) |
349 |
+ ad_FUNC_SYSTEMPAPERNAME |
350 |
+ ad_FUNC_ATEXIT |
351 |
+ ad_FUNC_STRFTIME |
352 |
|
353 |
diff --git a/app-text/a2ps/files/a2ps-4.14-cleanup.patch b/app-text/a2ps/files/a2ps-4.14-cleanup.patch |
354 |
new file mode 100644 |
355 |
index 0000000..25187f3 |
356 |
--- /dev/null |
357 |
+++ b/app-text/a2ps/files/a2ps-4.14-cleanup.patch |
358 |
@@ -0,0 +1,106 @@ |
359 |
+fix missing prototype and printf warnings |
360 |
+ |
361 |
+--- a/lib/argmatch.c |
362 |
++++ b/lib/argmatch.c |
363 |
+@@ -21,6 +21,7 @@ |
364 |
+ #include "argmatch.h" |
365 |
+ |
366 |
+ #include <stdio.h> |
367 |
++#include <stdlib.h> |
368 |
+ #ifdef STDC_HEADERS |
369 |
+ # include <string.h> |
370 |
+ #endif |
371 |
+--- a/lib/encoding.c |
372 |
++++ b/lib/encoding.c |
373 |
+@@ -790,7 +790,7 @@ dump_encoding_setup (FILE * stream, |
374 |
+ /* Create the dictionary and fill it */ |
375 |
+ fprintf (stream, "%% Dictionary for %s support\n", |
376 |
+ encoding->name); |
377 |
+- fprintf (stream, "/%sdict %d dict begin\n", encoding->key, nb); |
378 |
++ fprintf (stream, "/%sdict %zu dict begin\n", encoding->key, nb); |
379 |
+ for (i = 0 ; i < nb ; i++) |
380 |
+ fprintf (stream, " /f%s %sEncoding /%s reencode_font\n", |
381 |
+ font_names [i], |
382 |
+--- a/lib/output.c |
383 |
++++ b/lib/output.c |
384 |
+@@ -84,7 +84,7 @@ new_derivation (enum derivation_type type) |
385 |
+ static void |
386 |
+ derivation_self_print (struct derivation * derivation, FILE * stream) |
387 |
+ { |
388 |
+- fprintf (stream, "At %x: ", (int) derivation); |
389 |
++ fprintf (stream, "At %p: ", derivation); |
390 |
+ switch (derivation->type) |
391 |
+ { |
392 |
+ case nothing: |
393 |
+@@ -525,7 +525,7 @@ output_file (struct output * out, a2ps_job * job, |
394 |
+ expand_user_string (job, FIRST_FILE (job), |
395 |
+ (const uchar *) "Expand: requirement", |
396 |
+ (const uchar *) token)); |
397 |
+- output (dest, expansion); |
398 |
++ output (dest, "%s", expansion); |
399 |
+ continue; |
400 |
+ } |
401 |
+ |
402 |
+--- a/lib/parseppd.y |
403 |
++++ b/lib/parseppd.y |
404 |
+@@ -154,7 +154,7 @@ font_clause : |
405 |
+ void |
406 |
+ yyerror (const char *msg) |
407 |
+ { |
408 |
+- error_at_line (1, 0, ppdfilename, ppdlineno, msg); |
409 |
++ error_at_line (1, 0, ppdfilename, ppdlineno, "%s", msg); |
410 |
+ } |
411 |
+ |
412 |
+ /* |
413 |
+--- a/lib/psgen.c |
414 |
++++ b/lib/psgen.c |
415 |
+@@ -232,7 +232,7 @@ output_marker (a2ps_job * job, const char * kind, uchar * marker) |
416 |
+ default: |
417 |
+ *buf = '\0'; |
418 |
+ ps_escape_char (job, cp[i], buf); |
419 |
+- output (jdiv, (char *) buf); |
420 |
++ output (jdiv, "%s", buf); |
421 |
+ break; |
422 |
+ } |
423 |
+ } |
424 |
+--- a/lib/quotearg.c |
425 |
++++ b/lib/quotearg.c |
426 |
+@@ -60,6 +60,7 @@ |
427 |
+ |
428 |
+ #if HAVE_MBRTOWC && HAVE_WCHAR_H |
429 |
+ # include <wchar.h> |
430 |
++# include <wctype.h> |
431 |
+ #else |
432 |
+ # define iswprint(wc) 1 |
433 |
+ # define mbrtowc(pwc, s, n, ps) 1 |
434 |
+--- a/lib/title.c |
435 |
++++ b/lib/title.c |
436 |
+@@ -28,6 +28,7 @@ |
437 |
+ #endif |
438 |
+ |
439 |
+ #include <stdio.h> |
440 |
++#include <string.h> |
441 |
+ |
442 |
+ #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC |
443 |
+ # if __STDC__ |
444 |
+--- a/src/long-options.c |
445 |
++++ b/src/long-options.c |
446 |
+@@ -22,6 +22,7 @@ |
447 |
+ #endif |
448 |
+ |
449 |
+ #include <stdio.h> |
450 |
++#include <stdlib.h> |
451 |
+ #include <getopt.h> |
452 |
+ #include "closeout.h" |
453 |
+ #include "long-options.h" |
454 |
+--- a/src/parsessh.y |
455 |
++++ b/src/parsessh.y |
456 |
+@@ -740,7 +740,7 @@ exception_def_opt: |
457 |
+ void |
458 |
+ yyerror (const char *msg) |
459 |
+ { |
460 |
+- error_at_line (1, 0, sshfilename, sshlineno, msg); |
461 |
++ error_at_line (1, 0, sshfilename, sshlineno, "%s", msg); |
462 |
+ } |
463 |
+ |
464 |
+ /* |
465 |
|
466 |
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 |
467 |
new file mode 100644 |
468 |
index 0000000..7c3c690 |
469 |
--- /dev/null |
470 |
+++ b/app-text/a2ps/files/a2ps-4.14-fix-stpcpy-proto.patch |
471 |
@@ -0,0 +1,17 @@ |
472 |
+=== modified file 'lib/xstrrpl.c' |
473 |
+--- lib/xstrrpl.c 2008-04-14 18:04:50 +0000 |
474 |
++++ lib/xstrrpl.c 2008-04-14 18:20:20 +0000 |
475 |
+@@ -20,12 +20,10 @@ |
476 |
+ |
477 |
+ #include "system.h" |
478 |
+ #include <assert.h> |
479 |
+ #include "xstrrpl.h" |
480 |
+ |
481 |
+-extern char * stpcpy(); |
482 |
+- |
483 |
+ /* Perform subsitutions in string. Result is malloc'd |
484 |
+ E.g., result = xstrrrpl ("1234", subst) gives result = "112333" |
485 |
+ where subst = { {"1", "11"}, {"3", "333"}, { "4", ""}} |
486 |
+ */ |
487 |
+ char * |
488 |
+ |
489 |
|
490 |
diff --git a/app-text/a2ps/files/a2ps-4.14-ja-cleanup.patch b/app-text/a2ps/files/a2ps-4.14-ja-cleanup.patch |
491 |
new file mode 100644 |
492 |
index 0000000..16271b3 |
493 |
--- /dev/null |
494 |
+++ b/app-text/a2ps/files/a2ps-4.14-ja-cleanup.patch |
495 |
@@ -0,0 +1,122 @@ |
496 |
+diff --git lib/argmatch.c lib/argmatch.c |
497 |
+index f983e9d..eadc7ea 100644 |
498 |
+--- lib/argmatch.c |
499 |
++++ lib/argmatch.c |
500 |
+@@ -21,6 +21,7 @@ |
501 |
+ #include "argmatch.h" |
502 |
+ |
503 |
+ #include <stdio.h> |
504 |
++#include <stdlib.h> |
505 |
+ #ifdef STDC_HEADERS |
506 |
+ # include <string.h> |
507 |
+ #endif |
508 |
+diff --git lib/encoding.c lib/encoding.c |
509 |
+index 9bd9f2a..f554a6d 100644 |
510 |
+--- lib/encoding.c |
511 |
++++ lib/encoding.c |
512 |
+@@ -989,7 +989,7 @@ dump_encoding_setup (FILE * stream, |
513 |
+ /* Create the dictionary and fill it */ |
514 |
+ fprintf (stream, "%% Dictionary for %s support\n", |
515 |
+ encoding->name); |
516 |
+- fprintf (stream, "/%sdict %d dict begin\n", encoding->key, |
517 |
++ fprintf (stream, "/%sdict %zu dict begin\n", encoding->key, |
518 |
+ (encoding->composite_flag == true)? nb+nb+ns:nb+ns); |
519 |
+ for (i = 0 ; i < nb ; i++) |
520 |
+ fprintf (stream, " /f%s %sEncoding /%s reencode_font\n", |
521 |
+diff --git lib/output.c lib/output.c |
522 |
+index b5fc37d..5f67676 100644 |
523 |
+--- lib/output.c |
524 |
++++ lib/output.c |
525 |
+@@ -84,7 +84,7 @@ new_derivation (enum derivation_type type) |
526 |
+ static void |
527 |
+ derivation_self_print (struct derivation * derivation, FILE * stream) |
528 |
+ { |
529 |
+- fprintf (stream, "At %x: ", (int) derivation); |
530 |
++ fprintf (stream, "At %p: ", derivation); |
531 |
+ switch (derivation->type) |
532 |
+ { |
533 |
+ case nothing: |
534 |
+@@ -525,7 +525,7 @@ output_file (struct output * out, a2ps_job * job, |
535 |
+ expand_user_string (job, FIRST_FILE (job), |
536 |
+ (const uchar *) "Expand: requirement", |
537 |
+ (const uchar *) token)); |
538 |
+- output (dest, expansion); |
539 |
++ output (dest, "%s", expansion); |
540 |
+ continue; |
541 |
+ } |
542 |
+ |
543 |
+diff --git lib/parseppd.y lib/parseppd.y |
544 |
+index a7558ba..c89d188 100644 |
545 |
+--- lib/parseppd.y |
546 |
++++ lib/parseppd.y |
547 |
+@@ -154,7 +154,7 @@ font_clause : |
548 |
+ void |
549 |
+ yyerror (const char *msg) |
550 |
+ { |
551 |
+- error_at_line (1, 0, ppdfilename, ppdlineno, msg); |
552 |
++ error_at_line (1, 0, ppdfilename, ppdlineno, "%s", msg); |
553 |
+ } |
554 |
+ |
555 |
+ /* |
556 |
+diff --git lib/psgen.c lib/psgen.c |
557 |
+index 9eeef74..9d7a27d 100644 |
558 |
+--- lib/psgen.c |
559 |
++++ lib/psgen.c |
560 |
+@@ -232,7 +232,7 @@ output_marker (a2ps_job * job, const char * kind, uchar * marker) |
561 |
+ default: |
562 |
+ *buf = '\0'; |
563 |
+ ps_escape_char (job, cp[i], buf); |
564 |
+- output (jdiv, (char *) buf); |
565 |
++ output (jdiv, "%s", buf); |
566 |
+ break; |
567 |
+ } |
568 |
+ } |
569 |
+diff --git lib/quotearg.c lib/quotearg.c |
570 |
+index 16d0b91..89db991 100644 |
571 |
+--- lib/quotearg.c |
572 |
++++ lib/quotearg.c |
573 |
+@@ -60,6 +60,7 @@ |
574 |
+ |
575 |
+ #if HAVE_MBRTOWC && HAVE_WCHAR_H |
576 |
+ # include <wchar.h> |
577 |
++# include <wctype.h> |
578 |
+ #else |
579 |
+ # define iswprint(wc) 1 |
580 |
+ # define mbrtowc(pwc, s, n, ps) 1 |
581 |
+diff --git lib/title.c lib/title.c |
582 |
+index cf4a34b..7a3e87b 100644 |
583 |
+--- lib/title.c |
584 |
++++ lib/title.c |
585 |
+@@ -28,6 +28,7 @@ |
586 |
+ #endif |
587 |
+ |
588 |
+ #include <stdio.h> |
589 |
++#include <string.h> |
590 |
+ |
591 |
+ #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC |
592 |
+ # if __STDC__ |
593 |
+diff --git src/long-options.c src/long-options.c |
594 |
+index fb40cd9..7bd77b0 100644 |
595 |
+--- src/long-options.c |
596 |
++++ src/long-options.c |
597 |
+@@ -22,6 +22,7 @@ |
598 |
+ #endif |
599 |
+ |
600 |
+ #include <stdio.h> |
601 |
++#include <stdlib.h> |
602 |
+ #include <getopt.h> |
603 |
+ #include "closeout.h" |
604 |
+ #include "long-options.h" |
605 |
+diff --git src/parsessh.y src/parsessh.y |
606 |
+index 21e9559..569fdb6 100644 |
607 |
+--- src/parsessh.y |
608 |
++++ src/parsessh.y |
609 |
+@@ -740,7 +740,7 @@ exception_def_opt: |
610 |
+ void |
611 |
+ yyerror (const char *msg) |
612 |
+ { |
613 |
+- error_at_line (1, 0, sshfilename, sshlineno, msg); |
614 |
++ error_at_line (1, 0, sshfilename, sshlineno, "%s", msg); |
615 |
+ } |
616 |
+ |
617 |
+ /* |
618 |
|
619 |
diff --git a/app-text/a2ps/files/a2ps-4.14-psset.patch b/app-text/a2ps/files/a2ps-4.14-psset.patch |
620 |
new file mode 100644 |
621 |
index 0000000..291c3aa |
622 |
--- /dev/null |
623 |
+++ b/app-text/a2ps/files/a2ps-4.14-psset.patch |
624 |
@@ -0,0 +1,21 @@ |
625 |
+diff -Naur a2ps-4.14.orig/contrib/psset.in a2ps-4.14/contrib/psset.in |
626 |
+--- a2ps-4.14.orig/contrib/psset.in 2007-12-29 12:29:01.000000000 +0900 |
627 |
++++ a2ps-4.14/contrib/psset.in 2009-04-12 12:17:43.000000000 +0900 |
628 |
+@@ -219,7 +219,7 @@ |
629 |
+ done |
630 |
+ |
631 |
+ pspagedevice="% Pagedevice definitions: |
632 |
+-countdictstack |
633 |
++ countdictstack |
634 |
+ % Push our own mark, since there can be several PS marks pushed depending |
635 |
+ % where the failure really occured. |
636 |
+ /psset_mark |
637 |
+@@ -227,7 +227,7 @@ |
638 |
+ } stopped |
639 |
+ % My cleartomark |
640 |
+ { /psset_mark eq { exit } if } loop |
641 |
+-countdictstack exch sub dup 0 gt |
642 |
++ countdictstack exch sub dup 0 gt |
643 |
+ { |
644 |
+ { end } repeat |
645 |
+ }{ |
646 |
|
647 |
diff --git a/app-text/a2ps/files/a2ps-4.14-ptrdiff_t.patch b/app-text/a2ps/files/a2ps-4.14-ptrdiff_t.patch |
648 |
new file mode 100644 |
649 |
index 0000000..00d955a |
650 |
--- /dev/null |
651 |
+++ b/app-text/a2ps/files/a2ps-4.14-ptrdiff_t.patch |
652 |
@@ -0,0 +1,14 @@ |
653 |
+diff -uNr a2ps-4.14/lib/obstack.h a2ps-4.14.test/lib/obstack.h |
654 |
+--- a2ps-4.14/lib/obstack.h 2007-12-29 09:37:59.000000000 +0800 |
655 |
++++ a2ps-4.14.test/lib/obstack.h 2009-06-10 18:49:45.000000000 +0900 |
656 |
+@@ -138,9 +138,9 @@ |
657 |
+ #define __need_ptrdiff_t |
658 |
+ #endif |
659 |
+ #endif |
660 |
++#endif |
661 |
+ |
662 |
+ #include <stddef.h> |
663 |
+-#endif |
664 |
+ |
665 |
+ #if defined (__STDC__) && __STDC__ |
666 |
+ #define PTR_INT_TYPE ptrdiff_t |
667 |
|
668 |
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 |
669 |
new file mode 100644 |
670 |
index 0000000..44cd4bf |
671 |
--- /dev/null |
672 |
+++ b/app-text/a2ps/files/a2ps-4.14-texinfo-5.x.patch |
673 |
@@ -0,0 +1,147 @@ |
674 |
+--- a2ps-4.14/doc/a2ps.texi.bero 2013-03-26 10:31:31.230137555 +0100 |
675 |
++++ a2ps-4.14/doc/a2ps.texi 2013-03-26 11:01:01.504006086 +0100 |
676 |
+@@ -44,10 +44,6 @@ |
677 |
+ @end ifnottex |
678 |
+ |
679 |
+ @c TeX variants |
680 |
+-@macro LaTeX |
681 |
+-La@TeX{} |
682 |
+-@end macro |
683 |
+- |
684 |
+ @macro PreTeX |
685 |
+ Pre@TeX{} |
686 |
+ @end macro |
687 |
+@@ -417,9 +413,9 @@ Genesis |
688 |
+ @c Now, that's what I call humor :) |
689 |
+ @cindex First Page |
690 |
+ This document describes GNU @pack{} version @value{VERSION}. The latest |
691 |
+-versions may be found on the @href{@value{WWWHOME},@pack{} home page}. |
692 |
+-We plan to update the @href{http://www.gnu.org/software/a2ps/, GNU |
693 |
+-@pack{} home page} in the near future, in which case the latter will be |
694 |
++versions may be found on the @uref{@value{WWWHOME}, home page}. |
695 |
++We plan to update the @uref{@value{WWWHOME}, GNU home page} |
696 |
++in the near future, in which case the latter will be |
697 |
+ a better source of information. |
698 |
+ |
699 |
+ We tried to make this document informative and pleasant. It tries to be |
700 |
+@@ -431,8 +427,8 @@ difficult to use. @xref{Glossary}, for |
701 |
+ information. |
702 |
+ |
703 |
+ Please, send us emailcards @code{:)}. Whatever the comment is, or if you |
704 |
+-just like @pack{}, write to @email{Miguel.Santana@@st.com, Miguel |
705 |
+-Santana} and @email{akim@@freefriends.org, Akim Demaille}. But |
706 |
++just like @pack{}, write to @email{Miguel.Santana@@st.com, Miguel Santana} |
707 |
++and @email{akim@@freefriends.org, Akim Demaille}. But |
708 |
+ @emph{never} write to either of us for asking questions, or to report |
709 |
+ bugs. Chances are very high never to receive an answer, as we receive |
710 |
+ too many messages. @xref{a2ps Mailing Lists}, for information on the |
711 |
+@@ -517,8 +513,8 @@ everybody so that mistakes get fixed as |
712 |
+ |
713 |
+ So, if you have a problem (configuration error, compilation error, |
714 |
+ runtime error, documentation error or unclear), first check in the FAQ |
715 |
+-(@pxref{FAQ}), then on the page @href{@value{WWWHOME}/bugs.html,Known |
716 |
+-@pack{} Bugs} if the issue has not been addressed yet. If it is not the |
717 |
++(@pxref{FAQ}), then on the page @uref{@value{WWWHOME}/bugs.html,Known Bugs} |
718 |
++if the issue has not been addressed yet. If it is not the |
719 |
+ case, but it appears that the version of @pack{} you have is old, |
720 |
+ consider upgrading. |
721 |
+ |
722 |
+@@ -2802,8 +2798,7 @@ Thou shalt start your PostScript DSC con |
723 |
+ |
724 |
+ The bad news is that some printers will reject this header. Then you |
725 |
+ may change this header without any worry since the PostScript produced |
726 |
+-by @pack{} is also 100% PostScript level 1@footnote{That is to say, there |
727 |
+-are no PostScript printers that don't understand these files.}. |
728 |
++by @pack{} is also 100% PostScript level 1@footnote{That is to say, there are no PostScript printers that don't understand these files.}. |
729 |
+ |
730 |
+ @defvr {Configuration Setting} OutputFirstLine: @var{magic-number} |
731 |
+ @cindex @samp{OutputFirstLine:} |
732 |
+@@ -3971,13 +3966,13 @@ Quote @var{text} so that no special sequ |
733 |
+ @itemx \end@{enumerate@} |
734 |
+ @itemx \begin@{description@} |
735 |
+ @itemx \end@{description@} |
736 |
+-These commands are legal in @LaTeX but have no sense in @PreTeX{}. |
737 |
++These commands are legal in @LaTeX{} but have no sense in @PreTeX{}. |
738 |
+ Hence there are simply ignored and not printed (if immediately followed |
739 |
+ by an end-of-line). |
740 |
+ @end table |
741 |
+ |
742 |
+ @node Differences with LaTeX |
743 |
+-@subsubsection Differences with @LaTeX |
744 |
++@subsubsection Differences with @LaTeX{} |
745 |
+ The following symbols, inherited from the style sheet @code{Symbol}, are |
746 |
+ not supported by @LaTeX{}: |
747 |
+ |
748 |
+@@ -4124,9 +4119,9 @@ beautiful, with any character you might |
749 |
+ prefix part of the file name, and is alpha-numerical, lower case, and |
750 |
+ less than 8 characters long. |
751 |
+ |
752 |
+-Anywhere @pack{} needs to recognize a style sheet by a name, @strong{it |
753 |
+-uses the key} (in the @file{sheets.map} file, with the option @samp{-E}, |
754 |
+-etc.). |
755 |
++Anywhere @pack{} needs to recognize a style sheet by a name, |
756 |
++@strong{it uses the key} (in the @file{sheets.map} file, with the |
757 |
++option @samp{-E}, etc.). |
758 |
+ |
759 |
+ As an example, C++ is implemented in a file called @file{cxx.ssh}, in |
760 |
+ which the name is declared to be @samp{C++}. |
761 |
+@@ -5672,7 +5667,7 @@ supporting a @samp{--help}-like option. |
762 |
+ @subsection Invoking @code{card} |
763 |
+ |
764 |
+ @example |
765 |
+-card [@var{options}] @var{applications} [-- @var{@pack{}-options}] |
766 |
++card [@var{options}] @var{applications} [-- @var{-options}] |
767 |
+ @end example |
768 |
+ |
769 |
+ @noindent |
770 |
+@@ -5680,7 +5675,7 @@ card [@var{options}] @var{applications} |
771 |
+ @var{applications}' help message (typically by the options @samp{--help} |
772 |
+ or @samp{-h}), and pretty prints it thanks to @pack{} (or the content of |
773 |
+ the environment variable @samp{A2PS} if it is set). |
774 |
+-@var{@pack{}-options} are passed to @pack{}. |
775 |
++@var{-options} are passed to @pack{}. |
776 |
+ |
777 |
+ Supported options are: |
778 |
+ |
779 |
+@@ -5874,12 +5869,12 @@ difference finder,wdiff,GNU wdiff}) to e |
780 |
+ @subsection Invoking @code{pdiff} |
781 |
+ |
782 |
+ @example |
783 |
+-pdiff [@var{options}] @var{file-1} @var{file-2} [-- @var{@pack{}-options}] |
784 |
++pdiff [@var{options}] @var{file-1} @var{file-2} [-- @var{-options}] |
785 |
+ @end example |
786 |
+ |
787 |
+ @noindent |
788 |
+ make a pretty comparison between @var{file-1} and @var{file-2}. |
789 |
+-@var{@pack{}-options} are passed to @pack{}. |
790 |
++@var{-options} are passed to @pack{}. |
791 |
+ |
792 |
+ Supported options are: |
793 |
+ |
794 |
+@@ -6222,7 +6217,7 @@ Error related questions. |
795 |
+ @subsection Why Does it Print Nothing? |
796 |
+ |
797 |
+ @quotation |
798 |
+-@i{@pack{} works OK, but the printer prints nothing.} |
799 |
++@i{works OK, but the printer prints nothing.} |
800 |
+ @end quotation |
801 |
+ |
802 |
+ There are two ways that printing can fail: silently, or with a |
803 |
+@@ -6351,7 +6346,7 @@ If it is incorrect, ask for help around |
804 |
+ @subsection Why Does it Say my File is Binary? |
805 |
+ |
806 |
+ @quotation |
807 |
+-@i{@pack{} complains that my file is binary though it is not.} |
808 |
++@i{complains that my file is binary though it is not.} |
809 |
+ @end quotation |
810 |
+ |
811 |
+ There are several reasons that can cause @pack{} to consider a file is |
812 |
+@@ -6591,7 +6586,7 @@ format you want for the date: @xref{Esca |
813 |
+ @subsection Why Have the Options Changed? |
814 |
+ |
815 |
+ @quotation |
816 |
+-@i{The options of this @pack{} are not the same as in the previous versions.} |
817 |
++@i{The options of this are not the same as in the previous versions.} |
818 |
+ @end quotation |
819 |
+ |
820 |
+ True. But the old scheme (up to version 4.6.1) prevented us from |
821 |
|
822 |
diff --git a/app-text/a2ps/metadata.xml b/app-text/a2ps/metadata.xml |
823 |
new file mode 100644 |
824 |
index 0000000..98cea90 |
825 |
--- /dev/null |
826 |
+++ b/app-text/a2ps/metadata.xml |
827 |
@@ -0,0 +1,12 @@ |
828 |
+<?xml version="1.0" encoding="UTF-8"?> |
829 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
830 |
+<pkgmetadata> |
831 |
+<maintainer type="project"> |
832 |
+ <email>printing@g.o</email> |
833 |
+ <name>Gentoo Printing Project</name> |
834 |
+</maintainer> |
835 |
+<maintainer type="project"> |
836 |
+ <email>cjk@g.o</email> |
837 |
+ <name>Cjk</name> |
838 |
+</maintainer> |
839 |
+</pkgmetadata> |