gbranden pushed a commit to branch master
in repository groff.

commit 20d59d263fed685cdf8007910a2aeff3079d3786
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
AuthorDate: Wed Jul 2 09:30:10 2025 -0500

    [devpdf]: Fix Savannah #67268.
    
    * font/devpdf/devpdf.am: Tidy up for better build reliability.
    
      (font/devpdf/util/BuildFoundries): Stop handling the "download" file.
    
      (font/devpdf/download): Move the file's comment header from here...
    
    * font/devpdf/download.in: ...to here.
    
    * font/devpdf/devpdf.am (font/devpdf/download): Use "BuildFoundries"'s
      new `--download` option to construct the target from "download.in".
      Stop setting write permission on the generated download file in the
      build tree; it's no longer necessary.
    
    Fixes <https://savannah.gnu.org/bugs/?67268>.  Thanks to Dave Kemper for
    the report.
---
 ChangeLog                          | 33 +++++++++++++++++++++++++++++++++
 font/devpdf/devpdf.am              | 16 ++++++----------
 font/devpdf/download.in            |  3 +++
 font/devpdf/util/BuildFoundries.pl | 11 ++++++-----
 4 files changed, 48 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b4b23504c..15323da9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2025-07-03  G. Branden Robinson <g.branden.robin...@gmail.com>
+
+       * font/devpdf/util/BuildFoundries.pl (LoadFoundry): Stop
+       throwing notice about grops(1) font [description file] being
+       copied; this notification was far away from where the rewrite
+       was actually happening.  Drop now-unused `gotf` scalar.
+       (UseGropsVersion): If we're being strict and the destination
+       font description file name (scalar `gfontbase`) already exists,
+       emit a `Notice()` that we're not overwriting it.  If we are
+       rewriting it, emit the aforementioned notice here, where it
+       happens.  Drop redundant/unnecessary (depending on whether a
+       file open was sucessfule) close of `GF` file handle.
+
+       * font/devpdf/devpdf.am: Tidy up for better build reliability.
+       (font/devpdf/util/BuildFoundries): Stop manipulating the
+       "download" file.
+       (font/devpdf/download): Move the file's comment header from
+       here...
+       * font/devpdf/download.in: ...to here.
+       * font/devpdf/devpdf.am (font/devpdf/download): Use
+       "BuildFoundries"'s new `--download` option to construct the
+       target from "download.in".  Stop setting write permission on the
+       generated download file in the build tree; it's no longer
+       necessary.  Stop giving "BuildFoundries" a search path in the
+       "font/devps" directory; use "font/devpdf" instead.  This is what
+       ultimately angered "make distcheck"; now that make(1) produces
+       the "pdf" device's font description files for the default
+       foundry (copying them from "font/grops", there's no need for
+       "BuildFoundries" to rewrite them, in either directory.
+
+       Fixes <https://savannah.gnu.org/bugs/?67268>.  Thanks to Dave
+       Kemper for the report.
+
 2025-07-03  G. Branden Robinson <g.branden.robin...@gmail.com>
 
        * font/devpdf/util/BuildFoundries.pl: Support new `--download`
diff --git a/font/devpdf/devpdf.am b/font/devpdf/devpdf.am
index 490f4aa2d..71ce8b31a 100644
--- a/font/devpdf/devpdf.am
+++ b/font/devpdf/devpdf.am
@@ -196,9 +196,7 @@ font/devpdf/util/BuildFoundries: \
                 $(devpdf_srcdir)/util/BuildFoundries.pl \
                 >$(top_builddir)/font/devpdf/util/BuildFoundries; \
           fi \
-       && chmod +x $(top_builddir)/font/devpdf/util/BuildFoundries \
-       && cp -f $(top_srcdir)/font/devpdf/download.in \
-                $(top_builddir)/font/devpdf/download
+       && chmod +x $(top_builddir)/font/devpdf/util/BuildFoundries
 
 MOSTLYCLEANFILES += font/devpdf/DESC
 font/devpdf/DESC: $(devpdf_srcdir)/DESC.in
@@ -225,14 +223,12 @@ $(DEVPDFFONTFILES_FOR_URW) $(DEFAULT_BASE35_FONTS) \
 font/devpdf/download: $(devpdffontencdata) $(devpdffontmapdata) \
   font/devpdf/DESC font/devpdf/Foundry font/devpdf/util/BuildFoundries
        $(AM_V_GEN)$(MKDIR_P) $(top_builddir)/font/devpdf \
-       && echo "# foundry      ps-font-name    ps-font-file" >$@.tmp \
-       && echo "# A blank foundry is the default." >>$@.tmp \
        && 
PATH="$(abs_top_builddir)$(GROFF_PATH_SEPARATOR)$(abs_top_builddir)/build-aux$(GROFF_PATH_SEPARATOR)$(PATH)"
 \
-            $(abs_top_builddir)/font/devpdf/util/BuildFoundries \
-              --strict $(abs_top_builddir)/font/devpdf \
-              '$(abs_top_srcdir)/font/devps:$(abs_top_builddir)/font/devps' \
-              >>$@.tmp \
-       && chmod u+w $@ \
+       $(abs_top_builddir)/font/devpdf/util/BuildFoundries \
+         --download $(abs_top_srcdir)/font/devpdf/download.in \
+         --strict $(abs_top_builddir)/font/devpdf \
+         '$(abs_top_srcdir)/font/devpdf:$(abs_top_builddir)/font/devpdf' \
+         >>$@.tmp \
        && mv $@.tmp $@
 
 # PDFs to be produced by troff should depend on this stamp file to
diff --git a/font/devpdf/download.in b/font/devpdf/download.in
index 6eea741ee..a0c544d13 100644
--- a/font/devpdf/download.in
+++ b/font/devpdf/download.in
@@ -1 +1,4 @@
+# foundry      ps-font-name    ps-font-file
+# A blank foundry is the default.
+
        Symbol-Slanted  StandardSymSL.pfb
diff --git a/font/devpdf/util/BuildFoundries.pl 
b/font/devpdf/util/BuildFoundries.pl
index ca199dfe8..b9284f5f0 100644
--- a/font/devpdf/util/BuildFoundries.pl
+++ b/font/devpdf/util/BuildFoundries.pl
@@ -133,7 +133,6 @@ sub LoadFoundry
                    {
                        if (uc($r[1]) ne 'Y')
                        {
-                           $gotf=0;
                            my $fns=join(', ',split('!',$r[5]));
                            my $sub=\&Warn;
                            $sub=\&Die if ($beStrict);
@@ -144,7 +143,6 @@ sub LoadFoundry
                            unlink $gfont;
                        }
                    }
-                   Notice("copied grops font $gfont") if $gotf;
 
                }
                else
@@ -405,7 +403,11 @@ sub UseGropsVersion
 
        close(GF);
 
-       if ($psfont)
+       if ($beStrict and -r "$gfontbase")
+       {
+           Notice("not overwriting existing groff font description file 
'$gfontbase' for foundry '$foundry'");
+       }
+       elsif ($psfont)
        {
            Notice("trying to open '$gfontbase' for writing");
            if (open(GF,">$gfontbase"))
@@ -413,6 +415,7 @@ sub UseGropsVersion
                local $"='';
                print GF "@gf";
                close(GF);
+               Notice("copied grops font $gfont");
            }
            else
            {
@@ -432,8 +435,6 @@ sub UseGropsVersion
                  . " '$foundry' lacks 'internalname' directive;"
                  . " ignoring file");
        }
-
-       close(GF);
     }
     else
     {

_______________________________________________
groff-commit mailing list
groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to