bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #63808] configure gives incorrect information regarding pdf generat


From: G. Branden Robinson
Subject: [bug #63808] configure gives incorrect information regarding pdf generation
Date: Fri, 24 Feb 2023 09:04:35 -0500 (EST)

Follow-up Comment #59, bug #63808 (project groff):

[comment #58 comment #58:]
> Your first attempt has the correct configure messages, this one is wrong.

So comment #54 looks good and comment #57 does not.

> In scenario 01 (ghostscript only) gropdf will be in standard mode with the
default foundry only populated, so it is correct to say that the U- foundry
will not be available in a configure message. If you undo whatever you changed
for the second run

That would mean "re-contriving" the test failure scenario.  I can do that.

You may have noticed the changing version number.  I will assume you don't
think either of these is a bad idea.


commit fc350c6b7b62ecc1ef4b4aba1568b14b66526e46 (HEAD -> master)
Author:     G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Feb 24 06:49:07 2023 -0600
Commit:     G. Branden Robinson <g.branden.robinson@gmail.com>
CommitDate: Fri Feb 24 06:49:07 2023 -0600

    configure.ac: Drop now-redundant explicit check.
    
    * configure.ac: Drop now-redundant explicit `GROFF_URW_FONTS_CHECK`.
      `GROFF_GROPDF_DEPENDENCIES_CHECK` `AC_REQUIRE`s it as of commit
      ec001d2a23, 18 February.

diff --git a/ChangeLog b/ChangeLog
index 636f69557..9b0eb7b8c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * configure.ac: Drop now-redundant explicit
+       `GROFF_URW_FONTS_CHECK`.  `GROFF_GROPDF_DEPENDENCIES_CHECK`
+       `AC_REQUIRE`s it as of commit ec001d2a23, 18 February.
+
 2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * m4/groff.m4 (GROFF_URW_FONTS_CHECK): When looking for a
diff --git a/configure.ac b/configure.ac
index b4e992162..fa38baba9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -179,10 +179,6 @@ GROFF_GHOSTSCRIPT_VERSION_CHECK
 gl_GLIBC21
 gl_LOCALCHARSET
 
-# Check for presence of URW fonts (these require Ghostscript, which is
-# checked for by GROFF_CHECK_GROHTML_PROGRAMS).
-GROFF_URW_FONTS_CHECK
-
 AM_CONDITIONAL([BUILD_WINSCRIPTS], [test -n "$make_winscripts"])
 
 # If X11 is not available, don't build:

commit d06b69ef2632f6c649a754f068f57f671f2d93ed
Author:     G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Feb 24 06:37:19 2023 -0600
Commit:     G. Branden Robinson <g.branden.robinson@gmail.com>
CommitDate: Fri Feb 24 06:37:19 2023 -0600

    m4/groff.m4: Improve URW font check.
    
    * m4/groff.m4 (GROFF_URW_FONTS_CHECK): When looking for a characteristic
      URW font by its file name, also check for "URWGothic-Bold" with no
      file extension.  Avoids false negatives in URW Type 1 font detection
      when using Ghostscript 9.53.3.  Thanks to Deri James for suggesting
      the test procedure that uncovered this flaw.

diff --git a/ChangeLog b/ChangeLog
index 931717f64..636f69557 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-02-24  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * m4/groff.m4 (GROFF_URW_FONTS_CHECK): When looking for a
+       characteristic URW font by its file name, also check for
+       "URWGothic-Bold" with no file extension.  Avoids false negatives
+       in URW Type 1 font detection when using Ghostscript 9.53.3.
+       Thanks to Deri James for suggesting the test procedure that
+       uncovered this flaw.
+
 2023-02-22  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * Makefile.am (uninstall_groffdirs): Remove "html.mono" and
diff --git a/m4/groff.m4 b/m4/groff.m4
index b6c5535be..294817544 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -382,6 +382,7 @@ dnl Keep this list in sync with font/devpdf/Foundry.in.
   for k in $_list_paths
   do
     for _font_file in \
+      URWGothic-Book \
       URWGothic-Book.t1 \
       URWGothic-Book.pfb \
       URWGothicL-Book.pfb \



The last wasn't really a "change", in comment #54, I hand-patched m4/groff.m4
with this same change as an experiment.  Thus the ringing bell.

> and run make, you should be looking for these things:-
>
> A message from configure the URW fonts are not found.
> No warnings from BuildFoundries.
> Only the default foundry groff fonts (base-35 plus EURO).
> check-default-foundry has passed.
> check-urw-foundry is not run/skipped.
> All pdf docs produced with no unexpected warnings.

Okay, I'll re-contrive and look for all of these.

> If all the above then it is a successful run, 
> 
> It really concerns me that I see configure is looking in the ghostscript
directory for urw-fonts, it must not.

Hmmm.  It's been doing that for quite a while.


commit 2b5a438e0c205a5f118b456db7438e35dab50e09 (HEAD)
Author: Bertrand Garrigues <bertrand.garrigues@laposte.net>
Date:   Mon May 8 21:46:03 2017 +0200

    Package `ghostscript' 9.21 renamed some fonts installed in
    `/usr/share/ghostscript/9.21/Resource/Font', e.g. URWGothicL-Demi
    renamed to URWGothic-Demi, and droped the installation of URW
    fonts in `/usr/share/fonts/type1/gsfonts/', breaking font
    generation in `font/devpdf/util/BuildFoundries.pl'.
    
    * m4/groff.m4 (GROFF_URW_FONTS_PATH): New option
    `--with-urw-fonts-dir' to pass a custom path to URW fonts.
    (GROFF_URW_FONTS): search the presence of URW fonts by checking if
    file `a010013l.pfb' exists in the paths given by `gs -h', in the
    default paths used in `Foundry.in' and in the path given with
    option `--with-urw-fonts-dir'.
    (GROFF_URW_FONTS_CHECK): print a warning at the end of the
    configuration phase if no URW fonts were found.
    
    * configure.ac: call new macros `GROFF_URW_FONTS_PATH',
    `GROFF_URW_FONTS' and `GROFF_URW_FONTS_CHECK'.
    
    * font/devpdf/Foundry.in: add new basic fonts names and pass
    custom URW fonts path `urwfontsdir'.
    
    * font/devpdf/devpdf.am: subsitute `urwfontsdir' in `Foundry'
    generation.
    
    Fixes https://savannah.gnu.org/bugs/?50786
...
+# Check if URW fonts are available, either in the paths given by `gs
+# -h', in /usr/share/fonts/type1/gsfonts/ ,
+# /opt/local/share/fonts/urw-fonts (where font/devpdf/Foundry.in
+# expect them), or in the custom path passed to configure.
+AC_DEFUN([GROFF_URW_FONTS],
+  [AC_MSG_CHECKING([whether URW fonts in pfb format are available])
+  _list_paths=`gs -h | grep -A 16 "Search path" | grep "^[ ]" | tr : ' ' `
+  _list_paths="$_list_paths /usr/share/fonts/type1/gsfonts/ \
+               /opt/local/share/fonts/urw-fonts/"
+  if test -n "$urwfontsdir"; then
+    _list_paths="$ _list_paths $urwfontsdir"
+  fi
+  groff_have_urw_fonts=no
+  for k in $_list_paths; do
+    if test -f $k/a010013l.pfb; then
+      AC_MSG_RESULT([found in $k])
+      groff_have_urw_fonts=yes
+      break
+    fi
+  done 
+  if test $groff_have_urw_fonts = no; then
+    AC_MSG_RESULT([no])
+  fi
+  ])

 
> Any fonts supplied by ghostscript do not include .afm files

I noticed that too.

> so the U- foundry can't be built, and the missing URW fonts message should
be output and @urwfontsdir@ should definitely not be set.

Okay.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63808>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]