summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2018-05-04 11:46:06 -0400
committerMike Gilbert <floppym@gentoo.org>2018-05-04 11:50:03 -0400
commitb6db5c287b3e0a43f2254376e32ea6ffe8a45dcf (patch)
tree2dda729fca31668e52a610edad6d402312c64829 /sys-boot
parentdev-python/nose-1.3.7-r3: arm64 stable (bug #653502) (diff)
downloadgentoo-b6db5c287b3e0a43f2254376e32ea6ffe8a45dcf.tar.gz
gentoo-b6db5c287b3e0a43f2254376e32ea6ffe8a45dcf.tar.bz2
gentoo-b6db5c287b3e0a43f2254376e32ea6ffe8a45dcf.zip
sys-boot/grub: use pkg-config to find freetype2
Bug: https://bugs.gentoo.org/654788 Package-Manager: Portage-2.3.31_p60, Repoman-2.3.9_p116
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/grub/files/2.02-freetype-pkg-config.patch73
-rw-r--r--sys-boot/grub/grub-2.02-r1.ebuild14
-rw-r--r--sys-boot/grub/grub-9999.ebuild12
3 files changed, 96 insertions, 3 deletions
diff --git a/sys-boot/grub/files/2.02-freetype-pkg-config.patch b/sys-boot/grub/files/2.02-freetype-pkg-config.patch
new file mode 100644
index 00000000000..bc2f91759be
--- /dev/null
+++ b/sys-boot/grub/files/2.02-freetype-pkg-config.patch
@@ -0,0 +1,73 @@
+From 3b0a266dead87906bcf440fd9ef12e1a514320ab Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 4 May 2018 13:43:59 +0200
+Subject: [PATCH] Use pkg-config to find freetype
+
+As of freetype-2.9.1 the freetype-config script has been deprecated and
+is no longer shipped by default.
+
+Based on a patch by Lars Wendler <polynomial-c@gentoo.org>.
+---
+ configure.ac | 27 +++++++++++++++++++--------
+ 1 file changed, 19 insertions(+), 8 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c7888e40f..220f5ffc1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1510,7 +1510,8 @@ fi
+
+ if test x"$grub_mkfont_excuse" = x ; then
+ # Check for freetype libraries.
+- AC_CHECK_TOOLS([FREETYPE], [freetype-config])
++ PKG_PROG_PKG_CONFIG
++ PKG_CHECK_MODULES(FREETYPE2, freetype2, FREETYPE=yes)
+ if test "x$FREETYPE" = x ; then
+ grub_mkfont_excuse=["need freetype2 library"]
+ fi
+@@ -1520,8 +1521,8 @@ 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="$FREETYPE2_CFLAGS"
++ freetype_libs="$FREETYPE2_LIBS"
+ SAVED_CPPFLAGS="$CPPFLAGS"
+ SAVED_LIBS="$LIBS"
+ CPPFLAGS="$CPPFLAGS $freetype_cflags"
+@@ -1573,16 +1574,26 @@ 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"]
++ if test -z "$BUILD_FREETYPE2_CFLAGS" || test -z "$BUILD_FREETYPE2_LIBS" ; then
++ AC_CHECK_PROGS([BUILD_PKGCONFIG], [pkg-config])
++ if test -z "$BUILD_PKGCONFIG" ; then
++ grub_build_mkfont_excuse=["need pkg-config"]
++ elif ! "$BUILD_PKGCONFIG" --exists freetype2 ; then
++ grub_build_mkfont_excuse=["need freetype2 library"]
++ fi
+ 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`
++ if test -z "$BUILD_FREETYPE2_CFLAGS" ; then
++ BUILD_FREETYPE2_CFLAGS=`$BUILD_PKGCONFIG --cflags freetype2`
++ fi
++ if test -z "$BUILD_FREETYPE2_LIBS" ; then
++ BUILD_FREETYPE2_LIBS=`$BUILD_PKGCONFIG --libs freetype2`
++ fi
++ build_freetype_cflags="$BUILD_FREETYPE2_CFLAGS"
++ build_freetype_libs="$BUILD_FREETYPE2_LIBS"
+ SAVED_CPPFLAGS_2="$CPPFLAGS"
+ SAVED_LIBS="$LIBS"
+ CPPFLAGS="$CPPFLAGS $build_freetype_cflags"
+--
+2.17.0
+
diff --git a/sys-boot/grub/grub-2.02-r1.ebuild b/sys-boot/grub/grub-2.02-r1.ebuild
index 7b3b5251bc1..a82ceccfbd2 100644
--- a/sys-boot/grub/grub-2.02-r1.ebuild
+++ b/sys-boot/grub/grub-2.02-r1.ebuild
@@ -5,12 +5,20 @@ EAPI=6
if [[ ${PV} == 9999 ]]; then
GRUB_AUTOGEN=1
+ GRUB_AUTORECONF=1
fi
+# 2.02-grub-pkg-config.patch modifies configure.ac
+GRUB_AUTORECONF=1
+
if [[ -n ${GRUB_AUTOGEN} ]]; then
PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
+ inherit python-any-r1
+fi
+
+if [[ -n ${GRUB_AUTORECONF} ]]; then
WANT_LIBTOOL=none
- inherit autotools python-any-r1
+ inherit autotools
fi
inherit autotools bash-completion-r1 flag-o-matic multibuild pax-utils toolchain-funcs versionator
@@ -36,6 +44,7 @@ PATCHES=(
"${FILESDIR}"/gfxpayload.patch
"${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch
"${FILESDIR}"/2.02-multiple-early-initrd.patch
+ "${FILESDIR}"/2.02-freetype-pkg-config.patch
)
DEJAVU=dejavu-sans-ttf-2.37
@@ -154,6 +163,9 @@ src_prepare() {
if [[ -n ${GRUB_AUTOGEN} ]]; then
python_setup
bash autogen.sh || die
+ fi
+
+ if [[ -n ${GRUB_AUTORECONF} ]]; then
autopoint() { :; }
eautoreconf
fi
diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebuild
index cc6db989c6e..d5bfc5ad9ac 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-9999.ebuild
@@ -1,16 +1,21 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
if [[ ${PV} == 9999 ]]; then
GRUB_AUTOGEN=1
+ GRUB_AUTORECONF=1
fi
if [[ -n ${GRUB_AUTOGEN} ]]; then
PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
+ inherit python-any-r1
+fi
+
+if [[ -n ${GRUB_AUTORECONF} ]]; then
WANT_LIBTOOL=none
- inherit autotools python-any-r1
+ inherit autotools
fi
inherit autotools bash-completion-r1 flag-o-matic multibuild pax-utils toolchain-funcs versionator
@@ -153,6 +158,9 @@ src_prepare() {
if [[ -n ${GRUB_AUTOGEN} ]]; then
python_setup
bash autogen.sh || die
+ fi
+
+ if [[ -n ${GRUB_AUTORECONF} ]]; then
autopoint() { :; }
eautoreconf
fi