diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-11-17 11:06:37 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-11-17 11:06:37 +0000 |
commit | c756efe696c83a26ebc2b529d3c11ae35ea00e4f (patch) | |
tree | cd33b0bfee9352db814977778810c1069ab1b8bc /sys-boot/grub/files | |
parent | 470837dd98bee980e3053484c7e348fa56e432d5 (diff) |
sys-boot/grub : backport 7e23437df3ad7572756102f3ab1063f284b57983 build Use pkg-config to find FreeType
Diffstat (limited to 'sys-boot/grub/files')
-rw-r--r-- | sys-boot/grub/files/08-find-freetype.patch | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/sys-boot/grub/files/08-find-freetype.patch b/sys-boot/grub/files/08-find-freetype.patch new file mode 100644 index 00000000..83b55449 --- /dev/null +++ b/sys-boot/grub/files/08-find-freetype.patch @@ -0,0 +1,114 @@ +diff -Nur a/configure.ac b/configure.ac +--- a/configure.ac 2017-04-24 12:30:15.000000000 +0100 ++++ b/configure.ac 2019-11-17 10:48:41.595490019 +0000 +@@ -50,6 +50,8 @@ + AC_CONFIG_SRCDIR([include/grub/dl.h]) + AC_CONFIG_HEADER([config-util.h]) + ++PKG_PROG_PKG_CONFIG ++ + # Program name transformations + AC_ARG_PROGRAM + grub_TRANSFORM([grub-bios-setup]) +@@ -1493,29 +1495,22 @@ + 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 +1522,6 @@ + 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 +1551,21 @@ + + 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 +1584,6 @@ + fi + fi + +-AC_SUBST([build_freetype_cflags]) +-AC_SUBST([build_freetype_libs]) +- + CC="$SAVED_CC" + CPP="$SAVED_CPP" + CFLAGS="$SAVED_CFLAGS" |