diff options
Diffstat (limited to 'sysutils/grub2-bhyve')
-rw-r--r-- | sysutils/grub2-bhyve/Makefile | 4 | ||||
-rw-r--r-- | sysutils/grub2-bhyve/files/patch-grub-core-term-emu-console.c | 39 |
2 files changed, 42 insertions, 1 deletions
diff --git a/sysutils/grub2-bhyve/Makefile b/sysutils/grub2-bhyve/Makefile index cc32dd37a330..06cd80536dbe 100644 --- a/sysutils/grub2-bhyve/Makefile +++ b/sysutils/grub2-bhyve/Makefile @@ -3,6 +3,7 @@ PORTNAME= grub2-bhyve DISTVERSION= 0.22 +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= kmoore@FreeBSD.org @@ -24,7 +25,8 @@ USES= bison gettext gmake PLIST_FILES= sbin/grub-bhyve MAKE_JOBS_UNSAFE= yes CONFIGURE_ARGS= --with-platform=emu CC=${CC} LEX=${LOCALBASE}/bin/flex \ - --enable-grub-mount=no --enable-grub-mkfont=no + --enable-grub-mount=no --enable-grub-mkfont=no \ + --enable-grub-emu-sdl=no .include <bsd.port.pre.mk> diff --git a/sysutils/grub2-bhyve/files/patch-grub-core-term-emu-console.c b/sysutils/grub2-bhyve/files/patch-grub-core-term-emu-console.c new file mode 100644 index 000000000000..79add1cfca2f --- /dev/null +++ b/sysutils/grub2-bhyve/files/patch-grub-core-term-emu-console.c @@ -0,0 +1,39 @@ +--- grub-core/term/emu/console.c.bak 2014-04-17 20:03:51.000000000 +0400 ++++ grub-core/term/emu/console.c 2014-04-17 20:03:13.000000000 +0400 +@@ -42,6 +42,12 @@ + #error What the hell? + #endif + ++#ifdef BHYVE /* should include <sys/param.h> */ ++#ifndef MIN ++#define MIN(a,b) (((a)<(b))?(a):(b)) ++#endif ++#endif ++ + static int grub_console_attr = A_NORMAL; + + grub_uint8_t grub_console_cur_color = 7; +@@ -176,6 +182,11 @@ + + getyx (stdscr, y, x); + ++#ifdef BHYVE ++ x = MIN(x, 255); ++ y = MIN(y, 255); ++#endif ++ + return (x << 8) | y; + } + +@@ -187,6 +198,11 @@ + + getmaxyx (stdscr, y, x); + ++#ifdef BHYVE ++ x = MIN(x, 255); ++ y = MIN(y, 255); ++#endif ++ + return (x << 8) | y; + } + |