SHA256
1
0
forked from pool/a2ps
OBS User unknown 2007-01-15 22:50:44 +00:00 committed by Git OBS Bridge
commit 53ba9aad18
17 changed files with 4415 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

22
a2ps-4.13-acroread.patch Normal file
View File

@ -0,0 +1,22 @@
--- configure.in~ 2000-02-24 18:53:03.000000000 +0100
+++ configure.in 2006-05-19 12:31:53.000000000 +0200
@@ -312,6 +312,8 @@
test "$a2_cv_com_acroread4" = yes && COM_acroread4=''
fi
+COM_acroread4=''
+
# Outputting PDF
ad_CHECK_PROGS((distill, ps2pdf))
test "$COM_distill$COM_ps2pdf" = "##" && COM_PS2PDF="#"
--- configure~ 2006-04-27 16:01:24.000000000 +0200
+++ configure 2006-04-27 16:01:24.000000000 +0200
@@ -9390,6 +9390,8 @@
test "$a2_cv_com_acroread4" = yes && COM_acroread4=''
fi
+COM_acroread4=''
+
# Outputting PDF
if test "$enable_paths" = "no"; then
# Extract the first word of "distill", so it can be a program name with args.

11
a2ps-4.13-base.patch Normal file
View File

@ -0,0 +1,11 @@
--- ps/base.ps
+++ ps/base.ps 2006-05-19 12:23:41.000000000 +0200
@@ -114,7 +114,7 @@
} bind def
/reencode_font {
- findfont reencode 2 copy definefont pop def
+ findfont reencode 2 copy definefont exch pop def
} bind def
% Function c-show (str => -)

14
a2ps-4.13-include.patch Normal file
View File

@ -0,0 +1,14 @@
diff -pur a2ps-4.13-1059/lib/title.c a2ps-4.13/lib/title.c
--- a2ps-4.13-1059/lib/title.c 2005-09-20 13:40:15.000000000 +0200
+++ a2ps-4.13/lib/title.c 2005-09-20 13:53:13.000000000 +0200
@@ -57,6 +57,10 @@
#include "title.h"
#include "printlen.h"
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/socket.h>
/* Print the message FORMAT, which is a printf-style
format string*/

22
a2ps-4.13-nb.patch Normal file
View File

@ -0,0 +1,22 @@
--- configure.in
+++ configure.in
@@ -18,7 +18,7 @@
AC_SUBST(GNU_PACKAGE)
# Available translations
-ALL_LINGUAS="ca cs da de es et fr it ko nl no pl pt ru sl sv tr"
+ALL_LINGUAS="ca cs da de es et fr it ko nl nb pl pt ru sl sv tr"
## --------------------- ##
## Checks for programs. ##
--- configure
+++ configure
@@ -900,7 +900,7 @@
EOF
# Available translations
-ALL_LINGUAS="ca cs da de es et fr it ko nl no pl pt ru sl sv tr"
+ALL_LINGUAS="ca cs da de es et fr it ko nl nb pl pt ru sl sv tr"
## --------------------- ##
## Checks for programs. ##

431
a2ps-4.13-ogonkify.patch Normal file
View File

