From: Richard Marko <srk@48.io>
To: grub-devel@gnu.org
Cc: Richard Marko <srk@48.io>
Subject: [PATCH] configure.ac: Make the unifont FONT_SOURCE configurable as --with-unifont=FILE
Date: Tue, 17 Oct 2023 17:55:58 +0200 [thread overview]
Message-ID: <20231017155558.2453752-1-srk@48.io> (raw)
Revival of https://www.mail-archive.com/grub-devel@gnu.org/msg18492.html
by Mads Kiilerich stripped of setting DJVU_FONT_SOURCE.
Signed-off-by: Richard Marko <srk@48.io>
---
configure.ac | 33 ++++++++++++++++++++-------------
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/configure.ac b/configure.ac
index da9c8d560..7b8c3698c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1832,21 +1832,28 @@ fi
AC_SUBST([DJVU_FONT_SOURCE])
-FONT_SOURCE=
-
-for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
- for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont /usr/share/fonts/uni /usr/share/fonts/truetype/unifont /usr/share/fonts/misc; do
- if test -f "$dir/unifont.$ext"; then
- md5="$(md5sum "$dir/unifont.$ext"|awk '{ print $1; }')"
- # PCF and BDF from version 6.3 isn't hanled properly by libfreetype.
- if test "$md5" = 0a54834d2788c83886a3e1785a6a1e61 || test "$md5" = 28f2565c7a41d8d407e2551159385edb || test "$md5" = dae5e588461b3b92b87b6ffee734f936 || test "$md5" = 4a3d687aa5bb329ed05f4263a1016791 ; then
- continue
+AC_ARG_WITH([unifont],
+ AS_HELP_STRING([--with-unifont=FILE],
+ [set the unifont source [[guessed]]]))
+
+if test "x$with_unifont" = x; then
+ # search in well-known directories
+ for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
+ for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont /usr/share/fonts/uni /usr/share/fonts/truetype/unifont /usr/share/fonts/misc; do
+ if test -f "$dir/unifont.$ext"; then
+ md5="$(md5sum "$dir/unifont.$ext"|awk '{ print $1; }')"
+ # PCF and BDF from version 6.3 isn't hanled properly by libfreetype.
+ if test "$md5" = 0a54834d2788c83886a3e1785a6a1e61 || test "$md5" = 28f2565c7a41d8d407e2551159385edb || test "$md5" = dae5e588461b3b92b87b6ffee734f936 || test "$md5" = 4a3d687aa5bb329ed05f4263a1016791 ; then
+ continue
+ fi
+ FONT_SOURCE="$dir/unifont.$ext"
+ break 2
fi
- FONT_SOURCE="$dir/unifont.$ext"
- break 2
- fi
+ done
done
-done
+else
+ FONT_SOURCE="$with_unifont"
+fi
if test x"$enable_build_grub_mkfont" = xno ; then
FONT_SOURCE=
--
2.42.0
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next reply other threads:[~2023-10-17 15:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 15:55 Richard Marko [this message]
2023-10-18 16:37 ` [PATCH] configure.ac: Make the unifont FONT_SOURCE configurable as --with-unifont=FILE Daniel Kiper
2023-10-19 13:24 ` sorki
2023-10-19 13:22 ` [PATCH v2 1/2] " Richard Marko
2023-10-19 13:22 ` [PATCH v2 2/2] configure.ac: Make the DJVU_FONT_SOURCE configurable as --with-dejavufont=FILE Richard Marko
2023-10-23 14:27 ` Daniel Kiper
2023-10-23 14:22 ` [PATCH v2 1/2] configure.ac: Make the unifont FONT_SOURCE configurable as --with-unifont=FILE Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231017155558.2453752-1-srk@48.io \
--to=srk@48.io \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).