Subject: pkg/9168: enscript pkg: add support for mk.conf: PAPERSIZE
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jbernard@mines.edu>
List: netbsd-bugs
Date: 01/11/2000 10:45:03
>Number:         9168
>Category:       pkg
>Synopsis:       enscript pkg: add support for mk.conf: PAPERSIZE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager (NetBSD software packages system bug manager)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 11 10:42:00 2000
>Last-Modified:
>Originator:     Jim Bernard
>Organization:
	Speaking for myself
>Release:        Jan. 11, 2000
>Environment:
System: NetBSD nool 1.4P NetBSD 1.4P (NOOL) #0: Sat Dec 25 12:44:51 MST 1999 local@nool:/home/tmp/compile/sys/arch/i386/compile/NOOL i386


>Description:
	The enscript package has a configure option to set the default
	paper size at configuration time.  Automatic use of this,
	driven by the PAPERSIZE pkg variable (from /etc/mk.conf) makes
	life easier, since the installer doesn't need to (a) discover
	the need to, and (b) remember to use setpapersize after installation.

>How-To-Repeat:
	Examine the configure options for enscript.  Examine the pkg Makefile.
	Note the lack of support for build-time choice of default paper
	size.

>Fix:
	Here's a patch.  I've assumed that since the valid PAPERSIZE
	values documented in mk.conf.example constitute a subset of
	those supported by enscript, it is reasonably safe just to
	pass the value of PAPERSIZE to configure, without checking
	for validity.

--- Makefile-dist	Mon Sep  6 05:58:01 1999
+++ Makefile	Tue Jan 11 11:18:26 2000
@@ -10,7 +10,11 @@
 HOMEPAGE=		http://www.ngs.fi/mtr/genscript/
 
 DEPENDS+=		papersize-*:../../print/papersize
 
 GNU_CONFIGURE=		yes
+.include "../../mk/bsd.prefs.mk"
+.if defined(PAPERSIZE)
+CONFIGURE_ARGS+=--with-media="${PAPERSIZE}"
+.endif
 
 .include "../../mk/bsd.pkg.mk"
>Audit-Trail:
>Unformatted: