aboutsummaryrefslogtreecommitdiff
path: root/sysutils/grub2-efi/Makefile
blob: 29b6bcd71ef4dec3e4edff21226b753758072942 (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
49
50
51
52
53
54
55
# Created by: kmoore@FreeBSD.org

PORTNAME=	grub2-efi
PORTVERSION=	2.02
PORTREVISION=	20
CATEGORIES=	sysutils
MASTER_SITES=	LOCAL/kevlo
DISTNAME=	grub-${PORTVERSION}_7

MAINTAINER=	kevlo@FreeBSD.org
COMMENT=	Multiboot EFI boot loader

LICENSE=	GPLv3

RUN_DEPENDS=	${LOCALBASE}/bin/mformat:emulators/mtools \
		${LOCALBASE}/bin/grub-mkrescue:sysutils/grub2-pcbsd
BUILD_DEPENDS=	${LOCALBASE}/bin/flex:textproc/flex \
		${LOCALBASE}/bin/bash:shells/bash \
		help2man:misc/help2man

ONLY_FOR_ARCHS=	amd64
USES=		autoreconf:build bison cpe gettext gmake python tar:xz

WRKSRC=		${WRKDIR}/grub-${PORTVERSION}
SSP_UNSAFE=	yes
USE_GCC=	yes
GNU_CONFIGURE=	yes
MAKE_JOBS_UNSAFE=	yes

CPE_PRODUCT=	grub
CPE_VENDOR=	gnu

CONFIGURE_ARGS=	--with-platform=efi --disable-werror --localedir=${PREFIX}/share/locale
CONFIGURE_ENV=	CPP="${CC} -E" \
		LEX=${LOCALBASE}/bin/flex

.include <bsd.port.pre.mk>

post-patch:
	@${LN} -s ${LOCALBASE}/share/fonts/dejavu/DejaVuSans.ttf ${WRKSRC}
	@${TOUCH} -t 200001010000 ${WRKSRC}/Makefile.util.def

pre-configure:
	@${REINPLACE_CMD} -e 's|python|${PYTHON_CMD}|g' ${WRKSRC}/autogen.sh
	cd ${WRKSRC} && ./autogen.sh

post-configure:
	@${LN} -sfh /usr/include/machine /usr/include/sys /usr/include/x86 ${WRKSRC}/grub-core

do-install:
	@cd ${WRKSRC}/grub-core && ${GMAKE} install DESTDIR=${STAGEDIR}

RUN_DEPENDS:=	${RUN_DEPENDS:Ngcc*}

.include <bsd.port.post.mk>