blob: 578729918123cc329fcaf7765108859b3a42213b (
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
# $NetBSD: Makefile,v 1.32 2016/07/09 13:04:07 wiz Exp $
VERSION= 3.1.4
DISTNAME= xen-${VERSION}
PKGNAME= xenkernel3-${VERSION}
PKGREVISION= 8
CATEGORIES= sysutils
MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
MAINTAINER= bouyer@NetBSD.org
HOMEPAGE= http://xen.org/
COMMENT= Xen3 Kernel
ONLY_FOR_PLATFORM= Linux-2.[46]*-i386 NetBSD-*-i386 Linux-2.[46]*-x86_64 NetBSD-*-x86_64
CONFLICTS= xenkernel30-[0-9]*
LICENSE= gnu-gpl-v2
WRKSRC= ${WRKDIR}/xen-${VERSION}
NO_CONFIGURE= yes
USE_TOOLS+= gmake
PYTHON_FOR_BUILD_ONLY= YES
PY_PATCHPLIST= NO
PYTHON_VERSIONS_INCOMPATIBLE= 34 35 # not yet ported as of 3.1.4
SUBST_CLASSES+= py
SUBST_STAGE.py= pre-build
SUBST_FILES.py= xen/include/public/foreign/Makefile
SUBST_FILES.py+= xen/tools/get-fields.sh
SUBST_SED.py= -e "s,python,${PYTHONBIN},g"
#PY_PATCHPLIST doesn't work because we have NO_CONFIGURE
SUBST_CLASSES+= py2
SUBST_STAGE.py2= pre-build
SUBST_FILES.py2= xen/tools/compat-build-source.py
SUBST_FILES.py2+= xen/tools/compat-build-header.py
SUBST_SED.py2= -e "s,/usr/bin/python,${PYTHONBIN},g"
.if ${MACHINE_ARCH} == "x86_64"
USE_TOOLS+= bash
SUBST_CLASSES+= bash
SUBST_STAGE.bash= pre-build
SUBST_FILES.bash= xen/include/Makefile
SUBST_SED.bash= -e "s,/bin/bash,${PREFIX}/bin/bash,g"
.endif
.if ${MACHINE_ARCH} == "i386"
PLIST_SRC= PLIST.i386 PLIST
.else
PLIST_SRC= PLIST
.endif
INSTALLATION_DIRS+= xen3-kernel
XENKERNELDIR= ${PREFIX}/xen3-kernel
MESSAGE_SUBST+= XENKERNELDIR=${XENKERNELDIR:Q}
.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Mclang)
EXTRA_CFLAGS+= -Wno-error=ignored-attributes -Wno-error=format \
-Wno-error=tautological-compare \
-Wno-error=parentheses-equality \
-Wno-error=sometimes-uninitialized -no-integrated-as \
-ffreestanding -Wno-error=unused-function
BUILDLINK_TRANSFORM+= rm:-fno-reorder-blocks
.elif !empty(PKGSRC_COMPILER:Mgcc)
EXTRA_CFLAGS+= -Wno-error=unused-but-set-variable
.endif
do-build:
cd ${WRKSRC} && \
EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} XEN_TARGET_X86_PAE=n debug=n xen
${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen.gz
cd ${WRKSRC} && ${GMAKE} clean && \
EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} XEN_TARGET_X86_PAE=n debug=y xen
${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen-debug.gz
.if ${MACHINE_ARCH} == "i386"
cd ${WRKSRC} && ${GMAKE} clean && \
EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} XEN_TARGET_X86_PAE=y debug=n xen
${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen-PAE.gz
cd ${WRKSRC} && ${GMAKE} clean && \
EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} XEN_TARGET_X86_PAE=y debug=y xen
${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen-PAE-debug.gz
.endif
do-install:
${INSTALL_DATA} ${WRKDIR}/xen.gz \
${DESTDIR}${XENKERNELDIR}/xen.gz
${INSTALL_DATA} ${WRKDIR}/xen-debug.gz \
${DESTDIR}${XENKERNELDIR}/xen-debug.gz
.if ${MACHINE_ARCH} == "i386"
${INSTALL_DATA} ${WRKDIR}/xen-PAE.gz \
${DESTDIR}${XENKERNELDIR}/xen-PAE.gz
${INSTALL_DATA} ${WRKDIR}/xen-PAE-debug.gz \
${DESTDIR}${XENKERNELDIR}/xen-PAE-debug.gz
.endif
.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"
|