groff-commit
[Top][All Lists]
Advanced

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

[groff] 06/07: [build, gropdf]: Fix Savannah #63808 (3/3).


From: G. Branden Robinson
Subject: [groff] 06/07: [build, gropdf]: Fix Savannah #63808 (3/3).
Date: Thu, 16 Feb 2023 01:00:00 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 195e17f2d9a42cebdd4aa6fc4ce4e65342c26181
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Feb 15 17:48:32 2023 -0600

    [build, gropdf]: Fix Savannah #63808 (3/3).
    
    * configure.ac: Add Automake conditional, `HAVE_GHOSTSCRIPT`, so that we
      can populate the list of PDF device font tests dynamically.
    
    * font/devpdf/devpdf.am: Test availability of "basic" (PDF base
      14) fonts (plus groff's "EURO") if either Ghostscript or URW fonts are
      available.  Test availability of URW fonts (35) only if Ghostscript
      _and_ the URW fonts were found at configuration time.
    
    Test procedure for Savannah #63808:
    
    ./configure --prefix=$HOME
    make -j check
    make install
    make uninstall
    test -z "$(find $HOME/{bin,lib,share} -type f)" && echo clean
    make distclean
    
    Configurations and test results (total/pass/skip/xfail)
    -------------------------------------------------------
    without gs, without URW fonts: 161/152/7/2
    with gs, without URW fonts: 162/155/5/2
    without gs, with URW fonts: 162/153/7/2
    with gs, with URW fonts: 163/156/5/2
---
 ChangeLog             |  9 ++++++++-
 configure.ac          |  2 ++
 font/devpdf/devpdf.am | 12 ++++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index de0dfe3d1..2d7034282 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 2023-02-15  G. Branden Robinson <g.branden.robinson@gmail.com>
 
-       * configure.ac: Call new macro
+       * configure.ac: Add Automake conditional, `HAVE_GHOSTSCRIPT`, so
+       that we can populate the list of PDF device font tests
+       dynamically.  Call new macro
        `GROFF_GHOSTSCRIPT_AVAILABILITY_NOTICE`.  Call
        `GROFF_GHOSTSCRIPT_VERSION_NOTICE` after it, but before
        `GROFF_URW_FONTS_NOTICE`.
@@ -21,6 +23,11 @@
        (GROFF_URW_FONTS_NOTICE): Identify 'U' as the foundry name
        gropdf uses for the URW fonts.  Confirm continuing availability
        of most recent URW fonts release; bump date.
+       * font/devpdf/devpdf.am: Test availability of "basic" (PDF base
+       14) fonts (plus groff's "EURO") if either Ghostscript or URW
+       fonts are available.  Test availability of URW fonts (35) only
+       if Ghostscript _and_ the URW fonts were found at configuration
+       time.
 
        Fixes <https://savannah.gnu.org/bugs/?63808>.  Thanks to Deri
        James for the report and extremely helpful pseudocode.
diff --git a/configure.ac b/configure.ac
index 6cd11fdda..41745b7be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,6 +204,8 @@ AM_CONDITIONAL([USE_GROHTML], [test "$use_grohtml" = yes])
 AM_CONDITIONAL([USE_GROPDF], [test "$use_gropdf" = yes])
 AM_CONDITIONAL([USE_GROFF_ALLOCATOR],
                [test "$groff_use_own_allocator" = yes])
+AM_CONDITIONAL([HAVE_GHOSTSCRIPT], [test "$GHOSTSCRIPT" != no \
+                && test "$GHOSTSCRIPT" != missing])
 AM_CONDITIONAL([HAVE_URW_FONTS], [test "$groff_have_urw_fonts" = yes ])
 AM_CONDITIONAL([HAVE_PDFTOOLS], [test "$groff_have_pdftools" = yes ])
 AM_CONDITIONAL([HAVE_TEXI2DVI], [test "$groff_have_texi2dvi" = yes ])
diff --git a/font/devpdf/devpdf.am b/font/devpdf/devpdf.am
index 51e83336e..ff667255e 100644
--- a/font/devpdf/devpdf.am
+++ b/font/devpdf/devpdf.am
@@ -178,12 +178,24 @@ uninstall_devpdf:
          rmdir $(DESTDIR)$(devpdffontdir); \
        fi
 
+# Automake has no logical 'and' operator; we test HAVE_GHOSTSCRIPT and
+# HAVE_URW_FONTS separately, with a potentially redundant assignment.
+
+if HAVE_GHOSTSCRIPT
+font_devpdf_TESTS = \
+  font/devpdf/tests/basic-fonts-present.sh
+endif
+
+if HAVE_URW_FONTS
 font_devpdf_TESTS = \
   font/devpdf/tests/basic-fonts-present.sh
+endif
 
+if HAVE_GHOSTSCRIPT
 if HAVE_URW_FONTS
 font_devpdf_TESTS += font/devpdf/tests/urw-fonts-present.sh
 endif
+endif
 
 TESTS += $(font_devpdf_TESTS)
 EXTRA_DIST += $(font_devpdf_TESTS)



reply via email to

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