summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2015-12-17 12:13:57 -0500
committerIan Stakenvicius <axs@gentoo.org>2015-12-18 15:42:31 -0500
commitbd30d0f89ca44bffd2b7d9c09bee4821f6ebee93 (patch)
treecb8b29173ada4fc0a74a435b07554a5514f30504 /sys-boot
parentapp-emacs/xclip: Remove old. (diff)
downloadgentoo-bd30d0f89ca44bffd2b7d9c09bee4821f6ebee93.tar.gz
gentoo-bd30d0f89ca44bffd2b7d9c09bee4821f6ebee93.tar.bz2
gentoo-bd30d0f89ca44bffd2b7d9c09bee4821f6ebee93.zip
sys-boot/grub:0 - use pkg-config to determine ncurses libs, bug 550132
When ncurses is built with USE=tinfo, additional libs are needed due to --as-needed linking that are not included in the current AC_CHECK_LIB based config, nor would be easily detectable without pkg-config. Package-Manager: portage-2.2.24
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/grub/files/grub-0.97-ncurses-pkgconfig.patch18
-rw-r--r--sys-boot/grub/grub-0.97-r17.ebuild2
2 files changed, 20 insertions, 0 deletions
diff --git a/sys-boot/grub/files/grub-0.97-ncurses-pkgconfig.patch b/sys-boot/grub/files/grub-0.97-ncurses-pkgconfig.patch
new file mode 100644
index 000000000000..d62e4346c338
--- /dev/null
+++ b/sys-boot/grub/files/grub-0.97-ncurses-pkgconfig.patch
@@ -0,0 +1,18 @@
+--- a/configure.ac 2015-12-17 11:09:56.807893315 -0500
++++ b/configure.ac 2015-12-17 11:11:06.697570856 -0500
+@@ -234,10 +234,14 @@
+
+ # Unless the user specify --without-curses, check for curses.
+ if test "x$with_curses" != "xno"; then
++ PKG_CHECK_MODULES([NCURSES],[ncurses],[
++ AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])
++ GRUB_LIBS="$GRUB_LIBS $NCURSES_LIBS"
++ ],[
+ AC_CHECK_LIB(ncurses, wgetch, [GRUB_LIBS="$GRUB_LIBS -lncurses"
+ AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])],
+ [AC_CHECK_LIB(curses, wgetch, [GRUB_LIBS="$GRUB_LIBS -lcurses"
+- AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])])])
++ AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])])])])
+ fi
+
+ AC_SUBST(GRUB_LIBS)
diff --git a/sys-boot/grub/grub-0.97-r17.ebuild b/sys-boot/grub/grub-0.97-r17.ebuild
index 3b19b8e36c9b..790e6b256bed 100644
--- a/sys-boot/grub/grub-0.97-r17.ebuild
+++ b/sys-boot/grub/grub-0.97-r17.ebuild
@@ -36,6 +36,7 @@ IUSE="custom-cflags ncurses netboot static"
LIB_DEPEND="ncurses? ( >=sys-libs/ncurses-5.9-r3:0[static-libs(+),abi_x86_32(-)] )"
RDEPEND="!static? ( ${LIB_DEPEND//[static-libs(+),/=[} )"
DEPEND="${RDEPEND}
+ virtual/pkgconfig
static? ( ${LIB_DEPEND} )"
pkg_setup() {
@@ -69,6 +70,7 @@ src_prepare() {
EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
# bug 564890, 566638
epatch "${FILESDIR}"/grub-0.97-Add-esp-to-list-of-clobbered-registers.patch
+ epatch "${FILESDIR}"/grub-0.97-ncurses-pkgconfig.patch
rm -f "${S}"/aclocal.m4 # seems to keep bug 418287 away
eautoreconf