diff options
author | agc <agc> | 2003-09-15 10:51:39 +0000 |
---|---|---|
committer | agc <agc> | 2003-09-15 10:51:39 +0000 |
commit | 989d9654f9860190d47701504a813697d167ba24 (patch) | |
tree | 0f8f57645097fbd4ff7cb93447855bc720c11584 /print/papersize | |
parent | 3c534a0d062c4313c9380273f021eacf9121d929 (diff) | |
download | pkgsrc-989d9654f9860190d47701504a813697d167ba24.tar.gz |
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 (limited to 'print/papersize')
-rw-r--r-- | print/papersize/Makefile | 4 | ||||
-rw-r--r-- | print/papersize/files/getpapersize | 11 | ||||
-rw-r--r-- | print/papersize/files/setpapersize | 10 |
3 files changed, 20 insertions, 5 deletions
diff --git a/print/papersize/Makefile b/print/papersize/Makefile index 207d8cbda02..b1b5127f3ba 100644 --- a/print/papersize/Makefile +++ b/print/papersize/Makefile @@ -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 --git a/print/papersize/files/getpapersize b/print/papersize/files/getpapersize index 52d018cf5b0..ca7e6f390ef 100644 --- a/print/papersize/files/getpapersize +++ b/print/papersize/files/getpapersize @@ -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 @@ while [ $# -gt 0 ]; do @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 --git a/print/papersize/files/setpapersize b/print/papersize/files/setpapersize index 8df4b03e53e..292990c9e9e 100644 --- a/print/papersize/files/setpapersize +++ b/print/papersize/files/setpapersize @@ -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 @@ while [ $# -gt 0 ]; do @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 |