aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/grub2-bhyve/Makefile
blob: 75315c34b025bd05a78e4521b0101011e8d8e626 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Created by: kmoore@FreeBSD.org
# $FreeBSD$

PORTNAME=   grub2-bhyve
DISTVERSION=    0.30
CATEGORIES= sysutils

MAINTAINER= kmoore@FreeBSD.org
COMMENT=    Grub-emu loader for bhyve

LICENSE=    GPLv3

BUILD_DEPENDS=  ${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex \
        help2man:${PORTSDIR}/misc/help2man

ONLY_FOR_ARCHS= amd64
SSP_UNSAFE= yes
USE_GITHUB= yes
GH_ACCOUNT= grehan-freebsd
GH_COMMIT=  5af229e
GH_TAGNAME= v0.30
USES=       bison gmake
USE_GCC=    yes
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-emu-sdl=no --disable-nls --disable-werror

.include <bsd.port.pre.mk>

.if ${OSVERSION} <= 1000000
IGNORE= for FreeBSD 10 and higher
.endif

post-patch:
    @${REINPLACE_CMD} -e "s/libintl\.h/I_do_not_want_libintl.h/g" ${WRKSRC}/configure
    @${REINPLACE_CMD} -e "s/-lintl//g" ${WRKSRC}/grub-core/Makefile.in

do-configure:
    @ cd ${WRKSRC}/ && ./configure ${CONFIGURE_ARGS}

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/grub-core/grub-emu ${STAGEDIR}${LOCALBASE}/sbin/grub-bhyve

.include <bsd.port.post.mk>

RUN_DEPENDS:=   ${RUN_DEPENDS:Ngcc*}