blob: e95c30e2481c8c61141c5f51107367bf12aaba92 (
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
64
65
66
67
|
# $NetBSD: Makefile,v 1.19 2021/05/31 12:58:50 nia Exp $
DISTNAME= haxm-7.5.6
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_GITHUB:=intel/}
GITHUB_TAG= v${PKGVERSION_NOREV}
MAINTAINER= kamil@NetBSD.org
HOMEPAGE= https://github.com/intel/haxm/
COMMENT= Intel Hardware Accelerated Execution Manager
LICENSE= modified-bsd
ONLY_FOR_PLATFORM= NetBSD-*-x86_64
OSVERSION_SPECIFIC= YES
USE_BSD_MAKEFILE= YES
BUILD_DEPENDS+= nasm-[0-9]*:../../devel/nasm
BUILD_DIRS= platforms/netbsd
.include "../../mk/bsd.prefs.mk"
BUILDLINK_PASSTHRU_DIRS+= ${BSDSRCDIR}/sys
MAKE_FLAGS+= S=${BSDSRCDIR}/sys
BUILD_DEFS+= BSDSRCDIR
.if !exists(${BSDSRCDIR}/sys)
PKG_FAIL_REASON+= "BSDSRCDIR/sys specifies non-existing directory ${BSDSRCDIR}/sys"
.endif
.include "../../mk/compiler.mk"
MAKE_FLAGS+= NOCLANGERROR=1
MAKE_FLAGS+= NOGCCERROR=1
KMOD= haxm.kmod
KMODULEDIR= stand/${MACHINE}/${OS_VERSION}/modules/haxm
INSTALLATION_DIRS+= sbin # auxiliary scripts
INSTALLATION_DIRS+= ${KMODULEDIR}
INSTALL_UNSTRIPPED= yes # Kernel linker needs unstripped module
PLIST_SUBST+= MACHINE=${MACHINE}
pre-configure:
.for file in haxm-mknod haxm-modunload
${CP} ${FILESDIR}/${file} ${WRKSRC}
.endfor
${SED} \
-e 's|@PREFIX@|${PREFIX}|g' \
-e 's|@MACHINE@|${MACHINE}|g' \
-e 's|@OS_VERSION@|${OS_VERSION}|g' \
${FILESDIR}/haxm-modload.in > ${WRKSRC}/haxm-modload
do-install:
${RUN} cd ${WRKSRC}/platforms/netbsd && \
${INSTALL_PROGRAM} ${KMOD} ${DESTDIR}${PREFIX}/${KMODULEDIR}
.for file in haxm-modload haxm-modunload haxm-mknod
${RUN} cd ${WRKSRC} && \
${INSTALL_SCRIPT} ${file} ${DESTDIR}${PREFIX}/sbin
.endfor
.include "../../mk/bsd.pkg.mk"
|