at 23.11-beta 80 lines 2.5 kB view raw
1Add /etc/kbd to the list of directories to search for the console 2fonts, screen mappings, Unicode maps, keytable files, etc. 3 4Without this patch, kbd will only look inside 5/nix/store/<hash>-kbd-x.x.x/share. 6 7--- a/src/libkeymap/analyze.l 8+++ b/src/libkeymap/analyze.l 9@@ -109,6 +109,9 @@ static const char *const include_dirpath1[] = { 10 NULL 11 }; 12 static const char *const include_dirpath3[] = { 13+ "/etc/kbd/" KEYMAPDIR "/include/", 14+ "/etc/kbd/" KEYMAPDIR "/i386/include/", 15+ "/etc/kbd/" KEYMAPDIR "/mac/include/", 16 DATADIR "/" KEYMAPDIR "/include/", 17 DATADIR "/" KEYMAPDIR "/i386/include/", 18 DATADIR "/" KEYMAPDIR "/mac/include/", 19--- a/src/libkfont/context.c 20+++ b/src/libkfont/context.c 21@@ -13,5 +13,6 @@ 22 /* search for the map file in these directories (with trailing /) */ 23 static const char *const mapdirpath[] = { 24+ "/etc/kbd/" TRANSDIR "/", 25 DATADIR "/" TRANSDIR "/", 26 NULL 27 }; 28@@ -28,5 +29,6 @@ static const char *const mapsuffixes[] = { 29 /* search for the font in these directories (with trailing /) */ 30 static const char *const fontdirpath[] = { 31+ "/etc/kbd/" FONTDIR "/", 32 DATADIR "/" FONTDIR "/", 33 NULL 34 }; 35@@ -42,5 +44,6 @@ static char const *const fontsuffixes[] = { 36 37 static const char *const unidirpath[] = { 38+ "/etc/kbd/" UNIMAPDIR "/", 39 DATADIR "/" UNIMAPDIR "/", 40 NULL 41 }; 42@@ -55,5 +58,6 @@ static const char *const unisuffixes[] = { 43 /* hide partial fonts a bit - loading a single one is a bad idea */ 44 const char *const partfontdirpath[] = { 45+ "/etc/kbd/" FONTDIR "/" PARTIALDIR "/", 46 DATADIR "/" FONTDIR "/" PARTIALDIR "/", 47 NULL 48 }; 49--- a/src/loadkeys.c 50+++ b/src/loadkeys.c 51@@ -27,5 +27,6 @@ 52 53 static const char *const dirpath1[] = { 54+ "/etc/kbd/" KEYMAPDIR "/**", 55 DATADIR "/" KEYMAPDIR "/**", 56 KERNDIR "/", 57 NULL 58--- a/src/resizecons.c 59+++ b/src/resizecons.c 60@@ -104,6 +104,7 @@ static void vga_set_verticaldisplayend_lowbyte(int); 61 62 const char *const dirpath[] = { 63 "", 64+ "/etc/kbd/" VIDEOMODEDIR "/", 65 DATADIR "/" VIDEOMODEDIR "/", 66 NULL 67 }; 68--- a/src/setfont.c 69+++ b/src/setfont.c 70@@ -48,8 +48,8 @@ usage(void) 71 " -v Be verbose.\n" 72 " -C <cons> Indicate console device to be used.\n" 73 " -V Print version and exit.\n" 74- "Files are loaded from the current directory or %s/*/.\n"), 75- DATADIR); 76+ "Files are loaded from the current directory or %s/*/ or %s/*/.\n"), 77+ DATADIR, "/etc/kbd"); 78 exit(EX_USAGE); 79 } 80