[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 35/39: [m4]: Try to make URW font search deterministic.
From: |
G. Branden Robinson |
Subject: |
[groff] 35/39: [m4]: Try to make URW font search deterministic. |
Date: |
Sun, 9 Oct 2022 23:53:40 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 57cf998eae20fe7c886ec2fbda24248dcafa8209
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Oct 9 21:27:01 2022 -0500
[m4]: Try to make URW font search deterministic.
* m4/groff.m4: Try to make gropdf's search for URW font files more
deterministic. To disambiguate cases where multiple--not necessarily
identical--copies may be found on the system, search _only_ in the
directory given to the `--with-urw-fonts-dir` configure option, if
present. This populates the "Foundry" file generated by the build,
causing gropdf to search there first.
(GROFF_URW_FONTS_PATH): Stop `AC_SUBST`ing `urwfontsdir` here.
(GROFF_URW_FONTS_CHECK): `AC_REQUIRE` `GROFF_URW_FONTS_CHECK` to be
run first. If `urwfontsdir` is not null, search only there for URW
fonts. Assign `urwfontsdir` the value of the directory in which the
fonts are found. Assign it an empty value if none are found. Either
way, `AC_SUBST` the variable.
Attempts to fix <https://savannah.gnu.org/bugs/?62860> (1/2).
---
ChangeLog | 17 +++++++++++++++++
m4/groff.m4 | 14 +++++++++-----
2 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d2cd5ecb6..bbb024544 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2022-10-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * m4/groff.m4: Try to make gropdf's search for URW font files
+ more deterministic. To disambiguate cases where multiple--not
+ necessarily identical--copies may be found on the system, search
+ _only_ in the directory given to the `--with-urw-fonts-dir`
+ configure option, if present. This populates the "Foundry" file
+ generated by the build, causing gropdf to search there first.
+ (GROFF_URW_FONTS_PATH): Stop `AC_SUBST`ing `urwfontsdir` here.
+ (GROFF_URW_FONTS_CHECK): `AC_REQUIRE` `GROFF_URW_FONTS_CHECK` to
+ be run first. If `urwfontsdir` is not null, search only there
+ for URW fonts. Assign `urwfontsdir` the value of the directory
+ in which the fonts are found. Assign it an empty value if none
+ are found. Either way, `AC_SUBST` the variable.
+
+ Attempts to fix <https://savannah.gnu.org/bugs/?62860> (1/2).
+
2022-10-09 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/devices/gropdf/gropdf.pl (LoadFont): Clarify diagnostic.
diff --git a/m4/groff.m4 b/m4/groff.m4
index b9ead007d..a3238dee8 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -284,14 +284,15 @@ AC_DEFUN([GROFF_URW_FONTS_PATH], [
[AS_HELP_STRING([--with-urw-fonts-dir=DIR],
[search for URW PostScript Type 1 fonts in DIR])],
[urwfontsdir="$withval"])
- AC_SUBST(urwfontsdir)])
])
-# Check availability of URW fonts in the search path given by 'gs -h'
-# supplemented with the paths where font/devpdf/Foundry.in expects them,
-# or in the custom directory passed to 'configure'.
+# Check for availability of URW fonts in the directory specified by the
+# user (see GROFF_URW_FONTS_PATH above); alternatively, use the search
+# path given by 'gs -h' (if possible) supplemented with the paths where
+# font/devpdf/Foundry.in expects them.
AC_DEFUN([GROFF_URW_FONTS_CHECK], [
+ AC_REQUIRE([GROFF_URW_FONTS_PATH])
AC_REQUIRE([GROFF_AWK_PATH])
AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH])
groff_have_urw_fonts=no
@@ -313,7 +314,7 @@ AC_DEFUN([GROFF_URW_FONTS_CHECK], [
if test -n "$urwfontsdir"
then
- _list_paths="$ _list_paths $urwfontsdir"
+ _list_paths="$urwfontsdir"
fi
for k in $_list_paths
@@ -328,6 +329,7 @@ AC_DEFUN([GROFF_URW_FONTS_CHECK], [
then
AC_MSG_RESULT([found in $k])
groff_have_urw_fonts=yes
+ urwfontsdir=$k
break 2
fi
done
@@ -336,9 +338,11 @@ AC_DEFUN([GROFF_URW_FONTS_CHECK], [
if test $groff_have_urw_fonts = no
then
AC_MSG_RESULT([none found])
+ urwfontsdir=
fi
AC_SUBST([groff_have_urw_fonts])
+ AC_SUBST(urwfontsdir)
])
AC_DEFUN([GROFF_URW_FONTS_NOTICE], [
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 35/39: [m4]: Try to make URW font search deterministic.,
G. Branden Robinson <=