Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jul 2003 14:38:14 +0200
From:      Phil Pennock <pdp@nl.demon.net>
To:        ports@freebsd.org
Subject:   PAPERSIZE, A4 vs a4, html2ps request
Message-ID:  <20030725123814.GA28961@samhain.noc.nl.demon.net>

next in thread | raw e-mail | index | archive | help
Hi,

This is with a Ports tree updated minutes ago, on FreeBSD 5.1.

Living in Europe, I use A4 paper; many ports with printing support
default to US "letter", so I set a couple of definitions in
/etc/make.conf which didn't seem likely to conflict with other possible
meanings, but were used by various ports:

A4=                     yes
PAPERSIZE=              A4

I just did a "make index" in /usr/ports/ and found some error messages
at the start of INDEX-5:
-----------------------------< cut here >-------------------------------
*** Error code 1|||||||
Invalid value for PAPERSIZE: "A4"|||||||
Possible values are: a4 and letter.|||||||
Stop in /usr/ports/math.|||||||
Stop in /usr/ports.|||||||
Stop.|||||||
|||||||
-----------------------------< cut here >-------------------------------

This came from math/R-letter.

It turns out that most ports using PAPERSIZE want "a4", not "A4":

-----------------------------< cut here >-------------------------------
/usr/ports$ find . -maxdepth 3 -name Makefile -print0 | \
	xargs -0 fgrep PAPERSIZE |tee ~/papers
/usr/ports$ cd
$ grep -c a4 papers
21
$ grep -c 'A4$' papers ; grep -c 'A4[^_]' papers
1
1
-----------------------------< cut here >-------------------------------

Some of the occurences are for "A4_PAPERSIZE", but not all.  The only
two ports which accept an uppercase "A4" as a value for ${PAPERSIZE}
are:

 print/html2ps-letter (from print/html2ps-a4)
 print/psutils-letter

psutils-letter accepts both "A4" and "a4".

This leaves just html2ps-letter, for which <ports@freebsd.org> is the
listed maintainer; html2ps-a4 sets PAPERSIZE=A4 and html2ps-letter just
passes this through in SCRIPTS_ENV to scripts/pre-configure, which
patches the install script that's part of the port's source.

Could html2ps-letter please be amended to uppercase a PAPERSIZE of
[ab]\d+ to [AB]\d+ ?  I don't know whether you prefer to do this in
scripts/pre-configure or in the Makefile, but it's fairly trivial and
would lead to a consistent Ports tree approach to ${PAPERSIZE}
definitions.  I can of course offer a patch, if someone can state which
place should be patched?

Thanks,
-- 
Phil Pennock,  Senior Systems Administrator,  Demon Internet Netherlands
NL Sales: +31 20 422 20 00      Thus Plc      NL Support: 0800 33 6666 8



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030725123814.GA28961>