blob: bb8e156eb98dfb6d523f187a749458cb24727ed8 (
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
|
PORTNAME= libfabric
DISTVERSIONPREFIX= v
DISTVERSION= 1.11.2
CATEGORIES= net
MAINTAINER= yuri@FreeBSD.org
COMMENT= Open Fabric Interfaces
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libepoll-shim.so:devel/libepoll-shim
USES= autoreconf gmake libtool pkgconfig
USE_GITHUB= yes
GH_ACCOUNT= ofiwg
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-static
USE_LDCONFIG= yes
CFLAGS+= -I${LOCALBASE}/include/libepoll-shim
LDFLAGS+= ${LOCALBASE}/lib/libepoll-shim.so
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:
.if exists(/usr/include/infiniband/verbs.h) # some earlier FreeBSD 11 systems don't have it
OPTIONS_MULTI_PROVIDERS+= VERBS
VERBS_PLIST_FILES= man/man7/fi_verbs.7.gz
.endif
.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>
|