From owner-cvs-all Sat Feb 28 04:32:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA03355 for cvs-all-outgoing; Sat, 28 Feb 1998 04:32:03 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from ocean.campus.luth.se (ocean.campus.luth.se [130.240.194.116]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA03321; Sat, 28 Feb 1998 04:31:34 -0800 (PST) (envelope-from karpen@ocean.campus.luth.se) Received: (from karpen@localhost) by ocean.campus.luth.se (8.8.8/8.8.8) id MAA04516; Sat, 28 Feb 1998 12:57:01 +0100 (CET) (envelope-from karpen) From: Mikael Karpberg Message-Id: <199802281157.MAA04516@ocean.campus.luth.se> Subject: Re: cvs commit: ports/print/c2ps Makefile In-Reply-To: <199802280210.SAA19632@vader.cs.berkeley.edu> from Satoshi Asami at "Feb 27, 98 06:10:54 pm" To: asami@FreeBSD.ORG (Satoshi Asami) Date: Sat, 28 Feb 1998 12:57:01 +0100 (CET) Cc: obrien@NUXI.com, chuckr@glue.umd.edu, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-ports@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk According to Satoshi Asami: > * > print/a2ps-letter/Makefile: > * > === > * > : > * > .if defined(PAPERSIZE) && ${PAPERSIZE} != letter > * > BROKEN= This port is for Letter-sized printerheads. Go to ${PORTSDIR}/print/a2ps-a4 for A4 paper size. > * > .endif > * > === > * > * No need to make it broken. All (most?) of the printing ports already > * have a default, but it is easily overridable. > > This pertains to the second part of my message, about being able to > type "make PAPERSIZE=a4" from ports/print and let it DTRT. Sort of a > "safety belt" for people used to the current framework. Eeew... This seems awfully akward to me. PLEASE don't split ports into two dirs. As (I think) Chuck pointed out... if people download just one port it will break since they will not have the other makefile. Why not just leave it as one port, and generate two packages called XXX-a4.tgz and XXX-letter.tgz from it? Or... Even better... Make it have a little cooler package install file that simply does the right thing by installing one of it's two binaries depending on PAPERSIZE, or if not set, just as the user a question. But as a question... Are there really ports that are sucky enough not to be able to generate both formats from one binary? Those would be a problem. If it's just a matter of getting a default value for the runtime when the user doesn't have the env variable PAPERSIZE set, just make all ports that use it depend on one papersize_default "port", which simply querries the user for his prefered default format and writes that to a file like /usr/local/etc/papersize_default and so all ports can just do something like: check_options(); if (papersize == NULL && (papersize = getenv(PAPERSIZE)) == NULL) papersize = get_file_as_string("/usr/local/etc/papersize_default"); if (papersize == NULL) papersize = "A4"; That last '= "A4"' doesn't really matter what it is. It should "never" happen. That would save us lots of work, just to have a program start with another default value, and generally be much nicer, IMHO. Ok, so having a file for the default paper format, and such details should probably be made a little more generic so the fil can hold more then one setting. But the same "port" could ask all the questions and write the file, unless it existed. Which would mean that the portsbuilder could just have such a file, and their automatic thingies wouldn't fall over. Hmm... Just my $.02 /Mikael To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message