groff-commit
[Top][All Lists]
Advanced

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

[groff] 05/09: [build]: Detangle pdfroff, gropdf config (1/2).


From: G. Branden Robinson
Subject: [groff] 05/09: [build]: Detangle pdfroff, gropdf config (1/2).
Date: Sat, 18 Feb 2023 18:00:42 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit ec001d2a23a3b1740e8d004006c0fc0d7fb6e288
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Feb 18 02:58:41 2023 -0600

    [build]: Detangle pdfroff, gropdf config (1/2).
    
    * m4/groff.m4 (GROFF_GROPDF_DEPENDENCIES_CHECK): Add `AC_REQUIRE`ment on
      `GROFF_URW_FONTS_CHECK`.  Per discussion with Deri James, if _either_
      Ghostscript or the URW fonts are avilable, gropdf will be fully
      functional, consequent to commit d5515, 22 June.  Drop dependency on
      awk; it is used only at configuration time (in an Autoconf macro) and
      since Savannah #62775 was resolved (19 September), it has not been
      strictly necessary.  (It is useful for searching more locations for
      URW fonts, but several others are searched even if it is absent.)
      Stop populating notice text here, instead moving it...
    
      (GROFF_GROPDF_PROGRAM_NOTICE): ...here, since it no longer needs to be
      dynamically constructed.
    
    Continues <https://savannah.gnu.org/bugs/?63808>.  Thanks to Deri James
    for the continued discussion.
---
 ChangeLog   | 20 ++++++++++++++++++++
 m4/groff.m4 | 38 ++++++++++++++------------------------
 2 files changed, 34 insertions(+), 24 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3ecbe9905..f32bfc9cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2023-02-18  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [build]: Detangle "pdfroff" and "gropdf" configuration (1/2).
+
+       * m4/groff.m4 (GROFF_GROPDF_DEPENDENCIES_CHECK): Add
+       `AC_REQUIRE`ment on `GROFF_URW_FONTS_CHECK`.  Per discussion
+       with Deri James, if _either_ Ghostscript or the URW fonts are
+       avilable, gropdf will be fully functional, consequent to commit
+       d5515, 22 June.  Drop dependency on awk; it is used only at
+       configuration time (in an Autoconf macro) and since Savannah
+       #62775 was resolved (19 September), it has not been strictly
+       necessary.  (It is useful for searching more locations for URW
+       fonts, but several others are searched even if it is absent.)
+       Stop populating notice text here, instead moving it...
+       (GROFF_GROPDF_PROGRAM_NOTICE): ...here, since it no longer needs
+       to be dynamically constructed.
+
+       Continues <https://savannah.gnu.org/bugs/?63808>.  Thanks to
+       Deri James for the continued discussion.
+
 2023-02-18  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [build]: Rename `GROFF_CHECK_GROPDF_PROGRAMS` macro to
diff --git a/m4/groff.m4 b/m4/groff.m4
index 1e0e7aae9..a99691e41 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -239,8 +239,7 @@ AC_DEFUN([GROFF_GROHTML_PROGRAM_NOTICE], [
   fi
 ])
 
-# gropdf needs awk and Ghostscript to have produced (a full set of) its
-# font description files.
+dnl pdfroff uses awk, and we use it in GROFF_URW_FONTS_CHECK.
 
 AC_DEFUN([GROFF_AWK_NOTICE], [
   AC_REQUIRE([GROFF_AWK_PATH])
@@ -262,44 +261,35 @@ AC_DEFUN([GROFF_AWK_NOTICE], [
 
 AC_DEFUN([GROFF_GROPDF_DEPENDENCIES_CHECK], [
   AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH])
+  AC_REQUIRE([GROFF_URW_FONTS_CHECK])
 
   use_gropdf=no
   gropdf_missing_deps=
 
-  test "$AWK" = missing && gropdf_missing_deps="awk"
-
-  if test "$GHOSTSCRIPT" = missing
+  if test "$GHOSTSCRIPT" != missing \
+    || test "$groff_have_urw_fonts" = yes
   then
-    if test -n "$gropdf_missing_deps"
-    then
-      gropdf_missing_deps="$gropdf_missing_deps and "
-    fi
-    gropdf_missing_deps="${gropdf_missing_deps}Ghostscript"
+    use_gropdf=yes
   fi
 
-  if test -z "$gropdf_missing_deps"
+  AC_SUBST([use_gropdf])
+])
+
+AC_DEFUN([GROFF_GROPDF_PROGRAM_NOTICE], [
+  AC_REQUIRE([GROFF_GROPDF_DEPENDENCIES_CHECK])
+
+  if test "$use_gropdf" = no
   then
-    use_gropdf=yes
-  else
-    gropdf_notice="'gropdf' will have reduced function.
+    AC_MSG_NOTICE(['gropdf' will have reduced function.
 
-  Due to the missing $gropdf_missing_deps described above, groff
+  Because neither Ghostscript nor URW fonts are available, groff
   documentation will not be available in PDF.
 
   'gropdf' will be able to handle only documents using the standard PDF
   base 14 fonts, plus the 'EURO' font groff supplies, and font embedding
   with its '-e' option (accessed via the 'groff' command with the option
   '-P -e') will not be possible.
-"
-  fi
-
-  AC_SUBST([use_gropdf])
 ])
-
-AC_DEFUN([GROFF_GROPDF_PROGRAM_NOTICE], [
-  if test "$use_gropdf" = no
-  then
-    AC_MSG_NOTICE([$gropdf_notice])
   fi
 ])
 



reply via email to

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