diff options
author | Llewelyn Trahaearn | 2018-07-11 00:21:25 -0700 |
---|---|---|
committer | Llewelyn Trahaearn | 2018-07-11 00:21:25 -0700 |
commit | 62595af972b298c21a0b44fa948d8507a9e4ea1f (patch) | |
tree | 18f0660c9c9092d390709cefa86fb650eabec9c9 | |
parent | a9efb92bdc098974c391c150de0368ab95e965d9 (diff) | |
download | aur-62595af972b298c21a0b44fa948d8507a9e4ea1f.tar.gz |
Mirror changes in [Core], including FreeType pkg-config fix.
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 138 | ||||
-rw-r--r-- | freetype-capitalise-variables.patch | 126 | ||||
-rw-r--r-- | freetype-pkg-config.patch | 194 |
4 files changed, 39 insertions, 425 deletions
@@ -1,6 +1,6 @@ pkgbase = grub-git pkgdesc = GNU GRand Unified Bootloader (2) - pkgver = 2.02.r147.gba474d531 + pkgver = 2.02.r152.gec2de93f8 pkgrel = 1 url = https://www.gnu.org/software/grub/ install = grub-git.install @@ -51,8 +51,6 @@ pkgbase = grub-git source = https://ftp.gnu.org/gnu/unifont/unifont-10.0.06/unifont-10.0.06.bdf.gz.sig 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 @@ -63,8 +61,6 @@ pkgbase = grub-git sha256sums = SKIP 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.r147.gba474d531 +pkgver=2.02.r152.gec2de93f8 pkgrel=1 pkgdesc="GNU GRand Unified Bootloader (2)" arch=('x86_64' 'i686') @@ -53,8 +53,6 @@ source=("grub::git+git://git.savannah.gnu.org/grub.git" "https://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz"{,.sig} '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' @@ -63,30 +61,43 @@ sha256sums=('SKIP' 'SKIP' 'b41e4438319136b5e74e0abdfcb64ae115393e4e15207490272c425f54026dd3' 'a5198267ceb04dceb6d2ea7800281a42b3f91fd02da55d2cc9ea20d47273ca29' - '4153565a0e1428bdacf09a0c646d2106c75182f1753e2a044896d23752295569' - '3da2764ecc0c2f3cf9a3f94660ed3ebfc1192c6b3df0ee27d78622bf9718228d' '74e5dd2090a153c10a7b9599b73bb09e70fddc6a019dd41641b0f10b9d773d82' 'c5e4f3836130c6885e9273c21f057263eba53f4b7c0e2f111f6e5f2e487a47ad') validpgpkeys=('E53D497F3FA42AD8C9B4D1E835A93B74E82E4209' # Vladimir 'phcoder' Serbinenko <phcoder@gmail.com> '95D2E9AB8740D8046387FD151A09227B1F435A33') # Paul Hardy <unifoundry@unifoundry.com> +_configure_options=( + FREETYPE="pkg-config freetype2" + BUILD_FREETYPE="pkg-config freetype2" + --enable-mm-debug + --enable-nls + --enable-device-mapper + --enable-cache-stats + --enable-grub-mkfont + --enable-grub-mount + --prefix="/usr" + --bindir="/usr/bin" + --sbindir="/usr/bin" + --mandir="/usr/share/man" + --infodir="/usr/share/info" + --datarootdir="/usr/share" + --sysconfdir="/etc" + --program-prefix="" + --with-bootdir="/boot" + --with-grubdir="grub" + --disable-silent-rules + --disable-werror +) + prepare() { cd grub msg "Patch to detect of Arch Linux initramfs images by grub-mkconfig" patch -Np1 -i "${srcdir}/10_linux-detect-archlinux-initramfs.patch" - echo msg "Patch to enable GRUB_COLOR_* variables in grub-mkconfig" ## Based on http://lists.gnu.org/archive/html/grub-devel/2012-02/msg00021.html 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" @@ -99,7 +110,6 @@ prepare() { msg "Pull in latest language files" ./linguas.sh - echo msg "Remove not working langs which need LC_ALL=C.UTF-8" sed -e 's#en@cyrillic en@greek##g' -i "po/LINGUAS" @@ -107,6 +117,9 @@ prepare() { 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" + + msg "Run autogen.sh" + ./autogen.sh } pkgver() { @@ -141,39 +154,16 @@ _build_grub-common_and_bios() { unset LDFLAGS unset MAKEFLAGS - msg "Run autogen.sh for bios build" - ./autogen.sh - echo - msg "Run ./configure for bios build" ./configure \ --with-platform="pc" \ --target="i386" \ "${_EFIEMU}" \ - --enable-mm-debug \ - --enable-nls \ - --enable-device-mapper \ - --enable-cache-stats \ --enable-boot-time \ - --enable-grub-mkfont \ - --enable-grub-mount \ - --prefix="/usr" \ - --bindir="/usr/bin" \ - --sbindir="/usr/bin" \ - --mandir="/usr/share/man" \ - --infodir="/usr/share/info" \ - --datarootdir="/usr/share" \ - --sysconfdir="/etc" \ - --program-prefix="" \ - --with-bootdir="/boot" \ - --with-grubdir="grub" \ - --disable-silent-rules \ - --disable-werror - echo + "${_configure_options[@]}" msg "Run make for bios build" make - echo } _build_grub-efi() { @@ -181,12 +171,6 @@ _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 @@ -194,39 +178,25 @@ _build_grub-efi() { unset LDFLAGS unset MAKEFLAGS - msg "Run autogen.sh for ${_EFI_ARCH} efi build" - ./autogen.sh - echo + if [[ "${_EFI_ARCH}" == "i386" ]]; then + msg "Fix duplicate symbol" + # http://savannah.gnu.org/bugs/?func=detailitem&item_id=53517 + 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" + msg "Run autogen.sh for ${_EFI_ARCH} efi build" + ./autogen.sh + fi msg "Run ./configure for ${_EFI_ARCH} efi build" ./configure \ --with-platform="efi" \ --target="${_EFI_ARCH}" \ --disable-efiemu \ - --enable-mm-debug \ - --enable-nls \ - --enable-device-mapper \ - --enable-cache-stats \ --enable-boot-time \ - --enable-grub-mkfont \ - --enable-grub-mount \ - --prefix="/usr" \ - --bindir="/usr/bin" \ - --sbindir="/usr/bin" \ - --mandir="/usr/share/man" \ - --infodir="/usr/share/info" \ - --datarootdir="/usr/share" \ - --sysconfdir="/etc" \ - --program-prefix="" \ - --with-bootdir="/boot" \ - --with-grubdir="grub" \ - --disable-silent-rules \ - --disable-werror - echo + "${_configure_options[@]}" msg "Run make for ${_EFI_ARCH} efi build" make - echo } _build_grub-emu() { @@ -241,61 +211,34 @@ _build_grub-emu() { unset LDFLAGS unset MAKEFLAGS - msg "Run autogen.sh for emu build" - ./autogen.sh - echo - msg "Run ./configure for emu build" ./configure \ --with-platform="emu" \ --target="${_EMU_ARCH}" \ - --enable-mm-debug \ - --enable-nls \ - --enable-device-mapper \ - --enable-cache-stats \ - --enable-grub-mkfont \ - --enable-grub-mount \ --enable-grub-emu-usb=no \ --enable-grub-emu-sdl=no \ --disable-grub-emu-pci \ - --prefix="/usr" \ - --bindir="/usr/bin" \ - --sbindir="/usr/bin" \ - --mandir="/usr/share/man" \ - --infodir="/usr/share/info" \ - --datarootdir="/usr/share" \ - --sysconfdir="/etc" \ - --program-prefix="" \ - --with-bootdir="/boot" \ - --with-grubdir="grub" \ - --disable-silent-rules \ - --disable-werror - echo + "${_configure_options[@]}" msg "Run make for emu build" make - echo } build() { msg "Build grub bios stuff" _build_grub-common_and_bios - echo msg "Build grub ${_EFI_ARCH} efi stuff" _build_grub-efi - echo if [[ "${CARCH}" == "x86_64" ]] && [[ "${_IA32_EFI_IN_ARCH_X64}" == "1" ]]; then msg "Build grub i386 efi stuff" _EFI_ARCH="i386" _build_grub-efi - echo fi if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then msg "Build grub emu stuff" _build_grub-emu - echo fi } @@ -304,7 +247,6 @@ _package_grub-common_and_bios() { msg "Run make install for bios build" make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install - echo msg "Remove gdb debugging related files for bios build" rm -f "${pkgdir}/usr/lib/grub/i386-pc"/*.module || true @@ -323,7 +265,6 @@ _package_grub-efi() { msg "Run make install for ${_EFI_ARCH} efi build" make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install - echo msg "Remove gdb debugging related files for ${_EFI_ARCH} efi build" rm -f "${pkgdir}/usr/lib/grub/${_EFI_ARCH}-efi"/*.module || true @@ -336,7 +277,6 @@ _package_grub-emu() { msg "Run make install for emu build" make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install - echo msg "Remove gdb debugging related files for emu build" rm -f "${pkgdir}/usr/lib/grub/${_EMU_ARCH}-emu"/*.module || true @@ -351,13 +291,11 @@ package() { if [[ "${CARCH}" == "x86_64" ]] && [[ "${_IA32_EFI_IN_ARCH_X64}" == "1" ]]; then msg "Package grub i386 efi stuff" _EFI_ARCH="i386" _package_grub-efi - echo fi if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then msg "Package grub emu stuff" _package_grub-emu - echo fi msg "Package grub bios stuff" diff --git a/freetype-capitalise-variables.patch b/freetype-capitalise-variables.patch deleted file mode 100644 index 5bc910170248..000000000000 --- a/freetype-capitalise-variables.patch +++ /dev/null @@ -1,126 +0,0 @@ -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 deleted file mode 100644 index 257fc4559cc2..000000000000 --- a/freetype-pkg-config.patch +++ /dev/null @@ -1,194 +0,0 @@ -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" |