At 2025-04-11T10:08:22+0000, Bjarni Ingi Gislason wrote:
> On Sun, Mar 30, 2025 at 11:26:34PM +0000, Lennart Jablonka wrote:
> > libpaper reads /etc/papersize case-insensitively; `configure PAGE=???`
> > shouldn???t be case-sensitive either.
>
> The file "/etc/papersize" is no longer on Debian, testing, but
> "/etc/paperspecs" (package libpaper2) is, with all lines beginning
> with a capital letter or a digit.

Not a problem.  I ended up not going with Lennart's patch.  I expect the
following to be in my next push.

commit 11e8a5d04c4163d72529f97bd0989b0b0dc3f649
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
Date:   Fri Apr 11 04:17:45 2025 -0500

    [build]: Fix Savannah #67013 (`PAGE` -> "DESC").

    Write any desired paper format to generated DESC files.

    * font/devdvi/devdvi.am (font/devdvi/DESC):
    * font/devlbp/devlbp.am (font/devlbp/DESC):
    * font/devlj4/devlj4.am (font/devlj4/DESC):
    * font/devpdf/devpdf.am (font/devpdf/DESC):
    * font/devps/devps.am (font/devps/DESC): Write the "configure"d paper
      format to generated device description files, instead of only ever
      "a4" or "letter".

    * NEWS: Add item.

[...]
diff --git a/NEWS b/NEWS
index d3db3630e..131d68d1e 100644
--- a/NEWS
+++ b/NEWS
@@ -726,6 +726,14 @@ Miscellaneous
 *  Support for terminal devices using the CCSID 1047 (EBCDIC) encoding
    has been withdrawn.

+*  You can now specify any paper format you like--including the file
+   specification "/etc/papersize" for systems using "libpaper"--as the
+   default that the groff build writes to generated device description
+   files ("DESC") for the "dvi", "lbp", "lj4", "pdf", and "ps" output
+   drivers.  (The paper format must still be valid; see groff_font(5)).
+
+     Example: ./configure PAGE=/etc/papersize --prefix=/opt/gnu
+
 *  Building groff no longer requires the PSUtils package.

 *  Building groff no longer requires the makeinfo package.  Since groff
[...]

> The correct and official name of the paper format is A4, not a4, see
> for example the standard ISO 216.

I had wondered about that.  But I decided a more important matter was
that file names are case-sensitive on POSIX systems, and we don't want
to case-normalize _those_.

Also, we don't want to case-normalize a manual paper format, because "p"
and "P" are different units of measure.

Also, someone might want, say, "B5" as their default paper format.

> So the spelling a4 should be changed to A4.
> 
> For example in the font/dev*.am files, papersize should be A4 not a4.

With my patch, we get out of the business of enforcing the "official"
case-spelling of the paper formats, and anything libgroff can interpret
when it reads a DESC file is a valid value of "PAGE" given to the
"configure" script.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature

Reply via email to