@ -0,0 +1,431 @@
--- ogonkify/VERSION
+++ ogonkify/VERSION Mon May 24 19:32:17 1999
@@ -1,2 +1,2 @@
This is the version of `ogonkify' distributed as of
-Fri May 21 14:56:35 BST 1999
+Mon May 24 18:32:17 BST 1999
--- ogonkify/compose.ps
+++ ogonkify/compose.ps Mon May 24 19:30:33 1999
@@ -3,7 +3,7 @@
% By J. Chroboczek <jec@dcs.ed.ac.uk>
%
% -- code follows this line --
-%%BeginResource: procset compose 0.8 0
+%%BeginResource: procset compose 0.8 1
% Copyright (c) 1996-1999 by J. Chroboczek
% This code may be distributed under the terms of the
% GNU Public License, either version 2 of the license, or (at your
@@ -153,7 +153,8 @@
{} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
0 0 moveto
(5) stringwidth pop % newname dict w
- (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ (M) false charpath pathbbox newpath 4 1 roll pop pop pop
+ % newnamedict w h
3 2 roll % newname w h dict
dup length dict dup 3 1 roll begin % newname w h newdict
--- ogonkify/doc/ogonkify.1
+++ ogonkify/doc/ogonkify.1 Mon May 24 19:18:21 1999
@@ -1,6 +1,6 @@
.TH OGONKIFY 1 "14 May 1999" "McKornik Jr."
-.\" Time-stamp: <99/05/21 14:43:47 jec>
+.\" Time-stamp: <99/05/24 18:18:21 jec>
.SH NAME
ogonkify \- international support for PostScript
@@ -262,7 +262,8 @@
.IP
% ogonkify \-N \-CT <alamakota.ps | lpr
.LP
-Typical usage with other programs is:
+Typical usage with other programs, in the case of the Latin-2
+encoding, is:
.IP
.nf
% ogonkify \-M \-AT <alamakota.ps | lpr
@@ -270,6 +271,18 @@
% ogonkify \-SO \-AT <alamakota.ps | lpr
% ogonkify \-AX \-ATH <alamakota.ps | lpr
% ogonkify \-XF \-ATH <alamakota.ps | lpr
+.fi
+.LP
+For the Latin-5 encoding, it would be similar:
+.IP
+.nf
+% ogonkify \-N -AT -eL5 <alamakota.ps | lpr
+.fi
+.LP
+while for the Latin-9 (Latin-0) encoding it would typically be
+.IP
+.nf
+% ogonkify \-N \-E \-eL9 <alamkota.ps | lpr
.fi
.LP
--- ogonkify/doc/ogonkify.info
+++ ogonkify/doc/ogonkify.info Mon May 24 19:32:16 1999
@@ -1,9 +1,9 @@
-This is ogonkify.info, produced by makeinfo version 3.12i from
-ogonkify.texi.
+This is Info file ogonkify.info, produced by Makeinfo version 1.68 from
+the input file ogonkify.texi.
INFO-DIR-SECTION Printing Tools
START-INFO-DIR-ENTRY
-* ogonkify: (ogonkify). Ogonkify
+* ogonkify: (ogonkify). Ogonkify
END-INFO-DIR-ENTRY
This is the Ogonkify manual, Copyright (C) 1996-1999 by Juliusz
@@ -48,7 +48,7 @@
formative years. The author will not accept any responsibility for any
moral grief caused.
- I would like to ask you _not_ to distribute the generated fonts
+ I would like to ask you *not* to distribute the generated fonts
without including a pointer to the original AFMs and the rest of the
code. Furthermore, please notify me if you decide to include this code
in a larger piece of software.
@@ -387,19 +387,19 @@

Tag Table:
-Node: Top276
-Node: License866
-Node: Using Ogonkify2161
-Node: Ghostscript2602
-Node: Standard Applications3086
-Node: a2ps3571
-Node: genscript4003
-Node: Adding new characters5548
-Node: Composite background6146
-Node: AFM files9661
-Node: Generated fonts10868
-Node: Composite usage12867
-Node: Composite example14413
-Node: Reaching the author15327
+Node: Top297
+Node: License887
+Node: Using Ogonkify2182
+Node: Ghostscript2623
+Node: Standard Applications3107
+Node: a2ps3592
+Node: genscript4024
+Node: Adding new characters5569
+Node: Composite background6167
+Node: AFM files9682
+Node: Generated fonts10889
+Node: Composite usage12888
+Node: Composite example14434
+Node: Reaching the author15348

End Tag Table
--- ogonkify/doc/ogonkify.texi
+++ ogonkify/doc/ogonkify.texi Mon May 24 19:15:21 1999
@@ -5,11 +5,11 @@
@setchapternewpage off
@c %**end of header
-@c Time-stamp: <99/05/14 04:30:20 jec>
+@c Time-stamp: <99/05/24 18:15:20 jec>
@dircategory Printing Tools
@direntry
-* ogonkify: (ogonkify). Ogonkify
+* ogonkify: (ogonkify). Ogonkify
@end direntry
@ifinfo
--- ogonkify/ogonkify.in.in
+++ ogonkify/ogonkify.in.in Fri Aug 31 11:41:50 2001
@@ -13,7 +13,7 @@
# Warning: this program is written in Perl
$PROGNAME='ogonkify';
-$VERSION='v. 0.7.0 by J. Chroboczek';
+$VERSION='v. 0.7.1 by J. Chroboczek';
# Directory with the IBM Courier fonts
$IBMFONTS="@IBMFONTS@";
@@ -237,6 +270,9 @@
$where=0;
while(<>) {
if($where==0) {
+ if($doNetscape && /^%%Title:/) {
+ $_="%%Title: \n";
+ }
print;
if(($doMosaic || $doMp) && /^%%EndComments/) {
$_="%%BeginProlog\n";
@@ -252,14 +288,14 @@
for(@procsets) {
&procset($_);
}
- for(@downloadFonts) {
- &downloadFont($_);
- }
if($eurify) {
for(@standardFont) {
&eurifyFont($_);
}
}
+ for(@downloadFonts) {
+ &downloadFont($_);
+ }
while(($from,$to)=each %remappings) {
&remap($from,$to);
}
--- ogonkify/pcrb-o.pfa
+++ ogonkify/pcrb-o.pfa Thu Apr 19 15:09:47 2001
@@ -89,7 +89,7 @@
% By J. Chroboczek <jec@dcs.ed.ac.uk>
%
% -- code follows this line --
-%%BeginResource: procset compose 0.8 0
+%%BeginResource: procset compose 0.8 1
% Copyright (c) 1996-1999 by J. Chroboczek
% This code may be distributed under the terms of the
% GNU Public License, either version 2 of the license, or (at your
@@ -239,7 +239,8 @@
{} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
0 0 moveto
(5) stringwidth pop % newname dict w
- (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ (M) false charpath pathbbox newpath 4 1 roll pop pop pop
+ % newnamedict w h
3 2 roll % newname w h dict
dup length dict dup 3 1 roll begin % newname w h newdict
--- ogonkify/pcrbo-o.pfa
+++ ogonkify/pcrbo-o.pfa Thu Apr 19 15:09:47 2001
@@ -89,7 +89,7 @@
% By J. Chroboczek <jec@dcs.ed.ac.uk>
%
% -- code follows this line --
-%%BeginResource: procset compose 0.8 0
+%%BeginResource: procset compose 0.8 1
% Copyright (c) 1996-1999 by J. Chroboczek
% This code may be distributed under the terms of the
% GNU Public License, either version 2 of the license, or (at your
@@ -239,7 +239,8 @@
{} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
0 0 moveto
(5) stringwidth pop % newname dict w
- (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ (M) false charpath pathbbox newpath 4 1 roll pop pop pop
+ % newnamedict w h
3 2 roll % newname w h dict
dup length dict dup 3 1 roll begin % newname w h newdict
--- ogonkify/pcrr-o.pfa
+++ ogonkify/pcrr-o.pfa Thu Apr 19 15:09:46 2001
@@ -89,7 +89,7 @@
% By J. Chroboczek <jec@dcs.ed.ac.uk>
%
% -- code follows this line --
-%%BeginResource: procset compose 0.8 0
+%%BeginResource: procset compose 0.8 1
% Copyright (c) 1996-1999 by J. Chroboczek
% This code may be distributed under the terms of the
% GNU Public License, either version 2 of the license, or (at your
@@ -239,7 +239,8 @@
{} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
0 0 moveto
(5) stringwidth pop % newname dict w
- (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ (M) false charpath pathbbox newpath 4 1 roll pop pop pop
+ % newnamedict w h
3 2 roll % newname w h dict
dup length dict dup 3 1 roll begin % newname w h newdict
--- ogonkify/pcrro-o.pfa
+++ ogonkify/pcrro-o.pfa Thu Apr 19 15:09:47 2001
@@ -89,7 +89,7 @@
% By J. Chroboczek <jec@dcs.ed.ac.uk>
%
% -- code follows this line --
-%%BeginResource: procset compose 0.8 0
+%%BeginResource: procset compose 0.8 1
% Copyright (c) 1996-1999 by J. Chroboczek
% This code may be distributed under the terms of the
% GNU Public License, either version 2 of the license, or (at your
@@ -239,7 +239,8 @@
{} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
0 0 moveto
(5) stringwidth pop % newname dict w
- (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ (M) false charpath pathbbox newpath 4 1 roll pop pop pop
+ % newnamedict w h
3 2 roll % newname w h dict
dup length dict dup 3 1 roll begin % newname w h newdict
--- ogonkify/phvb-o.pfa
+++ ogonkify/phvb-o.pfa Thu Apr 19 15:09:49 2001
@@ -89,7 +89,7 @@
% By J. Chroboczek <jec@dcs.ed.ac.uk>
%
% -- code follows this line --
-%%BeginResource: procset compose 0.8 0
+%%BeginResource: procset compose 0.8 1
% Copyright (c) 1996-1999 by J. Chroboczek
% This code may be distributed under the terms of the
% GNU Public License, either version 2 of the license, or (at your
@@ -239,7 +239,8 @@
{} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
0 0 moveto
(5) stringwidth pop % newname dict w
- (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ (M) false charpath pathbbox newpath 4 1 roll pop pop pop
+ % newnamedict w h
3 2 roll % newname w h dict
dup length dict dup 3 1 roll begin % newname w h newdict
--- ogonkify/phvbo-o.pfa
+++ ogonkify/phvbo-o.pfa Thu Apr 19 15:09:50 2001
@@ -89,7 +89,7 @@
% By J. Chroboczek <jec@dcs.ed.ac.uk>
%
% -- code follows this line --
-%%BeginResource: procset compose 0.8 0
+%%BeginResource: procset compose 0.8 1
% Copyright (c) 1996-1999 by J. Chroboczek
% This code may be distributed under the terms of the
% GNU Public License, either version 2 of the license, or (at your
@@ -239,7 +239,8 @@
{} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
0 0 moveto
(5) stringwidth pop % newname dict w
- (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ (M) false charpath pathbbox newpath 4 1 roll pop pop pop
+ % newnamedict w h
3 2 roll % newname w h dict
dup length dict dup 3 1 roll begin % newname w h newdict
--- ogonkify/phvr-o.pfa
+++ ogonkify/phvr-o.pfa Thu Apr 19 15:09:49 2001
@@ -89,7 +89,7 @@
% By J. Chroboczek <jec@dcs.ed.ac.uk>
%
% -- code follows this line --
-%%BeginResource: procset compose 0.8 0
+%%BeginResource: procset compose 0.8 1
% Copyright (c) 1996-1999 by J. Chroboczek
% This code may be distributed under the terms of the
% GNU Public License, either version 2 of the license, or (at your
@@ -239,7 +239,8 @@
{} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
0 0 moveto
(5) stringwidth pop % newname dict w
- (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ (M) false charpath pathbbox newpath 4 1 roll pop pop pop
+ % newnamedict w h
3 2 roll % newname w h dict
dup length dict dup 3 1 roll begin % newname w h newdict
--- ogonkify/phvro-o.pfa
+++ ogonkify/phvro-o.pfa Thu Apr 19 15:09:49 2001
@@ -89,7 +89,7 @@
% By J. Chroboczek <jec@dcs.ed.ac.uk>
%
% -- code follows this line --
-%%BeginResource: procset compose 0.8 0
+%%BeginResource: procset compose 0.8 1
% Copyright (c) 1996-1999 by J. Chroboczek
% This code may be distributed under the terms of the
% GNU Public License, either version 2 of the license, or (at your
@@ -239,7 +239,8 @@
{} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
0 0 moveto
(5) stringwidth pop % newname dict w
- (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ (M) false charpath pathbbox newpath 4 1 roll pop pop pop
+ % newnamedict w h
3 2 roll % newname w h dict
dup length dict dup 3 1 roll begin % newname w h newdict
--- ogonkify/ptmb-o.pfa
+++ ogonkify/ptmb-o.pfa Thu Apr 19 15:09:48 2001
@@ -89,7 +89,7 @@
% By J. Chroboczek <jec@dcs.ed.ac.uk>
%
% -- code follows this line --
-%%BeginResource: procset compose 0.8 0
+%%BeginResource: procset compose 0.8 1
% Copyright (c) 1996-1999 by J. Chroboczek
% This code may be distributed under the terms of the
% GNU Public License, either version 2 of the license, or (at your
@@ -239,7 +239,8 @@
{} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
0 0 moveto
(5) stringwidth pop % newname dict w
- (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ (M) false charpath pathbbox newpath 4 1 roll pop pop pop
+ % newnamedict w h
3 2 roll % newname w h dict
dup length dict dup 3 1 roll begin % newname w h newdict
--- ogonkify/ptmbi-o.pfa
+++ ogonkify/ptmbi-o.pfa Thu Apr 19 15:09:49 2001
@@ -89,7 +89,7 @@
% By J. Chroboczek <jec@dcs.ed.ac.uk>
%
% -- code follows this line --
-%%BeginResource: procset compose 0.8 0
+%%BeginResource: procset compose 0.8 1
% Copyright (c) 1996-1999 by J. Chroboczek
% This code may be distributed under the terms of the
% GNU Public License, either version 2 of the license, or (at your
@@ -239,7 +239,8 @@
{} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
0 0 moveto
(5) stringwidth pop % newname dict w
- (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ (M) false charpath pathbbox newpath 4 1 roll pop pop pop
+ % newnamedict w h
3 2 roll % newname w h dict
dup length dict dup 3 1 roll begin % newname w h newdict
--- ogonkify/ptmr-o.pfa
+++ ogonkify/ptmr-o.pfa Thu Apr 19 15:09:48 2001
@@ -89,7 +89,7 @@
% By J. Chroboczek <jec@dcs.ed.ac.uk>
%
% -- code follows this line --
-%%BeginResource: procset compose 0.8 0
+%%BeginResource: procset compose 0.8 1
% Copyright (c) 1996-1999 by J. Chroboczek
% This code may be distributed under the terms of the
% GNU Public License, either version 2 of the license, or (at your
@@ -239,7 +239,8 @@
{} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
0 0 moveto
(5) stringwidth pop % newname dict w
- (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ (M) false charpath pathbbox newpath 4 1 roll pop pop pop
+ % newnamedict w h
3 2 roll % newname w h dict
dup length dict dup 3 1 roll begin % newname w h newdict
--- ogonkify/ptmri-o.pfa
+++ ogonkify/ptmri-o.pfa Thu Apr 19 15:09:48 2001
@@ -89,7 +89,7 @@
% By J. Chroboczek <jec@dcs.ed.ac.uk>
%
% -- code follows this line --
-%%BeginResource: procset compose 0.8 0
+%%BeginResource: procset compose 0.8 1
% Copyright (c) 1996-1999 by J. Chroboczek
% This code may be distributed under the terms of the
% GNU Public License, either version 2 of the license, or (at your
@@ -239,7 +239,8 @@
{} forall pop pop [ 5 1 roll 0 0] makefont setfont % newnamedict
0 0 moveto
(5) stringwidth pop % newname dict w
- (M) false charpath pathbbox 4 1 roll pop pop pop % newnamedict w h
+ (M) false charpath pathbbox newpath 4 1 roll pop pop pop
+ % newnamedict w h
3 2 roll % newname w h dict
dup length dict dup 3 1 roll begin % newname w h newdict

65
a2ps-4.13-security.patch Normal file
View File

@ -0,0 +1,65 @@
--- lib/routines.c
+++ lib/routines.c Fri Jan 5 12:51:20 2001
@@ -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;
+}
--- lib/routines.h
+++ lib/routines.h Fri Jan 5 12:37:53 2001
@@ -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

57
a2ps-4.13-space.patch Normal file
View File

@ -0,0 +1,57 @@
--- src/select.c
+++ src/select.c Sat Aug 21 12:05:31 2004
@@ -131,6 +131,36 @@
return 1;
}
+/* escapes the name of a file so that the shell groks it in 'single' q.marks.
+ The resulting pointer has to be free()ed when not longer used. */
+char *
+shell_escape(const char *fn)
+{
+ size_t len = 0;
+ const char *inp;
+ char *retval, *outp;
+
+ for(inp = fn; *inp; ++inp)
+ switch(*inp)
+ {
+ case '\'': len += 4; break;
+ default: len += 1; break;
+ }
+
+ outp = retval = malloc(len + 1);
+ if(!outp)
+ return NULL; /* perhaps one should do better error handling here */
+ for(inp = fn; *inp; ++inp)
+ switch(*inp)
+ {
+ case '\'': *outp++ = '\''; *outp++ = '\\'; *outp++ = '\'', *outp++ = '\''; break;
+ default: *outp++ = *inp; break;
+ }
+ *outp = 0;
+
+ return retval;
+}
+
/* What says file about the type of a file (result is malloc'd). NULL
if could not be run. */
@@ -144,11 +174,15 @@
if (IS_EMPTY (job->file_command))
return NULL;
+ filename = shell_escape(filename);
+ if(filename == NULL)
+ return NULL;
/* Call file(1) with the correct option */
- command = ALLOCA (char, (2
+ command = ALLOCA (char, (4
+ strlen (job->file_command)
+ ustrlen (filename)));
- sprintf (command, "%s %s", job->file_command, (const char *) filename);
+ sprintf (command, "%s '%s'", job->file_command, (const char *) filename);
+ free(filename);
message (msg_tool, (stderr, "Reading pipe: `%s'\n", command));
file_out = popen (command, "r");

