PAPERSIZE, A4 vs a4, html2ps request

Phil Pennock pdp at nl.demon.net
Fri Jul 25 05:38:19 PDT 2003


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 at 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


More information about the freebsd-ports mailing list