diff options
author | Llewelyn Trahaearn | 2018-06-13 21:30:50 -0700 |
---|---|---|
committer | Llewelyn Trahaearn | 2018-06-13 21:30:50 -0700 |
commit | a9efb92bdc098974c391c150de0368ab95e965d9 (patch) | |
tree | b7b080d7bd591861cea3ff128a3ef452192d0b51 | |
parent | 1bcef4fd84ec8ddd27671e0924c47ebf73658008 (diff) | |
download | aur-a9efb92bdc098974c391c150de0368ab95e965d9.tar.gz |
Adopt FreeType fixes from Debian. Added conditional to fix issues with i386-efi builds.
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 27 | ||||
-rw-r--r-- | freetype-capitalise-variables.patch | 126 | ||||
-rw-r--r-- | freetype-pkg-config.patch | 194 | ||||
-rw-r--r-- | intel-ucode.patch | 52 |
5 files changed, 348 insertions, 67 deletions
@@ -1,8 +1,6 @@ -# Generated by mksrcinfo v8 -# Sat Jan 27 01:34:16 UTC 2018 pkgbase = grub-git pkgdesc = GNU GRand Unified Bootloader (2) - pkgver = 2.02.r86.gb4d709b6e + pkgver = 2.02.r147.gba474d531 pkgrel = 1 url = https://www.gnu.org/software/grub/ install = grub-git.install @@ -36,12 +34,12 @@ pkgbase = grub-git provides = grub-common provides = grub-bios provides = grub-emu - provides = grub-efi- + provides = grub-efi-x86_64 conflicts = grub conflicts = grub-common conflicts = grub-bios conflicts = grub-emu - conflicts = grub-efi- + conflicts = grub-efi-x86_64 conflicts = grub-legacy options = !makeflags backup = boot/grub/grub.cfg @@ -51,18 +49,22 @@ pkgbase = grub-git source = grub-extras::git+git://git.savannah.gnu.org/grub-extras.git source = https://ftp.gnu.org/gnu/unifont/unifont-10.0.06/unifont-10.0.06.bdf.gz source = https://ftp.gnu.org/gnu/unifont/unifont-10.0.06/unifont-10.0.06.bdf.gz.sig - source = intel-ucode.patch source = 10_linux-detect-archlinux-initramfs.patch source = add-GRUB_COLOR_variables.patch + source = freetype-capitalise-variables.patch + source = freetype-pkg-config.patch source = grub.default source = grub.cfg + validpgpkeys = E53D497F3FA42AD8C9B4D1E835A93B74E82E4209 + validpgpkeys = 95D2E9AB8740D8046387FD151A09227B1F435A33 sha256sums = SKIP sha256sums = SKIP sha256sums = 0d81571fc519573057b7641d26a31ead55cc0b02a931589fb346a3a534c3dcc1 sha256sums = SKIP - sha256sums = 37adb95049f6cdcbdbf60ed6b6440c5be99a4cd307a0f96c3c3837b6c2e07f3c sha256sums = b41e4438319136b5e74e0abdfcb64ae115393e4e15207490272c425f54026dd3 sha256sums = a5198267ceb04dceb6d2ea7800281a42b3f91fd02da55d2cc9ea20d47273ca29 + sha256sums = 4153565a0e1428bdacf09a0c646d2106c75182f1753e2a044896d23752295569 + sha256sums = 3da2764ecc0c2f3cf9a3f94660ed3ebfc1192c6b3df0ee27d78622bf9718228d sha256sums = 74e5dd2090a153c10a7b9599b73bb09e70fddc6a019dd41641b0f10b9d773d82 sha256sums = c5e4f3836130c6885e9273c21f057263eba53f4b7c0e2f111f6e5f2e487a47ad @@ -18,7 +18,7 @@ _UNIFONT_VER="10.0.06" [[ "${CARCH}" == "i686" ]] && _EMU_ARCH="i386" pkgname="grub-git" -pkgver=2.02.r86.gb4d709b6e +pkgver=2.02.r147.gba474d531 pkgrel=1 pkgdesc="GNU GRand Unified Bootloader (2)" arch=('x86_64' 'i686') @@ -51,18 +51,20 @@ install="${pkgname}.install" source=("grub::git+git://git.savannah.gnu.org/grub.git" "grub-extras::git+git://git.savannah.gnu.org/grub-extras.git" "https://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz"{,.sig} - 'intel-ucode.patch' '10_linux-detect-archlinux-initramfs.patch' 'add-GRUB_COLOR_variables.patch' + 'freetype-capitalise-variables.patch' + 'freetype-pkg-config.patch' 'grub.default' 'grub.cfg') sha256sums=('SKIP' 'SKIP' '0d81571fc519573057b7641d26a31ead55cc0b02a931589fb346a3a534c3dcc1' 'SKIP' - '37adb95049f6cdcbdbf60ed6b6440c5be99a4cd307a0f96c3c3837b6c2e07f3c' 'b41e4438319136b5e74e0abdfcb64ae115393e4e15207490272c425f54026dd3' 'a5198267ceb04dceb6d2ea7800281a42b3f91fd02da55d2cc9ea20d47273ca29' + '4153565a0e1428bdacf09a0c646d2106c75182f1753e2a044896d23752295569' + '3da2764ecc0c2f3cf9a3f94660ed3ebfc1192c6b3df0ee27d78622bf9718228d' '74e5dd2090a153c10a7b9599b73bb09e70fddc6a019dd41641b0f10b9d773d82' 'c5e4f3836130c6885e9273c21f057263eba53f4b7c0e2f111f6e5f2e487a47ad') validpgpkeys=('E53D497F3FA42AD8C9B4D1E835A93B74E82E4209' # Vladimir 'phcoder' Serbinenko <phcoder@gmail.com> @@ -71,10 +73,6 @@ validpgpkeys=('E53D497F3FA42AD8C9B4D1E835A93B74E82E4209' # Vladimir 'phcoder' S prepare() { cd grub - msg "Patch to load Intel microcode" - patch -Np1 -i "${srcdir}/intel-ucode.patch" - echo - msg "Patch to detect of Arch Linux initramfs images by grub-mkconfig" patch -Np1 -i "${srcdir}/10_linux-detect-archlinux-initramfs.patch" echo @@ -84,6 +82,12 @@ prepare() { patch -Np1 -i "${srcdir}/add-GRUB_COLOR_variables.patch" echo + msg "Capitalise FreeType vairables to conform to pkg-config macros" + patch -Np1 -i "${srcdir}/freetype-capitalise-variables.patch" + + msg "Use pkg-config to locate FreeType" + patch -Np1 -i "${srcdir}/freetype-pkg-config.patch" + msg "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" @@ -100,7 +104,8 @@ prepare() { msg "Remove not working langs which need LC_ALL=C.UTF-8" sed -e 's#en@cyrillic en@greek##g' -i "po/LINGUAS" - msg "Avoid problem with unifont during compile of grub, http://savannah.gnu.org/bugs/?40330 and https://bugs.archlinux.org/task/37847" + msg "Avoid problem with unifont during compile of grub" + # http://savannah.gnu.org/bugs/?40330 and https://bugs.archlinux.org/task/37847 cp "${srcdir}/unifont-${_UNIFONT_VER}.bdf" "unifont.bdf" } @@ -176,6 +181,12 @@ _build_grub-efi() { cp -r "${srcdir}/grub" "${srcdir}/grub-efi-${_EFI_ARCH}" cd "${srcdir}/grub-efi-${_EFI_ARCH}" + if [[ "${_EFI_ARCH}" == "i386" ]]; then + msg "Fix EFI build for i386" + sed '/i386 = lib\/i386\/reboot.c;/d' -i "grub-core/Makefile.core.def" + sed '/i386 = lib\/i386\/reboot_trampoline.S;/d' -i "grub-core/Makefile.core.def" + fi + msg "Unset all compiler FLAGS for ${_EFI_ARCH} efi build" unset CFLAGS unset CPPFLAGS diff --git a/freetype-capitalise-variables.patch b/freetype-capitalise-variables.patch new file mode 100644 index 000000000000..5bc910170248 --- /dev/null +++ b/freetype-capitalise-variables.patch @@ -0,0 +1,126 @@ +From 01bb49000c52737f07b6c6d7a825db848ca131ee Mon Sep 17 00:00:00 2001 +From: Colin Watson <cjwatson@ubuntu.com> +Date: Tue, 30 Jan 2018 14:08:26 +0000 +Subject: build: Capitalise *freetype_* variables + +Using FREETYPE_CFLAGS and FREETYPE_LIBS is more in line with the naming +scheme used by pkg-config macros. + +Bug-Debian: https://bugs.debian.org/887721 +Last-Update: 2018-02-11 + +Patch-Name: freetype-capitalise-variables.patch +--- + Makefile.am | 6 +++--- + Makefile.util.def | 4 ++-- + configure.ac | 24 ++++++++++++------------ + 3 files changed, 17 insertions(+), 17 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index f0ab1adc3..b47b4b1ac 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -71,7 +71,7 @@ endif + starfield_theme_files = $(srcdir)/themes/starfield/blob_w.png $(srcdir)/themes/starfield/boot_menu_c.png $(srcdir)/themes/starfield/boot_menu_e.png $(srcdir)/themes/starfield/boot_menu_ne.png $(srcdir)/themes/starfield/boot_menu_n.png $(srcdir)/themes/starfield/boot_menu_nw.png $(srcdir)/themes/starfield/boot_menu_se.png $(srcdir)/themes/starfield/boot_menu_s.png $(srcdir)/themes/starfield/boot_menu_sw.png $(srcdir)/themes/starfield/boot_menu_w.png $(srcdir)/themes/starfield/slider_c.png $(srcdir)/themes/starfield/slider_n.png $(srcdir)/themes/starfield/slider_s.png $(srcdir)/themes/starfield/starfield.png $(srcdir)/themes/starfield/terminal_box_c.png $(srcdir)/themes/starfield/terminal_box_e.png $(srcdir)/themes/starfield/terminal_box_ne.png $(srcdir)/themes/starfield/terminal_box_n.png $(srcdir)/themes/starfield/terminal_box_nw.png $(srcdir)/themes/starfield/terminal_box_se.png $(srcdir)/themes/starfield/terminal_box_s.png $(srcdir)/themes/starfield/terminal_box_sw.png $(srcdir)/themes/starfield/terminal_box_w.png $(srcdir)/themes/starfield/theme.txt $(srcdir)/themes/starfield/README $(srcdir)/themes/starfield/COPYING.CC-BY-SA-3.0 + + build-grub-mkfont$(BUILD_EXEEXT): util/grub-mkfont.c grub-core/unidata.c grub-core/kern/emu/misc.c util/misc.c +- $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 -DGRUB_BUILD_PROGRAM_NAME=\"build-grub-mkfont\" $^ $(build_freetype_cflags) $(build_freetype_libs) ++ $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 -DGRUB_BUILD_PROGRAM_NAME=\"build-grub-mkfont\" $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) + CLEANFILES += build-grub-mkfont$(BUILD_EXEEXT) + + garbage-gen$(BUILD_EXEEXT): util/garbage-gen.c +@@ -80,11 +80,11 @@ CLEANFILES += garbage-gen$(BUILD_EXEEXT) + EXTRA_DIST += util/garbage-gen.c + + build-grub-gen-asciih$(BUILD_EXEEXT): util/grub-gen-asciih.c +- $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(build_freetype_cflags) $(build_freetype_libs) -Wall -Werror ++ $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall -Werror + CLEANFILES += build-grub-gen-asciih$(BUILD_EXEEXT) + + build-grub-gen-widthspec$(BUILD_EXEEXT): util/grub-gen-widthspec.c +- $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(build_freetype_cflags) $(build_freetype_libs) -Wall -Werror ++ $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) -DGRUB_MKFONT=1 -DGRUB_BUILD=1 -DGRUB_UTIL=1 $^ $(BUILD_FREETYPE_CFLAGS) $(BUILD_FREETYPE_LIBS) -Wall -Werror + CLEANFILES += build-grub-gen-widthspec$(BUILD_EXEEXT) + + if COND_STARFIELD +diff --git a/Makefile.util.def b/Makefile.util.def +index 168acbe59..fa39d8bd1 100644 +--- a/Makefile.util.def ++++ b/Makefile.util.def +@@ -302,14 +302,14 @@ program = { + common = grub-core/kern/emu/argp_common.c; + common = grub-core/osdep/init.c; + +- cflags = '$(freetype_cflags)'; ++ cflags = '$(FREETYPE_CFLAGS)'; + cppflags = '-DGRUB_MKFONT=1'; + + ldadd = libgrubmods.a; + ldadd = libgrubgcry.a; + ldadd = libgrubkern.a; + ldadd = grub-core/gnulib/libgnu.a; +- ldadd = '$(freetype_libs)'; ++ ldadd = '$(FREETYPE_LIBS)'; + ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)'; + condition = COND_GRUB_MKFONT; + }; +diff --git a/configure.ac b/configure.ac +index cd1f49837..85c23bd62 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1505,12 +1505,12 @@ unset ac_cv_header_ft2build_h + + if test x"$grub_mkfont_excuse" = x ; then + # Check for freetype libraries. +- freetype_cflags=`$FREETYPE --cflags` +- freetype_libs=`$FREETYPE --libs` ++ FREETYPE_CFLAGS=`$FREETYPE --cflags` ++ FREETYPE_LIBS=`$FREETYPE --libs` + SAVED_CPPFLAGS="$CPPFLAGS" + SAVED_LIBS="$LIBS" +- CPPFLAGS="$CPPFLAGS $freetype_cflags" +- LIBS="$LIBS $freetype_libs" ++ CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" ++ LIBS="$LIBS $FREETYPE_LIBS" + AC_CHECK_HEADERS([ft2build.h], [], + [grub_mkfont_excuse=["need freetype2 headers"]]) + AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Load_Glyph])], [], [grub_mkfont_excuse=["freetype2 library unusable"]]) +@@ -1527,8 +1527,8 @@ else + enable_grub_mkfont=no + fi + AC_SUBST([enable_grub_mkfont]) +-AC_SUBST([freetype_cflags]) +-AC_SUBST([freetype_libs]) ++AC_SUBST([FREETYPE_CFLAGS]) ++AC_SUBST([FREETYPE_LIBS]) + + SAVED_CC="$CC" + SAVED_CPP="$CPP" +@@ -1566,12 +1566,12 @@ fi + + if test x"$grub_build_mkfont_excuse" = x ; then + # Check for freetype libraries. +- build_freetype_cflags=`$BUILD_FREETYPE --cflags` +- build_freetype_libs=`$BUILD_FREETYPE --libs` ++ BUILD_FREETYPE_CFLAGS=`$BUILD_FREETYPE --cflags` ++ BUILD_FREETYPE_LIBS=`$BUILD_FREETYPE --libs` + SAVED_CPPFLAGS_2="$CPPFLAGS" + SAVED_LIBS="$LIBS" +- CPPFLAGS="$CPPFLAGS $build_freetype_cflags" +- LIBS="$LIBS $build_freetype_libs" ++ CPPFLAGS="$CPPFLAGS $BUILD_FREETYPE_CFLAGS" ++ LIBS="$LIBS $BUILD_FREETYPE_LIBS" + AC_CHECK_HEADERS([ft2build.h], [], + [grub_build_mkfont_excuse=["need freetype2 headers"]]) + AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Load_Glyph])], [], [grub_build_mkfont_excuse=["freetype2 library unusable"]]) +@@ -1595,8 +1595,8 @@ if test x"$enable_build_grub_mkfont" = xno && ( test "x$platform" = xqemu || tes + fi + fi + +-AC_SUBST([build_freetype_cflags]) +-AC_SUBST([build_freetype_libs]) ++AC_SUBST([BUILD_FREETYPE_CFLAGS]) ++AC_SUBST([BUILD_FREETYPE_LIBS]) + + CC="$SAVED_CC" + CPP="$SAVED_CPP" diff --git a/freetype-pkg-config.patch b/freetype-pkg-config.patch new file mode 100644 index 000000000000..257fc4559cc2 --- /dev/null +++ b/freetype-pkg-config.patch @@ -0,0 +1,194 @@ +From fd8c854f413e4a204cf92b226424ba544bf4369b Mon Sep 17 00:00:00 2001 +From: Colin Watson <cjwatson@ubuntu.com> +Date: Tue, 30 Jan 2018 21:54:17 +0000 +Subject: build: Use pkg-config to find FreeType + +pkg-config is apparently preferred over freetype-config these days (see +the BUGS section of freetype-config(1)). pkg-config support was added +to FreeType in version 2.1.5, which was released in 2003, so it should +comfortably be available everywhere by now. + +We no longer need to explicitly substitute FREETYPE_CFLAGS and +FREETYPE_LIBS, since PKG_CHECK_MODULES does that automatically. + +Fixes Debian bug #887721. + +Reported-by: Hugh McMaster <hugh.mcmaster@outlook.com> +Signed-off-by: Colin Watson <cjwatson@ubuntu.com> + +Bug-Debian: https://bugs.debian.org/887721 +Last-Update: 2018-02-11 + +Patch-Name: freetype-pkg-config.patch +--- + INSTALL | 11 +++++---- + configure.ac | 74 +++++++++++++++++++++++++----------------------------------- + 2 files changed, 37 insertions(+), 48 deletions(-) + +diff --git a/INSTALL b/INSTALL +index f3c20edc8..b370d7753 100644 +--- a/INSTALL ++++ b/INSTALL +@@ -37,6 +37,7 @@ configuring the GRUB. + * GNU gettext 0.17 or later + * GNU binutils 2.9.1.0.23 or later + * Flex 2.5.35 or later ++* pkg-config + * Other standard GNU/Unix tools + * a libc with large file support (e.g. glibc 2.1 or later) + +@@ -52,7 +53,7 @@ For optional grub-emu features, you need: + + To build GRUB's graphical terminal (gfxterm), you need: + +-* FreeType 2 or later ++* FreeType 2.1.5 or later + * GNU Unifont + + If you use a development snapshot or want to hack on GRUB you may +@@ -158,8 +159,8 @@ For this example the configure line might look like (more details below) + (some options are optional and included here for completeness but some rarely + used options are omitted): + +-./configure BUILD_CC=gcc BUILD_FREETYPE=freetype-config --host=amd64-linux-gnu +-CC=amd64-linux-gnu-gcc CFLAGS="-g -O2" FREETYPE=amd64-linux-gnu-freetype-config ++./configure BUILD_CC=gcc BUILD_PKG_CONFIG=pkg-config --host=amd64-linux-gnu ++CC=amd64-linux-gnu-gcc CFLAGS="-g -O2" PKG_CONFIG=amd64-linux-gnu-pkg-config + --target=arm --with-platform=uboot TARGET_CC=arm-elf-gcc + TARGET_CFLAGS="-Os -march=armv6" TARGET_CCASFLAGS="-march=armv6" + TARGET_OBJCOPY="arm-elf-objcopy" TARGET_STRIP="arm-elf-strip" +@@ -176,7 +177,7 @@ corresponding platform are not needed for the platform in question. + 2. BUILD_CFLAGS= for C options for build. + 3. BUILD_CPPFLAGS= for C preprocessor options for build. + 4. BUILD_LDFLAGS= for linker options for build. +- 5. BUILD_FREETYPE= for freetype-config for build (optional). ++ 5. BUILD_PKG_CONFIG= for pkg-config for build (optional). + + - For host + 1. --host= to autoconf name of host. +@@ -184,7 +185,7 @@ corresponding platform are not needed for the platform in question. + 3. HOST_CFLAGS= for C options for host. + 4. HOST_CPPFLAGS= for C preprocessor options for host. + 5. HOST_LDFLAGS= for linker options for host. +- 6. FREETYPE= for freetype-config for host (optional). ++ 6. PKG_CONFIG= for pkg-config for host (optional). + 7. Libdevmapper if any must be in standard linker folders (-ldevmapper) (optional). + 8. Libfuse if any must be in standard linker folders (-lfuse) (optional). + 9. Libzfs if any must be in standard linker folders (-lzfs) (optional). +diff --git a/configure.ac b/configure.ac +index 85c23bd62..f102b7024 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -50,6 +50,10 @@ AC_PREREQ(2.60) + AC_CONFIG_SRCDIR([include/grub/dl.h]) + AC_CONFIG_HEADER([config-util.h]) + ++# Explicitly check for pkg-config early on, since otherwise conditional ++# calls are problematic. ++PKG_PROG_PKG_CONFIG ++ + # Program name transformations + AC_ARG_PROGRAM + grub_TRANSFORM([grub-bios-setup]) +@@ -1493,29 +1497,22 @@ if test x"$enable_grub_mkfont" = xno ; then + grub_mkfont_excuse="explicitly disabled" + fi + +-if test x"$grub_mkfont_excuse" = x ; then +- # Check for freetype libraries. +- AC_CHECK_TOOLS([FREETYPE], [freetype-config]) +- if test "x$FREETYPE" = x ; then +- grub_mkfont_excuse=["need freetype2 library"] +- fi +-fi +- + unset ac_cv_header_ft2build_h + + if test x"$grub_mkfont_excuse" = x ; then + # Check for freetype libraries. +- FREETYPE_CFLAGS=`$FREETYPE --cflags` +- FREETYPE_LIBS=`$FREETYPE --libs` +- SAVED_CPPFLAGS="$CPPFLAGS" +- SAVED_LIBS="$LIBS" +- CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" +- LIBS="$LIBS $FREETYPE_LIBS" +- AC_CHECK_HEADERS([ft2build.h], [], +- [grub_mkfont_excuse=["need freetype2 headers"]]) +- AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Load_Glyph])], [], [grub_mkfont_excuse=["freetype2 library unusable"]]) +- CPPFLAGS="$SAVED_CPPFLAGS" +- LIBS="$SAVED_LIBS" ++ PKG_CHECK_MODULES([FREETYPE], [freetype2], [ ++ SAVED_CPPFLAGS="$CPPFLAGS" ++ SAVED_LIBS="$LIBS" ++ CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" ++ LIBS="$LIBS $FREETYPE_LIBS" ++ AC_CHECK_HEADERS([ft2build.h], [], ++ [grub_mkfont_excuse=["need freetype2 headers"]]) ++ AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Load_Glyph])], [], ++ [grub_mkfont_excuse=["freetype2 library unusable"]]) ++ CPPFLAGS="$SAVED_CPPFLAGS" ++ LIBS="$SAVED_LIBS" ++ ], [grub_mkfont_excuse=["need freetype2 library"]]) + fi + + if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then +@@ -1527,8 +1524,6 @@ else + enable_grub_mkfont=no + fi + AC_SUBST([enable_grub_mkfont]) +-AC_SUBST([FREETYPE_CFLAGS]) +-AC_SUBST([FREETYPE_LIBS]) + + SAVED_CC="$CC" + SAVED_CPP="$CPP" +@@ -1558,25 +1553,21 @@ AC_SUBST([BUILD_WORDS_BIGENDIAN]) + + if test x"$grub_build_mkfont_excuse" = x ; then + # Check for freetype libraries. +- AC_CHECK_PROGS([BUILD_FREETYPE], [freetype-config]) +- if test "x$BUILD_FREETYPE" = x ; then +- grub_build_mkfont_excuse=["need freetype2 library"] +- fi +-fi +- +-if test x"$grub_build_mkfont_excuse" = x ; then +- # Check for freetype libraries. +- BUILD_FREETYPE_CFLAGS=`$BUILD_FREETYPE --cflags` +- BUILD_FREETYPE_LIBS=`$BUILD_FREETYPE --libs` +- SAVED_CPPFLAGS_2="$CPPFLAGS" +- SAVED_LIBS="$LIBS" +- CPPFLAGS="$CPPFLAGS $BUILD_FREETYPE_CFLAGS" +- LIBS="$LIBS $BUILD_FREETYPE_LIBS" +- AC_CHECK_HEADERS([ft2build.h], [], +- [grub_build_mkfont_excuse=["need freetype2 headers"]]) +- AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Load_Glyph])], [], [grub_build_mkfont_excuse=["freetype2 library unusable"]]) +- LIBS="$SAVED_LIBS" +- CPPFLAGS="$SAVED_CPPFLAGS_2" ++ SAVED_PKG_CONFIG="$PKG_CONFIG" ++ test -z "$BUILD_PKG_CONFIG" || PKG_CONFIG="$BUILD_PKG_CONFIG" ++ PKG_CHECK_MODULES([BUILD_FREETYPE], [freetype2], [ ++ SAVED_CPPFLAGS_2="$CPPFLAGS" ++ SAVED_LIBS="$LIBS" ++ CPPFLAGS="$CPPFLAGS $BUILD_FREETYPE_CFLAGS" ++ LIBS="$LIBS $BUILD_FREETYPE_LIBS" ++ AC_CHECK_HEADERS([ft2build.h], [], ++ [grub_build_mkfont_excuse=["need freetype2 headers"]]) ++ AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Load_Glyph])], [], ++ [grub_build_mkfont_excuse=["freetype2 library unusable"]]) ++ LIBS="$SAVED_LIBS" ++ CPPFLAGS="$SAVED_CPPFLAGS_2" ++ ], [grub_build_mkfont_excuse=["need freetype2 library"]]) ++ PKG_CONFIG="$SAVED_PKG_CONFIG" + fi + + if test x"$enable_build_grub_mkfont" = xyes && test x"$grub_build_mkfont_excuse" != x ; then +@@ -1595,9 +1586,6 @@ if test x"$enable_build_grub_mkfont" = xno && ( test "x$platform" = xqemu || tes + fi + fi + +-AC_SUBST([BUILD_FREETYPE_CFLAGS]) +-AC_SUBST([BUILD_FREETYPE_LIBS]) +- + CC="$SAVED_CC" + CPP="$SAVED_CPP" + CFLAGS="$SAVED_CFLAGS" diff --git a/intel-ucode.patch b/intel-ucode.patch deleted file mode 100644 index 98d8de82d0c0..000000000000 --- a/intel-ucode.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index de9044c..f5d3e78 100644 ---- a/util/grub.d/10_linux.in -+++ b/util/grub.d/10_linux.in -@@ -133,13 +133,15 @@ linux_entry () - echo '$(echo "$message" | grub_quote)' - linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} - EOF -- if test -n "${initrd}" ; then -+ if test -n "${initrd}" -o -n "${initrd_extra}" ; then - # TRANSLATORS: ramdisk isn't identifier. Should be translated. - message="$(gettext_printf "Loading initial ramdisk ...")" -- sed "s/^/$submenu_indentation/" << EOF -- echo '$(echo "$message" | grub_quote)' -- initrd ${rel_dirname}/${initrd} --EOF -+ printf ' %s\n' "echo '$(echo "$message" | grub_quote)'" | sed "s/^/$submenu_indentation/" -+ printf ' %s ' 'initrd' | sed "s/^/$submenu_indentation/" -+ for i in ${initrd_extra} ${initrd}; do -+ printf ' %s/%s' "${rel_dirname}" "${i}" -+ done -+ printf '\n' - fi - sed "s/^/$submenu_indentation/" << EOF - } -@@ -202,6 +204,12 @@ while [ "x$list" != "x" ] ; do - break - fi - done -+ initrd_extra= -+ for i in intel-ucode.img; do -+ if test -e "${dirname}/${i}" ; then -+ initrd_extra="${initrd_extra} ${i}" -+ fi -+ done - - config= - for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do -@@ -216,8 +224,8 @@ while [ "x$list" != "x" ] ; do - initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"` - fi - -- if test -n "${initrd}" ; then -- gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2 -+ if test -n "${initrd}" -o -n "${initrd_extra}" ; then -+ gettext_printf "Found initrd image(s) in %s:%s\n" "${dirname}" "${initrd_extra} ${initrd}" >&2 - elif test -z "${initramfs}" ; then - # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's - # no initrd or builtin initramfs, it can't work here. --- -2.9.2 - |