bugGNU roff - Bugs: bug #62775, [groff.m4] lighten prerequisites...

 
 

bug #62775: [groff.m4] lighten prerequisites of `GROFF_URW_FONTS_CHECK`

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Sat 16 Jul 2022 11:29:49 AM UTC
   
 
Category:  General Severity:  3 - Normal
Item Group:  Build/Installation Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 25 Sep 2022 09:05:09 PM UTC, comment #4: 


commit c41b8ce7fc8ba507ded9f0c606b0346ee769091b
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Sep 19 16:19:11 2022 -0500

    [m4]: Fix Savannah #62775.

    * m4/groff.m4 (GROFF_URW_FONTS_CHECK): If Ghostscript or awk are
      unavailable, skip only the prepopulation of the URW font search path
      instead of the entire check.  This way we still locate the URW fonts
      if they are in one of several standard locations.

    Fixes <https://savannah.gnu.org/bugs/?62775>.

    This commit does _not_ update indentation, for clarity.


G. Branden Robinson <gbranden>
Group administrator
Fri 02 Sep 2022 11:15:28 PM UTC, comment #3: 


comment #2:

> However, even if the tools aren't available or if by some weirdness


...GhostScript returns no directory names at all...

> we're not sunk.

G. Branden Robinson <gbranden>
Group administrator
Fri 02 Sep 2022 11:14:19 PM UTC, comment #2: 

In fact I'm not sure it's even necessary to have this macro depend on awk and gs.

I think we could drop the AC_REQUIRES on Awk and GhostScript, and instead restructure the test.

What we're using 'awk' and 'gs' to do is scrape a search path out of the output of 'gs -h' (help).  However, even if the tools aren't available or if by some weirdness, we're not sunk.  We still populate the `_list_paths` shell variable with a bunch of stuff.

Here they are.


      /usr/share/fonts/type1/gsfonts/
      /usr/share/fonts/default/Type1/
      /usr/share/fonts/default/Type1/adobestd35/
      /usr/share/fonts/type1/urw-base35/
      /opt/local/share/fonts/urw-fonts/
      /usr/local/share/fonts/ghostscript/


It's not inconceivable that one of these would in fact house the URW fonts being sought.
 
So, the conditional should just gate the initial population of `_list_paths`, not the whole check.

G. Branden Robinson <gbranden>
Group administrator
Thu 21 Jul 2022 08:29:06 AM UTC, comment #1: 


original submission:

> Also not really part of this bug, but do we really need to be defining our own Autoconf check for awk?  Autoconf itself doesn't provide one?!  Check this.


Autoconf does, and did even in 2.68, our minimum required version.

https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.68/html_node/Particular-Programs.html

So we can indeed replace our awk detection/configuration macros with the stock one.


G. Branden Robinson <gbranden>
Group administrator
Sat 16 Jul 2022 11:29:49 AM UTC, original submission:  

In https://lists.gnu.org/archive/html/groff/2022-06/msg00107.html :

Ingo wrote:

>> I think the tests for awk and ghostscript need to just apply to the
>> line which uses those programs, not the whole section, but the patch
>> is good.


I wrote:

> I'm happy to change GROFF_URW_FONTS_CHECK in this manner, but I'll hold
> off until you or Ingo pushes his patch.


He's since pushed the patch.

This work might be coupled with the creation of a file in the source tree to store some directory names in which to search for Type 1 PostScriptfonts.

See https://lists.gnu.org/archive/html/groff/2022-07/msg00063.html .

Also, not really part of this bug, but we have an Autoconf check for the presence of awk, but then blindly use awk regardless in the `GROFF_PAGE` macro.  However I already have a rewrite of the first use in sed, and the second one (which parses resolv.conf) can be handled with even greater ease.

Also not really part of this bug, but do we really need to be defining our own Autoconf check for awk?  Autoconf itself doesn't provide one?!  Check this.

G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-09-25 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2022-09-19 gbranden StatusNone In Progress
        Assigned toNone gbranden
        Planned ReleaseNone 1.23.0

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code