summaryrefslogtreecommitdiff
path: root/sysutils/ovmf/Makefile
blob: 7c9bd6ac49e148dcb23f43bc4981ad8886f32994 (plain)
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
56
57
58
59
60
61
62
63
# $NetBSD: Makefile,v 1.7 2019/11/04 21:28:49 rillig Exp $

PKGNAME=		OVMF-0.0.20181116
PKGREVISION=		1
DISTNAME=		edk2-20181116
MASTER_SITES=		${MASTER_SITE_LOCAL}
CATEGORIES=		sysutils
# Require openssl submodule
#DISTNAME=		edk2-${GITHUB_TAG}
#MASTER_SITES=		${MASTER_SITE_GITHUB:=tianocore/}
#GITHUB_PROJECT=	edk2
#GITHUB_TAG=		edk2-stable201811
#MASTER_SITES=		${MASTER_SITE_GITHUB:=tianocore/}

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://github.com/tianocore/edk2/
COMMENT=	Sample UEFI firmware for virtual machines
LICENSE=	modified-bsd

SSP_SUPPORTED=		no

.include "../../mk/bsd.prefs.mk"
ONLY_FOR_PLATFORM=	*-*-i386 *-*-x86_64

PLIST_VARS+=	x64

.if !empty(MACHINE_PLATFORM:M*-*-i386)
TARGET_ARCHS=	IA32
.elif !empty(MACHINE_PLATFORM:M*-*-x86_64)
TARGET_ARCHS=	IA32 X64
PLIST.x64=	yes
.endif

USE_TOOLS+=	gmake bash
USE_LANGUAGES=	c c++

PYTHON_VERSIONS_ACCEPTED=	27
SUBST_CLASSES+=			python
SUBST_STAGE.python=		pre-configure
SUBST_MESSAGE.python=		Fix python binary
SUBST_FILES.python=		BaseTools/Tests/GNUmakefile
SUBST_FILES.python+=		BaseTools/BinWrappers/PosixLike/*
SUBST_SED.python=		-e 's,python2,${PYTHONBIN},g'

do-build:
.for ARCH in ${TARGET_ARCHS}
	cd ${WRKSRC}/OvmfPkg && \
	${SETENV} ${MAKE_ENV} ./build.sh -a ${ARCH}
	${CP} ${WRKSRC}/Build/Ovmf${ARCH:S/IA/Ia/}/*/FV/OVMF.fd \
		${WRKSRC}/OVMF${ARCH}.fd
.endfor

INSTALLATION_DIRS+=	share/ovmf
do-install:
	${INSTALL_DATA} ${WRKSRC}/OVMF*.fd ${DESTDIR}${PREFIX}/share/ovmf/

BUILD_DEPENDS+=	acpica-utils-[0-9]*:../../sysutils/acpica-utils
BUILD_DEPENDS+=	nasm-[0-9]*:../../devel/nasm
BUILD_DEPENDS+=	${PYPKGPREFIX}-sqlite3-[0-9]*:../../databases/py-sqlite3

.include "../../lang/python/application.mk"
.include "../../devel/libuuid/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"