diff options
author | salo <salo@pkgsrc.org> | 2005-03-17 12:24:13 +0000 |
---|---|---|
committer | salo <salo@pkgsrc.org> | 2005-03-17 12:24:13 +0000 |
commit | e45fa5c50d58fa1b59296ec25ecbb75e8ca69539 (patch) | |
tree | 8789d67145806457ad4aa93c7bcaf088a9da32ab /print/enscript | |
parent | dfe733b9d0ad6ce6cf5e5c0bfcd5b86e3bb92ad2 (diff) | |
download | pkgsrc-e45fa5c50d58fa1b59296ec25ecbb75e8ca69539.tar.gz |
Update to version 1.6.3nb1
nb1:
====
- security fixes for CAN-2004-1184, CAN-2004-1185, CAN-2004-1186
- patches from Debian/Gentoo
- addresses PR pkg/29721
1.6.3:
======
- Changes in the highlighting / pretty printing
- Support for state inheritance.
- new highlighting rules
- new output language `ansi' to print color outputs
- new encodings
- new options
Diffstat (limited to 'print/enscript')
-rw-r--r-- | print/enscript/DESCR | 13 | ||||
-rw-r--r-- | print/enscript/Makefile | 12 | ||||
-rw-r--r-- | print/enscript/PLIST | 162 | ||||
-rw-r--r-- | print/enscript/distinfo | 13 | ||||
-rw-r--r-- | print/enscript/patches/patch-aa | 78 | ||||
-rw-r--r-- | print/enscript/patches/patch-ab | 85 | ||||
-rw-r--r-- | print/enscript/patches/patch-ad | 78 | ||||
-rw-r--r-- | print/enscript/patches/patch-ae | 14 |
8 files changed, 304 insertions, 151 deletions
diff --git a/print/enscript/DESCR b/print/enscript/DESCR index f1466c704e2..8e4a5c58b77 100644 --- a/print/enscript/DESCR +++ b/print/enscript/DESCR @@ -1,8 +1,5 @@ -This is a filter that converts text files to -PostScript and spools generated PostScript -output to the specified printer or leaves -it to file. If no input files are given, -enscript processes standard input. enscript -can be extended to handle different output media -and it has many options which can be used to -customize printouts. +This is a filter that converts text files to PostScript and spools generated +PostScript output to the specified printer or leaves it to file. If no +input files are given, enscript processes standard input. enscript can be +extended to handle different output media and it has many options which can +be used to customize printouts. diff --git a/print/enscript/Makefile b/print/enscript/Makefile index edcf1544151..b6aa7d551d0 100644 --- a/print/enscript/Makefile +++ b/print/enscript/Makefile @@ -1,11 +1,10 @@ -# $NetBSD: Makefile,v 1.26 2004/05/28 00:54:50 lukem Exp $ -# FreeBSD Id: Makefile,v 1.4 1997/11/27 08:10:30 tg Exp +# $NetBSD: Makefile,v 1.27 2005/03/17 12:24:13 salo Exp $ # -DISTNAME= enscript-1.6.1 -PKGREVISION= 2 +DISTNAME= enscript-1.6.3 +PKGREVISION= 1 CATEGORIES= print -MASTER_SITES= ${MASTER_SITE_GNU:=enscript/} +MASTER_SITES= http://www.iki.fi/mtr/genscript/ MAINTAINER= tech-pkg@NetBSD.org HOMEPAGE= http://people.ssh.fi/mtr/genscript/ @@ -17,6 +16,7 @@ GNU_CONFIGURE= yes USE_BUILDLINK3= yes USE_PKGLOCALEDIR= yes USE_PKGINSTALL= yes +USE_GNU_TOOLS+= make CONFIGURE_ARGS+= --sysconfdir="${PKG_SYSCONFDIR}" @@ -28,4 +28,6 @@ CONF_FILES= ${EGDIR}/enscript.cfg ${PKG_SYSCONFDIR}/enscript.cfg CONFIGURE_ARGS+=--with-media="${PAPERSIZE}" .endif +.include "../../devel/gettext-lib/buildlink3.mk" + .include "../../mk/bsd.pkg.mk" diff --git a/print/enscript/PLIST b/print/enscript/PLIST index 8f23966cf0d..423037c5a88 100644 --- a/print/enscript/PLIST +++ b/print/enscript/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.3 2003/05/01 12:58:15 jmmv Exp $ +@comment $NetBSD: PLIST,v 1.4 2005/03/17 12:24:13 salo Exp $ bin/diffpp bin/enscript bin/mkafmmap @@ -10,76 +10,154 @@ man/man1/enscript.1 man/man1/sliceprint.1 man/man1/states.1 share/enscript/88591.enc +share/enscript/885910.enc share/enscript/88592.enc share/enscript/88593.enc share/enscript/88594.enc share/enscript/88595.enc share/enscript/88597.enc +share/enscript/88599.enc share/enscript/a2ps.hdr -share/enscript/agd.afm -share/enscript/agdo.afm -share/enscript/agw.afm -share/enscript/agwo.afm +share/enscript/afm/agd.afm +share/enscript/afm/agdo.afm +share/enscript/afm/agw.afm +share/enscript/afm/agwo.afm +share/enscript/afm/bkd.afm +share/enscript/afm/bkdi.afm +share/enscript/afm/bkl.afm +share/enscript/afm/bkli.afm +share/enscript/afm/cob.afm +share/enscript/afm/cobo.afm +share/enscript/afm/com.afm +share/enscript/afm/coo.afm +share/enscript/afm/font.map +share/enscript/afm/hv.afm +share/enscript/afm/hvb.afm +share/enscript/afm/hvbo.afm +share/enscript/afm/hvc.afm +share/enscript/afm/hvcb.afm +share/enscript/afm/hvcbo.afm +share/enscript/afm/hvcdo.afm +share/enscript/afm/hvn.afm +share/enscript/afm/hvnb.afm +share/enscript/afm/hvnbo.afm +share/enscript/afm/hvno.afm +share/enscript/afm/hvo.afm +share/enscript/afm/matrix.afm +share/enscript/afm/matrix.pfa +share/enscript/afm/ncb.afm +share/enscript/afm/ncbi.afm +share/enscript/afm/nci.afm +share/enscript/afm/ncr.afm +share/enscript/afm/pob.afm +share/enscript/afm/pobi.afm +share/enscript/afm/poi.afm +share/enscript/afm/por.afm +share/enscript/afm/sy.afm +share/enscript/afm/tib.afm +share/enscript/afm/tibi.afm +share/enscript/afm/tii.afm +share/enscript/afm/tir.afm +share/enscript/afm/zcmi.afm +share/enscript/afm/zd.afm share/enscript/ascii.enc share/enscript/asciidkno.enc share/enscript/asciifise.enc -share/enscript/bkd.afm -share/enscript/bkdi.afm -share/enscript/bkl.afm -share/enscript/bkli.afm -share/enscript/cob.afm -share/enscript/cobo.afm -share/enscript/com.afm -share/enscript/coo.afm share/enscript/edd.hdr share/enscript/emacs.hdr +share/enscript/enscript-color.hdr share/enscript/enscript.hdr share/enscript/enscript.pro -share/enscript/enscript.st -share/enscript/font.map share/enscript/frame.hdr +share/enscript/hl/ada.st +share/enscript/hl/asm.st +share/enscript/hl/awk.st +share/enscript/hl/bash.st +share/enscript/hl/c.st +share/enscript/hl/c_comment.st +share/enscript/hl/c_ppline.st +share/enscript/hl/c_string.st +share/enscript/hl/changelog.st +share/enscript/hl/cpp.st +share/enscript/hl/csh.st +share/enscript/hl/default_faces.st +share/enscript/hl/delphi.st +share/enscript/hl/describe_languages.st +share/enscript/hl/diff.st +share/enscript/hl/diffs.st +share/enscript/hl/diffu.st +share/enscript/hl/elisp.st +share/enscript/hl/enscript.st +share/enscript/hl/fortran.st +share/enscript/hl/fortran_pp.st +share/enscript/hl/haskell.st +share/enscript/hl/html.st +share/enscript/hl/idl.st +share/enscript/hl/inf.st +share/enscript/hl/java.st +share/enscript/hl/javascript.st +share/enscript/hl/ksh.st +share/enscript/hl/lang_ansi.st +share/enscript/hl/lang_enscript.st +share/enscript/hl/lang_html.st +share/enscript/hl/lang_overstrike.st +share/enscript/hl/lang_rtf.st +share/enscript/hl/lang_texinfo.st +share/enscript/hl/m4.st +share/enscript/hl/mail.st +share/enscript/hl/makefile.st +share/enscript/hl/maple.st +share/enscript/hl/matlab.st +share/enscript/hl/modula_2.st +share/enscript/hl/nested.st +share/enscript/hl/nroff.st +share/enscript/hl/objc.st +share/enscript/hl/outline.st +share/enscript/hl/pascal.st +share/enscript/hl/passthrough.st +share/enscript/hl/perl.st +share/enscript/hl/postscript.st +share/enscript/hl/python.st +share/enscript/hl/rfc.st +share/enscript/hl/scheme.st +share/enscript/hl/sh.st +share/enscript/hl/skill.st +share/enscript/hl/sql.st +share/enscript/hl/states.st +share/enscript/hl/style_a2ps.st +share/enscript/hl/style_emacs.st +share/enscript/hl/style_emacs_verbose.st +share/enscript/hl/style_ifh.st +share/enscript/hl/style_msvc.st +share/enscript/hl/synopsys.st +share/enscript/hl/tcl.st +share/enscript/hl/tcsh.st +share/enscript/hl/tex.st +share/enscript/hl/vba.st +share/enscript/hl/verilog.st +share/enscript/hl/vhdl.st +share/enscript/hl/vrml.st +share/enscript/hl/wmlscript.st +share/enscript/hl/zsh.st share/enscript/hp8.enc -share/enscript/hv.afm -share/enscript/hvb.afm -share/enscript/hvbo.afm -share/enscript/hvc.afm -share/enscript/hvcb.afm -share/enscript/hvcbo.afm -share/enscript/hvcdo.afm -share/enscript/hvn.afm -share/enscript/hvnb.afm -share/enscript/hvnbo.afm -share/enscript/hvno.afm -share/enscript/hvo.afm share/enscript/ibmpc.enc share/enscript/koi8.enc share/enscript/mac.enc share/enscript/mp.hdr -share/enscript/ncb.afm -share/enscript/ncbi.afm -share/enscript/nci.afm -share/enscript/ncr.afm -share/enscript/pob.afm -share/enscript/pobi.afm -share/enscript/poi.afm -share/enscript/por.afm share/enscript/ps.enc share/enscript/pslatin1.enc share/enscript/simple.hdr -share/enscript/sy.afm -share/enscript/tib.afm -share/enscript/tibi.afm -share/enscript/tii.afm -share/enscript/tir.afm +share/enscript/squeeze.hdr share/enscript/vms.enc -share/enscript/zcmi.afm -share/enscript/zd.afm share/examples/enscript/enscript.cfg ${PKGLOCALEDIR}/locale/de/LC_MESSAGES/enscript.mo ${PKGLOCALEDIR}/locale/es/LC_MESSAGES/enscript.mo ${PKGLOCALEDIR}/locale/fi/LC_MESSAGES/enscript.mo ${PKGLOCALEDIR}/locale/fr/LC_MESSAGES/enscript.mo ${PKGLOCALEDIR}/locale/nl/LC_MESSAGES/enscript.mo +${PKGLOCALEDIR}/locale/ru/LC_MESSAGES/enscript.mo ${PKGLOCALEDIR}/locale/sl/LC_MESSAGES/enscript.mo @dirrm share/examples/enscript +@dirrm share/enscript/hl +@dirrm share/enscript/afm @dirrm share/enscript diff --git a/print/enscript/distinfo b/print/enscript/distinfo index 628fb675290..42279512559 100644 --- a/print/enscript/distinfo +++ b/print/enscript/distinfo @@ -1,7 +1,10 @@ -$NetBSD: distinfo,v 1.4 2003/05/01 12:58:16 jmmv Exp $ +$NetBSD: distinfo,v 1.5 2005/03/17 12:24:13 salo Exp $ -SHA1 (enscript-1.6.1.tar.gz) = f99e21a8366baf331daaa6675d7c9d2dc026eb27 -Size (enscript-1.6.1.tar.gz) = 645856 bytes -SHA1 (patch-aa) = 7cab0636de9b4551391a6c2753eaf0c8c2a01679 -SHA1 (patch-ab) = 1cb3f286421dc772475246617ec270d887971018 +SHA1 (enscript-1.6.3.tar.gz) = 2189c1f9b80160d4b2acac0f60cc7c7ff05f10aa +RMD160 (enscript-1.6.3.tar.gz) = 7aafd03dad2e9a1fb3bbf61ed9b95ed6bef02921 +Size (enscript-1.6.3.tar.gz) = 814308 bytes +SHA1 (patch-aa) = 4f958c8e2b01cf6934beebe249f1f67da2fb3f11 +SHA1 (patch-ab) = 13885dbd3aa0d0e90f8aa07640c4d917d7feaf13 SHA1 (patch-ac) = 9d4d412e3016b7490741f7c6ba31d43b2be1465b +SHA1 (patch-ad) = b2f12cc6875289978194315927ccbc8e963476a2 +SHA1 (patch-ae) = 9a3209196eea1c6ed1f07f39fb7b4f1c35cdb850 diff --git a/print/enscript/patches/patch-aa b/print/enscript/patches/patch-aa index 5c91ded87fe..03e6b11ffd6 100644 --- a/print/enscript/patches/patch-aa +++ b/print/enscript/patches/patch-aa @@ -1,45 +1,47 @@ -$NetBSD: patch-aa,v 1.1 2002/01/25 18:58:02 kleink Exp $ +$NetBSD: patch-aa,v 1.2 2005/03/17 12:24:13 salo Exp $ ---- src/main.c.orig Thu Jun 25 10:26:00 1998 -+++ src/main.c Fri Jan 25 19:35:40 2002 -@@ -642,7 +642,6 @@ - * Print Table of Contents page. - */ - int toc = 0; --char toc_fname[512]; - FILE *toc_fp; - char *toc_fmt_string; +--- src/main.c.orig 2002-01-24 08:35:45.000000000 +0100 ++++ src/main.c 2005-03-17 11:52:58.000000000 +0100 +@@ -1546,9 +1546,13 @@ + buffer_append (&cmd, intbuf); + buffer_append (&cmd, " "); -@@ -1429,19 +1428,10 @@ - /* Table of Contents. */ - if (toc) +- buffer_append (&cmd, "-Ddocument_title=\""); +- buffer_append (&cmd, title); +- buffer_append (&cmd, "\" "); ++ buffer_append (&cmd, "-Ddocument_title=\'"); ++ if ((cp = shell_escape (title)) != NULL) ++ { ++ buffer_append (&cmd, cp); ++ free (cp); ++ } ++ buffer_append (&cmd, "\' "); + + buffer_append (&cmd, "-Dtoc="); + buffer_append (&cmd, toc ? "1" : "0"); +@@ -1565,8 +1569,14 @@ + /* Append input files. */ + for (i = optind; i < argc; i++) { -- cp = tmpnam (toc_fname); -- if (cp == NULL) -+ toc_fp = tmpfile (); -+ if (toc_fp == NULL) - FATAL ((stderr, _("couldn't create toc file name: %s"), - strerror (errno))); -- -- toc_fp = fopen (toc_fname, "w+b"); -- if (toc_fp == NULL) -- FATAL ((stderr, _("couldn't create toc file \"%s\": %s"), -- toc_fname, strerror (errno))); -- -- if (remove (toc_fname) == 0) -- /* Remove successfull, no need to remove file at exit. */ -- toc_fname[0] = '\0'; +- buffer_append (&cmd, " "); +- buffer_append (&cmd, argv[i]); ++ char *cp; ++ if ((cp = shell_escape (argv[i])) != NULL) ++ { ++ buffer_append (&cmd, " \'"); ++ buffer_append (&cmd, cp); ++ buffer_append (&cmd, "\'"); ++ free (cp); ++ } } + /* And do the job. */ +@@ -1627,7 +1637,7 @@ + buffer_ptr (opts), buffer_len (opts)); + } -@@ -1519,10 +1509,6 @@ - - /* Clean up toc file. */ - fclose (toc_fp); -- -- /* Do we have to remove the toc file? */ -- if (toc_fname[0]) -- (void) remove (toc_fname); - } +- buffer_append (&buffer, " \"%s\""); ++ buffer_append (&buffer, " \'%s\'"); - /* Give trailer a chance to dump itself. */ + input_filter = buffer_copy (&buffer); + input_filter_stdin = "-"; diff --git a/print/enscript/patches/patch-ab b/print/enscript/patches/patch-ab index 12d40ccb4bd..77f72d304fd 100644 --- a/print/enscript/patches/patch-ab +++ b/print/enscript/patches/patch-ab @@ -1,57 +1,36 @@ -$NetBSD: patch-ab,v 1.1 2002/01/25 18:58:02 kleink Exp $ +$NetBSD: patch-ab,v 1.2 2005/03/17 12:24:13 salo Exp $ ---- src/psgen.c.orig Thu Jun 25 09:18:54 1998 -+++ src/psgen.c Fri Jan 25 19:39:07 2002 -@@ -2398,7 +2398,7 @@ - read_float (InputStream *is, int units, int horizontal) - { - char buf[256]; -- int i, ch; -+ int i, ch = 0; - double val; +--- src/psgen.c.orig 2002-01-24 08:38:58.000000000 +0100 ++++ src/psgen.c 2005-03-17 11:56:57.000000000 +0100 +@@ -2034,8 +2034,9 @@ + else + { + ftail++; +- strncpy (buf, fname, ftail - fname); +- buf[ftail - fname] = '\0'; ++ i = ftail - fname >= sizeof (buf)-1 ? sizeof (buf)-1 : ftail - fname; ++ strncpy (buf, fname, i); ++ buf[i] = '\0'; + } - for (i = 0; (i < sizeof (buf) - 1 -@@ -2618,31 +2618,15 @@ - static void - divert () - { -- char *cp; -- - assert (divertfp == NULL); + if (nup > 1) +@@ -2385,9 +2386,10 @@ + MESSAGE (2, (stderr, "^@epsf=\"%s\"\n", token->u.epsf.filename)); - /* Open divert file. */ + i = strlen (token->u.epsf.filename); ++ /* + if (i > 0 && token->u.epsf.filename[i - 1] == '|') + { +- /* Read EPS data from pipe. */ ++ / * Read EPS data from pipe. * / + token->u.epsf.pipe = 1; + token->u.epsf.filename[i - 1] = '\0'; + token->u.epsf.fp = popen (token->u.epsf.filename, "r"); +@@ -2400,6 +2402,7 @@ + } + } + else ++ */ + { + char *filename; -- cp = tempnam (NULL, "ens"); -- if (cp == NULL) -- FATAL ((stderr, _("couldn't create divert file name: %s"), -- strerror (errno))); -- -- strcpy (divertfname, cp); -- -- divertfp = fopen (divertfname, "w+b"); -+ divertfp = tmpfile (); - if (divertfp == NULL) - FATAL ((stderr, _("couldn't create divert file \"%s\": %s"), divertfname, - strerror (errno))); - -- if (remove (divertfname) == 0) -- /* Remove successfull, no need to remove file in undivert(). */ -- divertfname[0] = '\0'; -- -- /* Free the buffer allocated by tempnam(). */ -- free (cp); -- - cofp = divertfp; - } - -@@ -2696,10 +2680,6 @@ - - fclose (divertfp); - divertfp = NULL; -- -- /* Do we have to remove the divert file? */ -- if (divertfname[0]) -- (void) remove (divertfname); - - cofp = ofp; - } diff --git a/print/enscript/patches/patch-ad b/print/enscript/patches/patch-ad new file mode 100644 index 00000000000..85b3438c46d --- /dev/null +++ b/print/enscript/patches/patch-ad @@ -0,0 +1,78 @@ +$NetBSD: patch-ad,v 1.1 2005/03/17 12:24:13 salo Exp $ + +--- src/util.c.orig 1999-09-17 17:26:51.000000000 +0200 ++++ src/util.c 2005-03-17 11:58:59.000000000 +0100 +@@ -1239,6 +1239,8 @@ + + /* Create result. */ + cp = xmalloc (len + 1); ++ if (cp == NULL) ++ return NULL; + for (i = 0, j = 0; string[i]; i++) + switch (string[i]) + { +@@ -1879,6 +1881,7 @@ + char *cmd = NULL; + int cmdlen; + int i, pos; ++ char *cp; + + is->is_pipe = 1; + +@@ -1902,12 +1905,16 @@ + { + case 's': + /* Expand cmd-buffer. */ +- cmdlen += strlen (fname); ++ if ((cp = shell_escape (fname)) != NULL) ++ { ++ cmdlen += strlen (cp); + cmd = xrealloc (cmd, cmdlen); + + /* Paste filename. */ +- strcpy (cmd + pos, fname); +- pos += strlen (fname); ++ strcpy (cmd + pos, cp); ++ pos += strlen (cp); ++ free (cp); ++ } + + i++; + break; +@@ -2116,3 +2123,36 @@ + { + return buffer->len; + } ++ ++/* ++ * Escapes the name of a file so that the shell groks it in 'single' ++ * quotation 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; ++} diff --git a/print/enscript/patches/patch-ae b/print/enscript/patches/patch-ae new file mode 100644 index 00000000000..b491f84e82e --- /dev/null +++ b/print/enscript/patches/patch-ae @@ -0,0 +1,14 @@ +$NetBSD: patch-ae,v 1.1 2005/03/17 12:24:13 salo Exp $ + +--- src/gsint.h.orig 2000-07-11 17:28:06.000000000 +0200 ++++ src/gsint.h 2005-03-17 12:00:10.000000000 +0100 +@@ -701,4 +701,9 @@ + */ + void printer_close ___P ((void *context)); + ++/* ++ * Escape filenames for shell usage ++ */ ++char *shell_escape ___P ((const char *fn)); ++ + #endif /* not GSINT_H */ |