blob: c86fdd16e8dde31b732841d0552f442658bd29c0 (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
PORTNAME= openzfs
PORTVERSION= 2022082900
DISTVERSIONPREFIX= v
CATEGORIES= sysutils
PKGNAMESUFFIX?= -kmod
MAINTAINER= freqlabs@FreeBSD.org
COMMENT= OpenZFS kernel module for FreeBSD
LICENSE= CDDL
BROKEN_i386= build fails
USES= cpe kmod
USE_GITHUB= yes
GH_PROJECT= zfs
GH_TAGNAME= 2d5622f5b
KMODTARGET?= openzfs.ko
PLIST_FILES= ${KMODDIR}/${KMODTARGET}
OPTIONS_DEFINE= DEBUG INVARIANTS GCOV
OPTIONS_SUB= yes
GCOV_DESC= Build kernel module with GCOV support (Requires gcc)
INVARIANTS_DESC= Build kernel module with INVARIANTS
INVARIANTS_IMPLIES= DEBUG
.include <bsd.port.options.mk>
.if ${OSVERSION} >= 1300000
OPTIONS_DEFAULT= DEBUG INVARIANTS
.endif
MAKE_OPTS+= SYSDIR=${SRC_BASE}/sys
.if ${PORT_OPTIONS:MDEBUG}
MAKE_OPTS+= WITH_DEBUG=true
PLIST_FILES+= ${KMODDIR}/${KMODTARGET}.debug
.endif
.if ${PORT_OPTIONS:MINVARIANTS}
MAKE_OPTS+= WITH_INVARIANTS=true
.endif
.if ${PORT_OPTIONS:MGCOV}
USE_GCC= yes
MAKE_OPTS+= WITH_GCOV=true
.endif
ZFS_META_GITREV= ${GH_PROJECT}-${GH_TAGNAME}
ZFS_META_RELEASE= ${GH_PROJECT}_${GH_TAGNAME}
ZFS_META_VERSION= ${DISTVERSIONPREFIX}${PORTVERSION}
post-patch:
${ECHO} '#define ZFS_META_GITREV "${ZFS_META_GITREV}"' > ${WRKSRC}/include/zfs_gitrev.h
${ECHO} '#define ZFS_META_RELEASE "${ZFS_META_RELEASE}"' > ${WRKSRC}/zfs_config.h
${ECHO} '#define ZFS_META_VERSION "${ZFS_META_VERSION}"' >> ${WRKSRC}/zfs_config.h
do-build:
(cd ${WRKSRC}/module/ && make -f Makefile.bsd CC=${CC} ${MAKE_OPTS})
do-install:
${INSTALL} ${WRKSRC}/module/openzfs.ko ${STAGEDIR}${KMODDIR}/${KMODTARGET}
.if ${PORT_OPTIONS:MDEBUG}
${INSTALL} ${WRKSRC}/module/openzfs.ko.debug ${STAGEDIR}${KMODDIR}/${KMODTARGET}.debug
.endif
.include <bsd.port.mk>
|