fix NLS (FS#64604)

This commit is contained in:
Christian Hesse 2020-05-11 09:29:58 +00:00
parent 6ec94a78bb
commit ae85cae3de
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,36 @@
From ee855b15ff185bad3b0495500ab234b9cab7436c Mon Sep 17 00:00:00 2001
From: Martin Whitaker <fsf@martin-whitaker.me.uk>
Date: Mon, 24 Feb 2020 22:11:29 +0000
Subject: [PATCH] grub-install: fix inverted test for NLS enabled when copying
locales.
Commit 3d8439da8c9a4acf9bc1c41b364ec6e1680ef052 attempted to avoid
copying locale files to the target directory when NLS was disabled.
However the test is inverted, and it does the opposite.
Signed-off-by: Martin Whitaker <fsf@martin-whitaker.me.uk>
diff --git a/util/grub-install-common.c b/util/grub-install-common.c
index ca0ac612a..f53bf0694 100644
--- a/util/grub-install-common.c
+++ b/util/grub-install-common.c
@@ -598,7 +598,7 @@ copy_all (const char *srcd,
grub_util_fd_closedir (d);
}
-#if !(defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS)
+#if (defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS)
static const char *
get_localedir (void)
{
@@ -659,7 +659,7 @@ static void
grub_install_copy_nls(const char *src __attribute__ ((unused)),
const char *dst __attribute__ ((unused)))
{
-#if !(defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS)
+#if (defined (GRUB_UTIL) && defined(ENABLE_NLS) && ENABLE_NLS)
char *dst_locale;
dst_locale = grub_util_path_concat (2, dst, "locale");
--
2.21.1

View File

@ -23,7 +23,7 @@ pkgname='grub'
pkgdesc='GNU GRand Unified Bootloader (2)' pkgdesc='GNU GRand Unified Bootloader (2)'
_pkgver=2.04 _pkgver=2.04
pkgver=${_pkgver/-/} pkgver=${_pkgver/-/}
pkgrel=6 pkgrel=7
epoch=2 epoch=2
url='https://www.gnu.org/software/grub/' url='https://www.gnu.org/software/grub/'
arch=('x86_64') arch=('x86_64')
@ -64,6 +64,7 @@ source=("git+https://git.savannah.gnu.org/git/grub.git#tag=grub-${_pkgver}?signe
"https://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz"{,.sig} "https://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz"{,.sig}
'0003-10_linux-detect-archlinux-initramfs.patch' '0003-10_linux-detect-archlinux-initramfs.patch'
'0004-add-GRUB_COLOR_variables.patch' '0004-add-GRUB_COLOR_variables.patch'
'0005-grub-install-fix-inverted-test-for-NLS-enabled-when-.patch'
'grub.default') 'grub.default')
sha256sums=('SKIP' sha256sums=('SKIP'
@ -73,6 +74,7 @@ sha256sums=('SKIP'
'SKIP' 'SKIP'
'171415ab075d1ac806f36c454feeb060f870416f24279b70104bba94bd6076d4' '171415ab075d1ac806f36c454feeb060f870416f24279b70104bba94bd6076d4'
'a5198267ceb04dceb6d2ea7800281a42b3f91fd02da55d2cc9ea20d47273ca29' 'a5198267ceb04dceb6d2ea7800281a42b3f91fd02da55d2cc9ea20d47273ca29'
'06820004912a3db195a76e68b376fce1ba6507ac740129f0b99257ef07aba1ea'
'690adb7943ee9fedff578a9d482233925ca3ad3e5a50fffddd27cf33300a89e3') '690adb7943ee9fedff578a9d482233925ca3ad3e5a50fffddd27cf33300a89e3')
_backports=( _backports=(
@ -120,6 +122,9 @@ prepare() {
## Based on http://lists.gnu.org/archive/html/grub-devel/2012-02/msg00021.html ## Based on http://lists.gnu.org/archive/html/grub-devel/2012-02/msg00021.html
patch -Np1 -i "${srcdir}/0004-add-GRUB_COLOR_variables.patch" patch -Np1 -i "${srcdir}/0004-add-GRUB_COLOR_variables.patch"
echo "Patch to NLS installation..."
patch -Np1 -i "${srcdir}/0005-grub-install-fix-inverted-test-for-NLS-enabled-when-.patch"
echo "Fix DejaVuSans.ttf location so that grub-mkfont can create *.pf2 files for starfield theme..." echo "Fix DejaVuSans.ttf location so that grub-mkfont can create *.pf2 files for starfield theme..."
sed 's|/usr/share/fonts/dejavu|/usr/share/fonts/dejavu /usr/share/fonts/TTF|g' -i "configure.ac" sed 's|/usr/share/fonts/dejavu|/usr/share/fonts/dejavu /usr/share/fonts/TTF|g' -i "configure.ac"