blob: 0982273a977c66215285b8c721fac83c42298836 (
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
|
PORTNAME= libfabric
DISTVERSION= 1.15.1
CATEGORIES= net
MASTER_SITES= https://github.com/ofiwg/${PORTNAME}/releases/download/v${DISTVERSION}/
MAINTAINER= yuri@FreeBSD.org
COMMENT= Open Fabric Interfaces
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= bash:shells/bash
LIB_DEPENDS= libepoll-shim.so:devel/libepoll-shim
USES= gmake libtool pkgconfig tar:bz2
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-static
CONFIGURE_SHELL= ${LOCALBASE}/bin/bash # workaround for https://github.com/ofiwg/libfabric/issues/7901
CFLAGS+= -I${LOCALBASE}/include/libepoll-shim
LDFLAGS+= -L${LOCALBASE}/lib -lepoll-shim
INSTALL_TARGET= install-strip
OPTIONS_MULTI= PROVIDERS
OPTIONS_MULTI_PROVIDERS= RXD RXM SOCKETS TCP UDP
OPTIONS_DEFAULT= ${OPTIONS_MULTI_PROVIDERS}
OPTIONS_SUB= yes
PROVIDERS_DESC= Providers to build:
OPTIONS_MULTI_PROVIDERS+= VERBS
VERBS_PLIST_FILES= man/man7/fi_verbs.7.gz
.for p in ${OPTIONS_MULTI_PROVIDERS}
${p}_DESC= '${p:tl}' provider
${p}_CONFIGURE_ENABLE= ${p:tl}
.endfor
SED_WRAP_CLOSE= { \
i\\\n \
\#ifdef SHIM_SYS_SHIM_HELPERS\\\n \
\#undef close\\\n \
\#endif\n \
a\\\n \
\#ifdef SHIM_SYS_SHIM_HELPERS\\\n \
\#define close epoll_shim_close\\\n \
\#endif\n \
}
post-patch:
@${FIND} ${WRKSRC} -name "*.[ch]" -and -exec ${GREP} -q '<asm/types\.h>' {} \; -print | ${XARGS} ${REINPLACE_CMD} 's|<asm/types\.h>|<sys/types.h>|'
@${FIND} ${WRKSRC} -name "*.[ch]" -and -exec ${GREP} -q '<malloc\.h>' {} \; -print | ${XARGS} ${REINPLACE_CMD} 's|<malloc\.h>|<stdlib.h>|'
@${FIND} ${WRKSRC} -name "*.[ch]" -and -exec ${GREP} -q '<alloca\.h>' {} \; -print | ${XARGS} ${REINPLACE_CMD} 's|<alloca\.h>|<stdlib.h>|'
@${GREP} -Flr --include='*.c' '.close' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} $$'/\\.close/${SED_WRAP_CLOSE}'
@${REINPLACE_CMD} $$'/fi_ops.*close/${SED_WRAP_CLOSE}' ${WRKSRC}/src/fabric.c
@${REINPLACE_CMD} $$'/[*>]close/${SED_WRAP_CLOSE}' ${WRKSRC}/include/rdma/fabric.h
.include <bsd.port.mk>
|