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

[PATCH 5/7] Include a BDF font on Hurd images.



The BGF font used by bogl-bterm is built from the reduced BDF font, but
the Hurd console uses BDF fonts directly.

In order to be able to build both kinds, the unifont.bdf target is split
into two stages (full bdf -> reduced bdf -> reduced bgf). Hurd will uses
the reduced BDF font directly, other systems will convert it to BGF first.

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
---
 Makefile |   23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 556cbe0..2d855cb 100644
--- a/Makefile
+++ b/Makefile
@@ -624,7 +624,7 @@ sources.list.udeb:
 # Use the UTF-8 locale in installation-locale. This target shouldn't
 # be called when it is not present anyway.
 # The locale must be generated after installing the package locales
-$(TREE)/lib/unifont.bgf: $(TEMP)/all.utf
+$(TEMP)/unifont.bdf: $(TEMP)/all.utf
 	@set -e; \
 	CHARMAP=`LOCPATH=$(LOCALE_PATH) LC_ALL=C.UTF-8 locale charmap`; \
             if [ UTF-8 != "$$CHARMAP" ]; then \
@@ -633,8 +633,17 @@ $(TREE)/lib/unifont.bgf: $(TEMP)/all.utf
 		echo "a version of glibc with a different locale data format.)"; \
 	        exit 1; \
 	    fi
-	LOCPATH=$(LOCALE_PATH) LC_ALL=C.UTF-8 reduce-font /usr/src/unifont.bdf < $(TEMP)/all.utf > $(TEMP)/unifont.bdf
-	bdftobogl -b $(TEMP)/unifont.bdf > $@.tmp
+	LOCPATH=$(LOCALE_PATH) LC_ALL=C.UTF-8 reduce-font /usr/src/unifont.bdf < $(TEMP)/all.utf > $@.tmp
+	mv $@.tmp $@
+
+$(TREE)/lib/unifont.bgf: $(TEMP)/unifont.bdf
+	bdftobogl -b $< > $@.tmp
+	mv $@.tmp $@
+
+# The Hurd console uses BDF fonts instead
+$(TREE)/lib/unifont.bdf: $(TEMP)/unifont.bdf
+	mkdir -p $(dir $@)
+	cp $< $@.tmp
 	mv $@.tmp $@
 
 # Create a compressed image of the root filesystem.
@@ -648,10 +657,18 @@ $(TEMP_INITRD): $(STAMPS)tree-$(targetstring)-stamp arch_tree
 		exit 1; \
 	fi
 
+ifneq ($(DEB_HOST_ARCH_OS),hurd)
 	# Only build the font if we have installation-locale
 	if [ -d "$(LOCALE_PATH)/C.UTF-8" ] && [ -e /usr/src/unifont.bdf ]; then \
 		$(submake) $(TREE)/lib/unifont.bgf; \
 	fi
+else
+	# The hurd console uses a BDF font
+	if [ -d "$(LOCALE_PATH)/C.UTF-8" ] && [ -e /usr/src/unifont.bdf ]; then \
+		$(submake) $(TREE)/usr/share/hurd/vga-system.bdf; \
+	fi
+endif
+
 	install -d $(TEMP)
 
 	case $(INITRD_FS) in \
-- 
1.7.1


Reply to: