blob: 6436b3e89a644c27691901f0a5c773d436082a6e (
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
|
PORTNAME= mxnet
DISTVERSION= 1.7.0
CATEGORIES= misc # machine-learning
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= yuri@FreeBSD.org
COMMENT= Apache MXNet: Ultra-scalable deep learning framework
LICENSE= APACHE20
BUILD_DEPENDS= mxnet>0:misc/mxnet
RUN_DEPENDS= mxnet>0:misc/mxnet \
${PYTHON_PKGNAMEPREFIX}graphviz>0:graphics/py-graphviz@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR}
USES= python:3.6+ localbase
USE_GITHUB= yes
GH_ACCOUNT= apache
GH_PROJECT= incubator-mxnet
USE_PYTHON= distutils cython autoplist
WRKSRC_SUBDIR= python
POST_PLIST= fix-plist
PYDISTUTILS_BUILDARGS= --with-cython
PYDISTUTILS_INSTALLARGS= --with-cython
post-patch:
@${REINPLACE_CMD} -e 's|dll_path = \[curr_path, api_path, cmake_build_path\]|dll_path = ["${LOCALBASE}/lib"]|' ${WRKSRC}/mxnet/libinfo.py
post-install:
@${FIND} ${STAGEDIR}${PREFIX} -name "*.so" | ${XARGS} ${STRIP_CMD}
# https://github.com/apache/incubator-mxnet/issues/17081
@${RM} ${STAGEDIR}${PREFIX}/mxnet/libmxnet.so
@${RMDIR} ${STAGEDIR}${PREFIX}/mxnet
fix-plist: # see post-install
@${REINPLACE_CMD} '/^mxnet\/libmxnet.so$$/d' ${TMPPLIST}
.include <bsd.port.mk>
|