249
a2ps-4.13-tempfile.patch Normal file
View File

@ -0,0 +1,249 @@
--- a2ps-4.13/contrib/card.m4
+++ a2ps-4.13/contrib/card.m4 Thu Mar 18 14:27:29 2004
@@ -27,7 +27,6 @@
print_form_feeds=:
RM="/bin/rm -rf"
tmp_dir=${TMPDIR-/tmp}/$program.$$
-tmp_file=$tmp_dir/card
success=false
verbose=:
version_short="card $card_version (@GNU_PACKAGE@ @VERSION@)"
@@ -111,8 +110,14 @@
fi
# Create a tmp dir and be ready to clean up
-trap "$RM $tmp_dir" 0 1 2 15
-(umask 077 && mkdir $tmp_dir) || exit 1
+if type -p mktemp > /dev/null 2>&1 ; then
+ tmp_dir="`mktemp -d ${tmp_dir}.XXXXXX`" || exit 1
+ trap "$RM $tmp_dir" 0 1 2 3 13 15
+else
+ trap "$RM $tmp_dir" 0 1 2 3 13 15
+ (umask 077 && mkdir $tmp_dir) || exit 1
+fi
+tmp_file=$tmp_dir/card
case $LC_ALL in
fr) footer="Engendré par $version_short" ;;
--- a2ps-4.13/contrib/fixnt.l
+++ a2ps-4.13/contrib/fixnt.l Thu Mar 18 14:20:59 2004
@@ -90,6 +90,7 @@
int ifcorel = 0;
int ifendsetup = 0;
int pid;
+int fd;
char fontfname[255];
char adobefname[255];
char bodyfname[255];
@@ -131,7 +132,9 @@
<NORMAL>%%Page:.*\n { /* read up to first page and just output everyting */
sprintf(bodyfname, "%s/fixnt_Body_%d", tmpdir, pid);
- body = fopen(bodyfname,"w+");
+ fd = mkstemp(bodyfname);
+ if (fd == -1) abort();
+ body = fdopen(fd,"w+");
fprintf(body,"%s",yytext);
BEGIN BODY;
}
@@ -143,7 +146,9 @@
<BODY>[/]Adobe_WinNT_Driver_Gfx[ ]175[ ]dict[ ]dup[ ]begin.*\n {
/* Adobe Stuff */
sprintf(adobefname, "%s/fixnt_Adobe_%d", tmpdir, pid);
- adobe = fopen(adobefname,"w+");
+ fd = mkstemp(adobefname);
+ if (fd == -1) abort();
+ adobe = fdopen(fd,"w+");
fprintf(adobe,"%s",yytext);
BEGIN ADOBE;
}
@@ -170,7 +175,9 @@
<BODY>(NTPSOct95[ ]){0,1}[/]FontSV[ ]save[ ](put|def).*\n {
/* font definitions from here on */
sprintf(fontfname, "%s/fixnt_Font_%d", tmpdir, pid);
- font = fopen(fontfname,"w+");
+ fd = mkstemp(fontfname);
+ if (fd == -1) abort();
+ font = fdopen(fd,"w+");
fprintf(font,"%s",yytext);
BEGIN FONT;
}
--- a2ps-4.13/contrib/fixps.m4
+++ a2ps-4.13/contrib/fixps.m4 Thu Mar 18 14:30:48 2004
@@ -101,15 +101,24 @@
exit 1;;
esac
-if test -n "$debug"; then
- # Set -x now if debugging
- set -x
+if type -p mktemp > /dev/null 2>&1 ; then
+ tmpdir="`mktemp -d ${tmpdir}.XXXXXX`" || exit 1
+ if test -n "$debug"; then
+ # Set -x now if debugging
+ set -x
+ else
+ trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
+ fi
else
- # Temp dir. Get ready not to leave junk (if not debugging)
- trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
+ if test -n "$debug"; then
+ # Set -x now if debugging
+ set -x
+ else
+ # Temp dir. Get ready not to leave junk (if not debugging)
+ trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
+ fi
+ (umask 077 && mkdir $tmpdir) || exit 1
fi
-
-mkdir $tmpdir
fixps_sed=$tmpdir/fixps.sed
# If printing from stdin, save into a tmp file
--- a2ps-4.13/contrib/pdiff.m4
+++ a2ps-4.13/contrib/pdiff.m4 Thu Mar 18 14:20:59 2004
@@ -20,7 +20,6 @@
diff_options='-u'
file=
output=
-tmpdir=/tmp/$program.$$
verbose=echo
wdiff_prog=${WDIFF:-wdiff}
wdiff_options='-w[wd- -x-wd] -y{wd+ -z+wd}'
--- a2ps-4.13/contrib/psmandup.m4
+++ a2ps-4.13/contrib/psmandup.m4 Thu Mar 18 14:32:22 2004
@@ -22,7 +22,7 @@
message=
psselect=${PSSELECT:-psselect}
psset=${PSSET:-psset}
-tmpdir=/tmp/$program.$$
+tmpdir=${TMPDIR-/tmp}/$program.$$
# These two must be kept in synch. They are opposed.
verbose=echo
@@ -95,15 +95,25 @@
exit 1;;
esac
-if test -n "$debug"; then
- # Set -x now if debugging
- set -x
+if type -p mktemp > /dev/null 2>&1 ; then
+ tmpdir="`mktemp -d ${tmpdir}.XXXXXX`" || exit 1
+ if test -n "$debug"; then
+ # Set -x now if debugging
+ set -x
+ else
+ # Temp dir. Get ready not to leave junk (if not debugging)
+ trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
+ fi
else
- # Temp dir. Get ready not to leave junk (if not debugging)
- trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
+ if test -n "$debug"; then
+ # Set -x now if debugging
+ set -x
+ else
+ # Temp dir. Get ready not to leave junk (if not debugging)
+ trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
+ fi
+ (umask 077 && mkdir $tmpdir) || exit 1
fi
-
-mkdir $tmpdir
# If printing from stdin, save into a tmp file
if test $file = '-'; then
--- a2ps-4.13/contrib/psset.m4
+++ a2ps-4.13/contrib/psset.m4 Thu Mar 18 14:33:31 2004
@@ -20,7 +20,6 @@
pagedevices= # `;' separated list of `key:value'
quiet=: # i.e., verbose
tmpdir=${TMPDIR:-/tmp}/$program.$$
-sedscript=$tmpdir/psset.sed
# The version/usage strings
version="$program 1.3 (@GNU_PACKAGE@ @VERSION@)
@@ -106,15 +105,26 @@
exit 1;;
esac
-mkdir $tmpdir
-
-if test -n "$debug"; then
- # Set -x now if debugging
- set -x
+if type -p mktemp > /dev/null 2>&1 ; then
+ tmpdir="`mktemp -d ${tmpdir}.XXXXXX`" || exit 1
+ if test -n "$debug"; then
+ # Set -x now if debugging
+ set -x
+ else
+ # Temp dir. Get ready not to leave junk (if not debugging)
+ trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
+ fi
else
- # Temp dir. Get ready not to leave junk (if not debugging)
- trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
+ if test -n "$debug"; then
+ # Set -x now if debugging
+ set -x
+ else
+ # Temp dir. Get ready not to leave junk (if not debugging)
+ trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
+ fi
+ (umask 077 && mkdir $tmpdir) || exit 1
fi
+sedscript=$tmpdir/psset.sed
# Well, if there is nothing to do, just do nothing.
if test -z "$pagedevices"; then
--- a2ps-4.13/contrib/texi2dvi4a2ps
+++ a2ps-4.13/contrib/texi2dvi4a2ps Thu Mar 18 14:34:56 2004
@@ -198,13 +198,21 @@
;;
esac
-# Prepare the temporary directory. Remove it at exit, unless debugging.
-if test -z "$debug"; then
- trap "cd / && rm -rf $tmpdir" 0 1 2 15
+if type -p mktemp > /dev/null 2>&1 ; then
+ # Create the temporary directory with strict rights
+ tmpdir="`mktemp -d ${tmpdir}.XXXXXX`" || exit 1
+ # Prepare the temporary directory. Remove it at exit, unless debugging.
+ if test -z "$debug"; then
+ trap "cd / && rm -rf $tmpdir" 0 1 2 3 13 15
+ fi
+else
+ # Prepare the temporary directory. Remove it at exit, unless debugging.
+ if test -z "$debug"; then
+ trap "cd / && rm -rf $tmpdir" 0 1 2 3 13 15
+ fi
+ # Create the temporary directory with strict rights
+ (umask 077 && mkdir $tmpdir) || exit 1
fi
-
-# Create the temporary directory with strict rights
-(umask 077 && mkdir $tmpdir) || exit 1
# Prepare the tools we might need. This may be extra work in some
# cases, but improves the readibility of the script.
--- a2ps-4.13/contrib/emacs/elisp-comp
+++ a2ps-4.13/contrib/emacs/elisp-comp Thu Mar 18 14:36:40 2004
@@ -35,8 +35,12 @@
EMACS=emacs
fi
- tempdir=elc.$$
- mkdir $tempdir
+ if type -p mktemp > /dev/null 2>&1 ; then
+ tempdir="`mktemp -d elc.XXXXXX`" || exit 1
+ else
+ tempdir=elc.$$
+ mkdir $tempdir || exit 1
+ fi
cp $* $tempdir
cd $tempdir

1421
a2ps-4.13.dif Normal file

File diff suppressed because it is too large Load Diff

3
a2ps-4.13b.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:be4e44b3ef7c40012d2dec2b03b4c07df94d795ea221d274e8a2297e5a849e80
size 1458277

1448
a2ps-ko.po Normal file

File diff suppressed because it is too large Load Diff

278
a2ps.changes Normal file
View File

@ -0,0 +1,278 @@
-------------------------------------------------------------------
Fri May 19 13:12:57 CEST 2006 - werner@suse.de
- Fix reencode_font macro in base.ps (bug #176360)
-------------------------------------------------------------------
Thu Apr 27 16:06:57 CEST 2006 - cthiel@suse.de
- removed acroread from BuildRequires
- added patch to fake acoread on ix86 and x86_64
-------------------------------------------------------------------
Thu Feb 23 13:37:14 CET 2006 - werner@suse.de
- Use w3m to get ascii from html and the use a2ps its self to
get PostScript out of ASCII. (bug #152470)
-------------------------------------------------------------------
Wed Jan 25 21:34:04 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Sat Jan 14 21:47:01 CET 2006 - schwab@suse.de
- Don't strip binaries.
-------------------------------------------------------------------
Thu Jan 12 12:29:58 CET 2006 - werner@suse.de
- Use the gcc stack protector
-------------------------------------------------------------------
Fri Dec 2 14:04:15 CET 2005 - werner@suse.de
- Fix handling of long options without arguments in a2ps script
-------------------------------------------------------------------
Tue Sep 20 14:02:34 CEST 2005 - yxu@suse.de
- Add prototypes for functions
-------------------------------------------------------------------
Fri Jun 17 12:03:06 CEST 2005 - werner@suse.de
- The pdiff requires wdiff (bug #91335)
-------------------------------------------------------------------
Fri May 13 16:45:51 CEST 2005 - werner@suse.de
- Allow spaces in file names
-------------------------------------------------------------------
Fri May 13 13:08:03 CEST 2005 - werner@suse.de
- Add a wrapper script for converting UTF-8 text _partly_ into the
natural latin encoding of the given language enviroment (#43348)
-------------------------------------------------------------------
Sat Apr 2 21:02:39 CEST 2005 - coolo@suse.de
- remove conflicting prototype
-------------------------------------------------------------------
Mon Oct 25 12:00:32 CEST 2004 - ro@suse.de
- locale rename: no -> nb
-------------------------------------------------------------------
Wed Aug 25 17:32:26 CEST 2004 - werner@suse.de
- Escapes file names so that the shell groks it in single quotes
-------------------------------------------------------------------
Thu Mar 18 14:49:17 CET 2004 - werner@suse.de
- More temporary file security issues (bug #36368)
-------------------------------------------------------------------
Wed Aug 6 17:55:05 CEST 2003 - werner@suse.de
- Partly workaround for ASCII and UTF-8 (mapp them to ISO 8859-15,
bug #28348)
-------------------------------------------------------------------
Mon Jul 28 14:47:46 CEST 2003 - werner@suse.de
- Fix keyword Lette(r) (bug #27411)
-------------------------------------------------------------------
Wed Jun 11 05:09:40 CEST 2003 - kukuk@suse.de
- Use %find_lang macro
- Fix filelist
- Fix neededforbuild for emacs
-------------------------------------------------------------------
Thu Apr 24 12:20:23 CEST 2003 - ro@suse.de
- fix install_info --delete call and move from preun to postun
-------------------------------------------------------------------
Tue Feb 11 14:26:19 CET 2003 - kukuk@suse.de
- Add install-info macros [Bug #23390]
-------------------------------------------------------------------
Mon Nov 11 23:49:55 CET 2002 - ro@suse.de
- changed neededforbuild <xshared> to <x-devel-packages>
-------------------------------------------------------------------
Wed Sep 18 01:21:38 CEST 2002 - ro@suse.de
- removed bogus self-provides
-------------------------------------------------------------------
Sun Jul 28 15:37:14 CEST 2002 - kukuk@suse.de
- remove bzip from neededforbuild
-------------------------------------------------------------------
Thu Jul 4 17:43:20 CEST 2002 - werner@suse.de
- Add README's and a2ps.html to package doc dir (bug # 16229)
-------------------------------------------------------------------
Thu May 23 17:29:31 CEST 2002 - ro@suse.de
- use libdir
-------------------------------------------------------------------
Mon Feb 25 16:35:43 CET 2002 - pblahos@suse.cz
- filtering mozilla output in iso-8859-2 removed, mozilla does it
correctly now, only stripping Title.
-------------------------------------------------------------------
Wed Jan 23 15:20:25 CET 2002 - okir@suse.de
- Fixed tempfile problem in fixnt
-------------------------------------------------------------------
Fri Dec 7 12:19:38 CET 2001 - werner@suse.de
- Enable automagic LC_PAPER and LC_CTYPE detection within
a2ps-site.cfg
-------------------------------------------------------------------
Fri Aug 31 12:21:23 CEST 2001 - pblahos@suse.cz
- implemented filtering of mozilla output in iso-8859-2
-------------------------------------------------------------------
Fri Jul 20 12:06:43 CEST 2001 - kukuk@suse.de
- changed neededforbuild <gs_lib> to <ghostscript-library>
-------------------------------------------------------------------
Mon May 7 19:26:59 CEST 2001 - mfabian@suse.de
- bzip2 sources
-------------------------------------------------------------------
Thu Apr 26 18:57:06 CEST 2001 - werner@suse.de
- We've to use dots within floats (#7284)
- Fix manual page (#7192)
-------------------------------------------------------------------
Tue Apr 24 16:26:45 CEST 2001 - werner@suse.de
- Add Euro symbol to afm of ogonkify fonts
- Implement code to be able to use LC_PAPER and LC_CTYPE for
paper size and default encoding.
-------------------------------------------------------------------
Thu Apr 19 18:41:36 CEST 2001 - werner@suse.de
- Use newest ogonkify to get eurifyFont working
- Include dummy metric for Euro sign to get it work with
ghostscript and real PostScript printers (ogonkify -e L9 -E)
-------------------------------------------------------------------
Wed Mar 14 08:35:39 CET 2001 - ro@suse.de
- use emacs-x11 for now
-------------------------------------------------------------------
Tue Mar 13 12:28:23 CET 2001 - ro@suse.de
- added emacs-nox to neededforbuild
-------------------------------------------------------------------
Fri Jan 26 10:47:28 CET 2001 - violiet@suse.de
- remove Korean filter file = a2ps-h
-------------------------------------------------------------------
Tue Jan 23 21:03:12 CET 2001 - violiet@suse.de
- added Korean filter file = a2ps-h
- improvement Korean message file.
-------------------------------------------------------------------
Mon Jan 15 12:49:30 CET 2001 - werner@suse.de
- Fix the temporary file patch.
-------------------------------------------------------------------
Wed Jan 10 16:37:33 CET 2001 - werner@suse.de
- Add temporary file patch
-------------------------------------------------------------------
Fri Nov 17 15:28:36 CET 2000 - werner@suse.de
- Update to version 4.13(b)
- Include some package to use automatic configuration for
- Set PSFONT_PATH to /usr/share/ghostscript/fonts
-------------------------------------------------------------------
Fri Nov 17 08:46:29 CET 2000 - ro@suse.de
- ge_exec -> emacs
-------------------------------------------------------------------
Fri Jul 7 00:43:47 CEST 2000 - ro@suse.de
- merged patches
-------------------------------------------------------------------
Thu Jul 6 19:02:52 CEST 2000 - werner@suse.de
- Add `,' to atan2 in for77kwds.ssh to distinguish atan2 from cabs.
-------------------------------------------------------------------
Fri Apr 7 22:51:00 CEST 2000 - bk@suse.de
- added suse update config macro
-------------------------------------------------------------------
Fri Feb 25 11:24:24 CET 2000 - kukuk@suse.de
- Fill out copyright and group tag
- Move /usr/{info,man} -> /usr/share/{info,man}
-------------------------------------------------------------------
Thu Jan 13 17:23:53 CET 2000 - werner@suse.de
- Fix a2ps path in a2ps.el
- Add all page names and their sizes known by ghostscript
-------------------------------------------------------------------
Thu Dec 16 15:27:31 CET 1999 - werner@suse.de
- Fix Bug (NULL pointer if --title="" is used)
- Remove Makefile.Linux
-------------------------------------------------------------------
Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
----------------------------------------------------------------------
Mon Jul 19 09:23:55 MEST 1999 - florian@suse.de
- update to a2ps 4.12
----------------------------------------------------------------------
Wed Oct 29 23:36:39 MET 1997 - florian@suse.de
- add missing patch detectet by Werner Fink
----------------------------------------------------------------------
Added the changes from Andreas Klemm for apsfilter into /usr/bin/a2ps.
aps could use standard /usr/bin/a2ps now.

109
a2ps.sh Normal file
View File

@ -0,0 +1,109 @@
#!/bin/bash
#
# a2ps.sh: Simple workaround for getting a2ps handling
# UTF-8 partly. Partly means that iconv is
# used to get the UTF-8 encoding into the
# natural laint encoding of the base language
# provided by the enviroment variable LANG.
#
# Author: Werner Fink <werner@suse.de>
#
if test "${LANG#*.}" != "UTF-8" ; then
exec -a a2ps a2ps.bin ${1+"$@"}
fi
ENC=$(LANG=${LANG%.*}; locale charmap 2> /dev/null)
test "$ENC" = "ISO-8859-1" && ENC=ISO-8859-15
test "${LANG%.*}" = "en_US" && ENC=ISO-8859-1
case "${ENC%-*}" in
ISO-8859|KOI8) ;;
*) exec -a a2ps a2ps.bin -X $ENC ${1+"$@"}
esac
#
# All long options of a2ps
#
LONG="version,help,guess,which,glob,list:,quiet,silent,verbose::,user-option:,debug,define:,\
medium:,landscape,portrait,columns:,rows:,major:,file-align:borders,margin::,line-numbers:,\
font-size:,lines-per-page:,chars-per-line:,catman,tabsize:,non-printable-format:,\
no-header,header::,underlay::,center-title::,left-title::,right-title::,left-footer::,\
footer::,right-footer::,pages::,truncate-lines,interpret,end-of-line:,encoding:,\
title:,stdin:,print-anyway,delegate,toc::,pretty-print::,highlight-level:,strip-level:,\
output:,version-control:,suffix:,printer:,prologue:,ppd::,copies:,sides:,setpagedevice:,\
statusdict:,page-prefeed,no-page-prefeed"
#
# All normal options of a2ps
#
SHORT="qv::=:D:M:,r,R,1,2,3,4,5,6,7,8,9,A:,j,C,f:,L:,l:,m,T:,B,b:,u:,a::,\
c,i,X:,t:,Z,E::,g,o:,P:,d,n:,s:,S:,k,K"
#
# We need the file names provided on the command line
# or the information if we read from stdin.
#
CMDLINE=$(getopt -o $SHORT -l $LONG -s bash -q -- ${1+"$@"})
if test $? -ne 0 ; then
# Let a2ps do the error message
exec -a a2ps a2ps.bin ${1+"$@"}
fi
#
# Why sed? Just to get the `=' back instead of ` ' the
# empty space which are inserted by getopt(1)
#
CMDLINE=$(echo "$CMDLINE" | LC_ALL=POSIX sed "s|--\([a-z-]\+\) \?\('\)|--\1=\2|g")
#
# Just for encoding given on command line:
# allow the user to overwrite autodetection
#
case "${CMDLINE}" in
*-X\ \'UTF-8\'*|*--encoding=\'UTF-8\'*)
;; # handle this below
*-X*|*--encoding=*|*--version*|*--help*|*--which*|*--glob*|*--list=*)
exec -a a2ps a2ps.bin ${1+"$@"}
esac
#
# To not fool the bash with eval here
#
FILES=$(echo "$CMDLINE" | LC_ALL=POSIX sed "s|.* -- \?\(.*\)|\1|")
CMDLINE=$(echo "$CMDLINE" | LC_ALL=POSIX sed "s|\(.*\) -- \?.*|\1|")
test -z "$FILES" && FILES="'-'"
if test "$FILES" != "'-'" ; then
#
# We have real files, maybe with spaces in their path name
#
eval set -- "$CMDLINE"
eval fa=("$FILES")
for f in "${fa[@]}" ; do
case "$(file -b "$f" 2> /dev/null)" in
ISO-8859*text)
iconv -c -f ISO-8859-1 -t $ENC < "$f" | a2ps.bin -X $ENC --stdin="$f" ${1+"$@"}
stat=$?
;;
UTF-8*text)
iconv -c -f UTF-8 -t $ENC < "$f" | a2ps.bin -X $ENC --stdin="$f" ${1+"$@"}
stat=$?
;;
ASCII*text|*)
a2ps.bin -X $ENC ${1+"$@"} "$f"
stat=$?
;;
esac
test $stat -eq 0 || exit $stat
done
exit 0
fi
#
# Just handle stdin at last but not least
#
cat - | iconv -c -f UTF-8 -t $ENC | a2ps.bin -X $ENC ${1+"$@"}
exit $?

261
a2ps.spec Normal file
View File

@ -0,0 +1,261 @@
#
# spec file for package a2ps (Version 4.13)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: a2ps
BuildRequires: autoconf automake emacs-nox ghostscript-fonts-std gv psutils te_ams te_latex xorg-x11-devel
URL: http://www.gnu.org/software/a2ps/a2ps.html
License: GPL
Group: Productivity/Publishing/PS
Provides: a2ps-bin
Requires: /bin/sed /usr/bin/iconv /usr/bin/file /usr/bin/wdiff /usr/bin/w3m ghostscript-fonts-std
Autoreqprov: on
PreReq: %{install_info_prereq}
Version: 4.13
Release: 1077
Summary: Converts ASCII Text into PostScript
Source: a2ps-4.13b.tar.bz2
Source1: a2ps-ko.po
Source2: a2ps.sh
Patch: a2ps-4.13.dif
Patch1: a2ps-4.13-security.patch
Patch2: a2ps-4.13-ogonkify.patch
Patch3: a2ps-4.13-tempfile.patch
Patch4: a2ps-4.13-space.patch
Patch5: a2ps-4.13-nb.patch
Patch6: a2ps-4.13-include.patch
Patch7: a2ps-4.13-acroread.patch
Patch8: a2ps-4.13-base.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
a2ps converts ASCII text into PostScript. This feature is used by
apsfilter, for example, to pretty-print ASCII text.
Authors:
--------
Miguel Santana <M.Santana@frgu.bull.fr>
%prep
%setup -n a2ps-4.13
touch -r configure.in .ref
%patch -P 1 -p 0 -b .security
%patch -P 2 -p 0 -b .ogonkify
%patch -P 3 -p 1 -b .tempfile
%patch -P 4 -p 0 -b .space
%patch -P 5 -p 0 -b .nb
%patch -P 6 -p 1 -b .incld
%ifarch %ix86 x86_64
%patch -P 7 -p 0 -b .acroread
%endif
%patch -P 8 -p 0 -b .base
%patch
cp -f %SOURCE1 po/ko.po
rename no nb po/no.*
%build
%{?suse_update_config:%{suse_update_config -f auxdir}}
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -funroll-loops -Wall -pipe -fstack-protector"
export LPR=lpr
export CC=gcc
export LEX="flex -Cfe"
touch -r .ref configure.in
sh ./configure ${RPM_ARCH}-suse-linux \
--with-gnu-ld \
--prefix=/usr \
--libdir=/usr/%_lib \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--with-medium=LC_PAPER \
--with-encoding=LC_CTYPE \
--sysconfdir=/etc
con=""
for m4 in contrib/*.m4; do
in=${m4%.*}.in
rm -f ${in} ${m4%.*}
con="$con ${in##*/}"
done
make -C contrib/ ${con}
sh ./config.status
make PSFONT_PATH=/usr/share/ghostscript/fonts
pushd doc
texi2html a2ps.texi
popd
%install
make install DESTDIR=$RPM_BUILD_ROOT PSFONT_PATH=/usr/share/ghostscript/fonts
rm -r $RPM_BUILD_ROOT/%{_infodir}/regex*
rm -r $RPM_BUILD_ROOT/%{_infodir}/dir
mv $RPM_BUILD_ROOT/usr/bin/a2ps $RPM_BUILD_ROOT/usr/bin/a2ps.bin
install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/usr/bin/a2ps
%{find_lang} %{name}
%clean
test -n "$RPM_BUILD_ROOT" && rm -rf $RPM_BUILD_ROOT
%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/ogonkify.info.gz
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ogonkify.info.gz
%files -f %{name}.lang
%doc AUTHORS COPYING ABOUT-NLS FAQ ChangeLog NEWS THANKS README doc/a2ps.html
%config /etc/a2ps-site.cfg
%config /etc/a2ps.cfg
/usr/bin/a2ps
/usr/bin/a2ps.bin
/usr/bin/card
/usr/bin/composeglyphs
/usr/bin/fixnt
/usr/bin/fixps
/usr/bin/ogonkify
/usr/bin/pdiff
/usr/bin/psmandup
/usr/bin/psset
/usr/bin/texi2dvi4a2ps
/usr/include/liba2ps.h
%doc %{_infodir}/*.gz
/usr/%_lib/liba2ps.a
/usr/%_lib/liba2ps.la
%doc %{_mandir}/man1/*.1.gz
/usr/share/a2ps
/usr/share/emacs/site-lisp/*.el
/usr/share/emacs/site-lisp/*.elc
/usr/share/ogonkify
%changelog -n a2ps
* Fri May 19 2006 - werner@suse.de
- Fix reencode_font macro in base.ps (bug #176360)
* Thu Apr 27 2006 - cthiel@suse.de
- removed acroread from BuildRequires
- added patch to fake acoread on ix86 and x86_64
* Thu Feb 23 2006 - werner@suse.de
- Use w3m to get ascii from html and the use a2ps its self to
get PostScript out of ASCII. (bug #152470)
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Sat Jan 14 2006 - schwab@suse.de
- Don't strip binaries.
* Thu Jan 12 2006 - werner@suse.de
- Use the gcc stack protector
* Fri Dec 02 2005 - werner@suse.de
- Fix handling of long options without arguments in a2ps script
* Tue Sep 20 2005 - yxu@suse.de
- Add prototypes for functions
* Fri Jun 17 2005 - werner@suse.de
- The pdiff requires wdiff (bug #91335)
* Fri May 13 2005 - werner@suse.de
- Allow spaces in file names
* Fri May 13 2005 - werner@suse.de
- Add a wrapper script for converting UTF-8 text _partly_ into the
natural latin encoding of the given language enviroment (#43348)
* Sat Apr 02 2005 - coolo@suse.de
- remove conflicting prototype
* Mon Oct 25 2004 - ro@suse.de
- locale rename: no -> nb
* Wed Aug 25 2004 - werner@suse.de
- Escapes file names so that the shell groks it in single quotes
* Thu Mar 18 2004 - werner@suse.de
- More temporary file security issues (bug #36368)
* Wed Aug 06 2003 - werner@suse.de
- Partly workaround for ASCII and UTF-8 (mapp them to ISO 8859-15,
bug #28348)
* Mon Jul 28 2003 - werner@suse.de
- Fix keyword Lette(r) (bug #27411)
* Wed Jun 11 2003 - kukuk@suse.de
- Use %%find_lang macro
- Fix filelist
- Fix neededforbuild for emacs
* Thu Apr 24 2003 - ro@suse.de
- fix install_info --delete call and move from preun to postun
* Tue Feb 11 2003 - kukuk@suse.de
- Add install-info macros [Bug #23390]
* Mon Nov 11 2002 - ro@suse.de
- changed neededforbuild <xshared> to <x-devel-packages>
* Wed Sep 18 2002 - ro@suse.de
- removed bogus self-provides
* Sun Jul 28 2002 - kukuk@suse.de
- remove bzip from neededforbuild
* Thu Jul 04 2002 - werner@suse.de
- Add README's and a2ps.html to package doc dir (bug # 16229)
* Thu May 23 2002 - ro@suse.de
- use libdir
* Mon Feb 25 2002 - pblahos@suse.cz
- filtering mozilla output in iso-8859-2 removed, mozilla does it
correctly now, only stripping Title.
* Wed Jan 23 2002 - okir@suse.de
- Fixed tempfile problem in fixnt
* Fri Dec 07 2001 - werner@suse.de
- Enable automagic LC_PAPER and LC_CTYPE detection within
a2ps-site.cfg
* Fri Aug 31 2001 - pblahos@suse.cz
- implemented filtering of mozilla output in iso-8859-2
* Fri Jul 20 2001 - kukuk@suse.de
- changed neededforbuild <gs_lib> to <ghostscript-library>
* Mon May 07 2001 - mfabian@suse.de
- bzip2 sources
* Thu Apr 26 2001 - werner@suse.de
- We've to use dots within floats (#7284)
- Fix manual page (#7192)
* Tue Apr 24 2001 - werner@suse.de
- Add Euro symbol to afm of ogonkify fonts
- Implement code to be able to use LC_PAPER and LC_CTYPE for
paper size and default encoding.
* Thu Apr 19 2001 - werner@suse.de
- Use newest ogonkify to get eurifyFont working
- Include dummy metric for Euro sign to get it work with
ghostscript and real PostScript printers (ogonkify -e L9 -E)
* Wed Mar 14 2001 - ro@suse.de
- use emacs-x11 for now
* Tue Mar 13 2001 - ro@suse.de
- added emacs-nox to neededforbuild
* Fri Jan 26 2001 - violiet@suse.de
- remove Korean filter file = a2ps-h
* Tue Jan 23 2001 - violiet@suse.de
- added Korean filter file = a2ps-h
- improvement Korean message file.
* Mon Jan 15 2001 - werner@suse.de
- Fix the temporary file patch.
* Wed Jan 10 2001 - werner@suse.de
- Add temporary file patch
* Fri Nov 17 2000 - werner@suse.de
- Update to version 4.13(b)
- Include some package to use automatic configuration for
- Set PSFONT_PATH to /usr/share/ghostscript/fonts
* Fri Nov 17 2000 - ro@suse.de
- ge_exec -> emacs
* Fri Jul 07 2000 - ro@suse.de
- merged patches
* Thu Jul 06 2000 - werner@suse.de
- Add `,' to atan2 in for77kwds.ssh to distinguish atan2 from cabs.
* Fri Apr 07 2000 - bk@suse.de
- added suse update config macro
* Fri Feb 25 2000 - kukuk@suse.de
- Fill out copyright and group tag
- Move /usr/{info,man} -> /usr/share/{info,man}
* Thu Jan 13 2000 - werner@suse.de
- Fix a2ps path in a2ps.el
- Add all page names and their sizes known by ghostscript
* Thu Dec 16 1999 - werner@suse.de
- Fix Bug (NULL pointer if --title="" is used)
- Remove Makefile.Linux
* Mon Sep 13 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Mon Jul 19 1999 - florian@suse.de
- update to a2ps 4.12
* Wed Oct 29 1997 - florian@suse.de
- add missing patch detectet by Werner Fink
Added the changes from Andreas Klemm for apsfilter into /usr/bin/a2ps.
aps could use standard /usr/bin/a2ps now.

0
ready Normal file
View File