Add unifonnt and dejavu font support

This commit is contained in:
2025-06-27 12:25:15 +03:00
parent 50216214b7
commit 336296b2f1
2 changed files with 20 additions and 10 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
name: grub name: grub
description: The GRand Unified Bootloader description: The GRand Unified Bootloader
version: 2.12 version: 2.12
revision: 4 revision: 5
url: https://www.gnu.org/software/grub/ url: https://www.gnu.org/software/grub/
license: GPL3-or-later license: GPL3-or-later
architecture: any architecture: any
keep: ["etc/default/grub"] keep: ["etc/default/grub"]
optional_depends: ["os-prober"] optional_depends: ["os-prober"]
make_depends: ["efibootmgr","freetype2"] make_depends: ["efibootmgr","freetype2","gzip","ttf-dejavu"]
type: source type: source
+18 -8
View File
@@ -3,32 +3,39 @@
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
DOWNLOAD="https://ftp.gnu.org/gnu/grub/grub-${BPM_PKG_VERSION}.tar.xz" DOWNLOAD="https://ftp.gnu.org/gnu/grub/grub-${BPM_PKG_VERSION}.tar.xz"
UNIFONT_VERSION=13.0.06 UNIFONT_VERSION="16.0.03"
DOWNLOAD_FONT="https://unifoundry.com/pub/unifont/unifont-13.0.06/font-builds/unifont-${UNIFONT_VERSION}.pcf.gz" DOWNLOAD_UNIFONT="https://ftp.gnu.org/gnu/unifont/unifont-${UNIFONT_VERSION}/unifont-${UNIFONT_VERSION}.bdf.gz"
FILENAME="${DOWNLOAD##*/}" FILENAME="${DOWNLOAD##*/}"
FILENAME_FONT="${DOWNLOAD##*/}" FILENAME_UNIFONT="${DOWNLOAD_UNIFONT##*/}"
# The prepare function is executed in the root of the temp directory # The prepare function is executed in the root of the temp directory
# This function is used for downloading files and putting them into the correct location # This function is used for downloading files and putting them into the correct location
prepare() { prepare() {
wget "$DOWNLOAD" wget "$DOWNLOAD"
wget "$DOWNLOAD_FONT" -O unifont.pcf.gz wget "$DOWNLOAD_UNIFONT"
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
mkdir -p "$BPM_OUTPUT"/usr/share/fonts/unifont/
gunzip -c unifont.pcf.gz > "$BPM_OUTPUT"/usr/share/fonts/unifont/unifont.pcf # Decompress unifont file to source directory
gunzip -c "$FILENAME_UNIFONT" > "$BPM_SOURCE"/unifont.bdf
} }
# The build function is executed in the source directory # The build function is executed in the source directory
# This function is used to compile the source code # This function is used to compile the source code
build() { build() {
unset {C,CPP,CXX,LD}FLAGS unset {C,CPP,CXX,LD}FLAGS
# Add missing file
echo depends bli part_gpt > grub-core/extra_deps.lst echo depends bli part_gpt > grub-core/extra_deps.lst
# Fix dejavu font directory
sed 's|/usr/share/fonts/dejavu|/usr/share/fonts/dejavu /usr/share/fonts/TTF|g' -i "configure.ac"
autoreconf -fi
./configure --prefix=/usr \ ./configure --prefix=/usr \
--sysconfdir=/etc \ --sysconfdir=/etc \
--disable-efiemu \ --disable-efiemu \
--disable-werror \ --disable-werror \
--disable-efiemu \
--enable-grub-mkfont \
--with-platform=efi \ --with-platform=efi \
--target=x86_64 --target=x86_64
make make
@@ -39,6 +46,9 @@ build() {
package() { package() {
make DESTDIR="$BPM_OUTPUT" install make DESTDIR="$BPM_OUTPUT" install
#Install font data files
install -Dm644 ascii.h widthspec.h *.pf2 "$BPM_OUTPUT"/usr/share/grub/
# Install bash completions # Install bash completions
install -dm755 "$BPM_OUTPUT"/usr/share/bash-completion/completions/ install -dm755 "$BPM_OUTPUT"/usr/share/bash-completion/completions/
mv "$BPM_OUTPUT"/etc/bash_completion.d/grub "$BPM_OUTPUT"/usr/share/bash-completion/completions mv "$BPM_OUTPUT"/etc/bash_completion.d/grub "$BPM_OUTPUT"/usr/share/bash-completion/completions