[looping in groff@] Hi Deri,
At 2023-02-14T00:06:19+0000, Deri wrote: > > gbranden pushed a commit to branch master > > in repository groff. > > > > commit 2ff76bc40468394c7aed3e0209880cd2c490c961 > > Author: G. Branden Robinson <g.branden.robin...@gmail.com> > > AuthorDate: Mon Feb 13 11:09:25 2023 -0600 > > > > [gropdf]: Skip a test if gs unavailable. > > > > * font/devpdf/tests/basic-fonts-present.sh: Skip test if 'gs' command > > not available. The test is to ensure that gropdf will produce sound > > documents using the base fonts from PostScript, but since gropdf > > requires Ghostscript to do this (as noted in our "./configure" > > messages), it makes no sense to validate font availability if the > > program is absent. Resolves test failure seen on macOS with minimal > > dependencies installed. > > > > I don't think this is accurate. I believe that if either ghostscript > or URW fonts are present you will have all fonts for pdfs. So if > ghostscript not available but URW fonts are then you will still have > the default and U foundries. > > If neither is available you still end up with a working gropdf but > only the base 14 fonts are available and you can't produce pdfs with > embedded fonts. This can be seen when Bruno listed the contents of > his font/devpdf directory. Yes, I just got the same result on a macOS host from the FSF France's build farm. (Thanks to Bruno Haible for directing my attention to this resource. The administrators turned around my request for access _really fast_. It felt like I spent more time waiting for my SSH public key to sync to their systems than I did for human approval.) > So this, and the configure message, imply that ghostscript is > required, but this is not true. With both font sources missing, it is > true that some of the pdf documentation in groff may be missing, but > only those which use fonts other than the base-14. > > What is your understanding? Well, the _problem_ I have is simple. $ font/devpdf/tests/basic-fonts-present.sh font/devpdf/tests/basic-fonts-present.sh: line 38: cd: ../font/devps: No such file or directory This is because I didn't perform a search for the source tree, and I should have. (On the macOS build host, I'm doing an in-tree build). I will fix this, but the test would have failed anyway, so let's focus on that since it's the more interesting issue. $ font/devpdf/tests/basic-fonts-present.sh checking for font description AB... test -f ./font/devpdf/AB FAILED checking for font description ABI... test -f ./font/devpdf/ABI FAILED checking for font description AI... test -f ./font/devpdf/AI FAILED checking for font description AR... test -f ./font/devpdf/AR FAILED checking for font description BMB... test -f ./font/devpdf/BMB FAILED checking for font description BMBI... test -f ./font/devpdf/BMBI FAILED checking for font description BMI... test -f ./font/devpdf/BMI FAILED checking for font description BMR... test -f ./font/devpdf/BMR FAILED [...and so on...] I see that an "echo" command is superfluous, a legacy of the script's development. Here is what the test does. --snip-- # Ensure that groff's PDF device has the copies it needs of PostScript # device font descriptions. # # We need all of them except SS and ZDR. devps_fontsrcdir="${abs_top_srcdir:-..}"/font/devps devpdf_fontbuilddir="${abs_top_builddir:-.}"/font/devpdf psfonts=$(cd "$devps_fontsrcdir" && ls [A-Z]* \ | grep -Evx '(DESC\.in|SS|ZDR)') fail= for f in $psfonts do printf "checking for font description %s...\n" "$f" >&2 if ! test -f "$devpdf_fontbuilddir"/"$f" then echo test -f "$devpdf_fontbuilddir"/"$f" echo FAILED >&2 fail=yes fi done test -z "$fail" --end snip-- What this does is go into the devps directory to build a list of fonts. devps's font repertoire is not dynamically generated; the font descriptions in the distribution archive (and, ultimately, checked in to groff Git) are the only ones there are. Having built the list, the test then verifies that each one (except for SS and ZDR) is also present in devpdf's font directory. So, returning to this: > If neither is available you still end up with a working gropdf but > only the base 14 fonts are available and you can't produce pdfs with > embedded fonts. This can be seen when Bruno listed the contents of > his font/devpdf directory. ...I think the correct thing to do is skip the test, not fail it. However, perhaps some of the commentary around the skipping, and around the absence of the 'gs' command reported by our configure script, could be fruitfully amended. Maybe I could add "fully" to the comment in this test script. What language would you suggest in each place? Regards, Branden
signature.asc
Description: PGP signature