pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/papersize Add lout to the packages which can hav...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/38473f9c80a3
branches:  trunk
changeset: 461384:38473f9c80a3
user:      agc <agc%pkgsrc.org@localhost>
date:      Mon Sep 15 10:51:39 2003 +0000

description:
Add lout to the packages which can have their papersize set or queried
by setpapersize/getpapersize.

Addresses the second part of PR 18687 properly.

diffstat:

 print/papersize/Makefile           |   4 ++--
 print/papersize/files/getpapersize |  11 +++++++++--
 print/papersize/files/setpapersize |  10 +++++++++-
 3 files changed, 20 insertions(+), 5 deletions(-)

diffs (71 lines):

diff -r 69c8c177e6cd -r 38473f9c80a3 print/papersize/Makefile
--- a/print/papersize/Makefile  Mon Sep 15 10:51:36 2003 +0000
+++ b/print/papersize/Makefile  Mon Sep 15 10:51:39 2003 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.15 2003/09/08 17:38:34 jmmv Exp $
+# $NetBSD: Makefile,v 1.16 2003/09/15 10:51:39 agc Exp $
 #
 
-DISTNAME=      papersize-1.0.7
+DISTNAME=      papersize-1.0.8
 WRKSRC=                ${WRKDIR}
 CATEGORIES=    print
 MASTER_SITES=  # empty
diff -r 69c8c177e6cd -r 38473f9c80a3 print/papersize/files/getpapersize
--- a/print/papersize/files/getpapersize        Mon Sep 15 10:51:36 2003 +0000
+++ b/print/papersize/files/getpapersize        Mon Sep 15 10:51:39 2003 +0000
@@ -1,12 +1,12 @@
 #!@SH@
 #
-# $NetBSD: getpapersize,v 1.8 2003/09/08 17:38:34 jmmv Exp $
+# $NetBSD: getpapersize,v 1.9 2003/09/15 10:51:40 agc Exp $
 #
 # Small shell script to show the default papersize for packages
 #
 
 if [ $# -eq 0 ]; then
-       pkgs="a2ps ddd enscript ghostscript gv magicfilter psutils";
+       pkgs="a2ps ddd enscript ghostscript gv lout magicfilter psutils";
 else 
        pkgs=$@
 fi
@@ -54,6 +54,13 @@
                        @AWK@ '/^GV.fallbackPageMedia:/ { print $2; }' $f
                fi
                ;;
+       lout)
+               f=@LOCALBASE@/share/lout/include/dsf
+               if [ -s "$f" ]; then
+                       @ECHO@ -n "$1 has default papersize: "
+                       @AWK@ '$1 == "named" && $2 == "@PageType" { print $4; }' $f
+               fi
+               ;;
        magicfilter)
                magicdir=@LOCALBASE@/libexec/magicfilter
                if [ -s $magicdir ]; then
diff -r 69c8c177e6cd -r 38473f9c80a3 print/papersize/files/setpapersize
--- a/print/papersize/files/setpapersize        Mon Sep 15 10:51:36 2003 +0000
+++ b/print/papersize/files/setpapersize        Mon Sep 15 10:51:39 2003 +0000
@@ -1,6 +1,6 @@
 #!@SH@
 #
-# $NetBSD: setpapersize,v 1.9 2003/09/08 17:38:34 jmmv Exp $
+# $NetBSD: setpapersize,v 1.10 2003/09/15 10:51:40 agc Exp $
 #
 # Small shell script to set the default papersize for packages
 #
@@ -85,6 +85,14 @@
                        @ECHO@ "Set $1 package default paper size to $papersize in $gvfile"
                fi
                ;;
+       lout)
+               loutfile=@LOCALBASE@/share/lout/include/dsf
+               if [ -s "$loutfile" ]; then
+                       @MV@ $loutfile $loutfile.old
+                       env PAPERSIZE=$papersize @AWK@ '$1 == "named" && $2 == "@PageType" { printf("    %s %s\t\t{ %s\t%s %s # page type (width, height)\n", $1, $2, ENVIRON["PAPERSIZE"], $5, $6); 
next } { print $0 }' $loutfile.old > $loutfile
+                       @ECHO@ "Set $1 package default paper size to $papersize in $loutfile"
+               fi
+               ;;
        magicfilter)
                magicdir=@LOCALBASE@/libexec/magicfilter
                if [ -s "$magicdir" ]; then



Home | Main Index | Thread Index | Old Index