Index: head/misc/py-tvm/Makefile =================================================================== --- head/misc/py-tvm/Makefile (revision 520152) +++ head/misc/py-tvm/Makefile (revision 520153) @@ -1,55 +1,55 @@ # $FreeBSD$ PORTNAME= tvm DISTVERSIONPREFIX= v DISTVERSION= 0.6.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= misc # machine-learning PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= Deep learning compiler stack for cpu, gpu and specialized accelerators LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libtvm.so:misc/tvm RUN_DEPENDS= ${PYNUMPY} \ ${PYTHON_PKGNAMEPREFIX}attrs>0:devel/py-attrs@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}decorator>0:devel/py-decorator@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}psutil>0:sysutils/py-psutil@${PY_FLAVOR} USES= python USE_GITHUB= yes GH_ACCOUNT= apache GH_PROJECT= incubator-tvm USE_PYTHON= distutils noegginfo GH_TUPLE= dmlc:dlpack:0acb731:dlpack/3rdparty/dlpack \ dmlc:dmlc-core:808f485:dmlc_core/3rdparty/dmlc-core BUILD_WRKSRC= ${WRKSRC}/python INSTALL_WRKSRC= ${WRKSRC}/python BUILD_WRKSRC_TOPI= ${WRKSRC}/topi/python INSTALL_WRKSRC_TOPI= ${WRKSRC}/topi/python MAKE_ENV+= FREEBSD_LIBRARY_PATH=${LOCALBASE}/lib post-patch: @${REINPLACE_CMD} 's|dll_path = \[\]|dll_path = ["${LOCALBASE}/lib"]|' ${WRKSRC}/python/tvm/_ffi/libinfo.py post-configure: @cd ${BUILD_WRKSRC_TOPI} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_CONFIGURE_TARGET} ${PYDISTUTILS_CONFIGUREARGS} post-build: @cd ${BUILD_WRKSRC_TOPI} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS} post-install: @cd ${INSTALL_WRKSRC_TOPI} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS} @${RM} -r ${STAGEDIR}${PREFIX}/tvm ${STAGEDIR}${PREFIX}/topi @${RM} ${STAGEDIR}${PREFIX}/topi/libtvm_topi.so @${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name "*.so" | ${XARGS} ${STRIP_CMD} # autoplist because 1) python's autoplist is inaccurate for tvm and 2) because there's the add-on package topi @cd ${STAGEDIR}${PREFIX} && \ ${FIND} ${PYTHON_SITELIBDIR:C|${LOCALBASE}/||} -type f -or -type l >> ${TMPPLIST} .include Index: head/misc/py-tvm/files/patch-python_tvm_contrib_cc.py =================================================================== --- head/misc/py-tvm/files/patch-python_tvm_contrib_cc.py (nonexistent) +++ head/misc/py-tvm/files/patch-python_tvm_contrib_cc.py (revision 520153) @@ -0,0 +1,38 @@ +--- python/tvm/contrib/cc.py.orig 2019-11-27 03:24:12 UTC ++++ python/tvm/contrib/cc.py +@@ -27,7 +27,7 @@ from .util import tempdir + def create_shared(output, + objects, + options=None, +- cc="g++"): ++ cc="c++"): + """Create shared library. + + Parameters +@@ -44,7 +44,7 @@ def create_shared(output, + cc : Optional[str] + The compiler command. + """ +- if sys.platform == "darwin" or sys.platform.startswith("linux"): ++ if sys.platform == "darwin" or sys.platform.startswith("linux") or sys.platform.startswith("freebsd"): + _linux_compile(output, objects, options, cc) + elif sys.platform == "win32": + _windows_shared(output, objects, options) +@@ -56,7 +56,7 @@ def create_shared(output, + create_shared.output_format = "so" if sys.platform != "win32" else "dll" + + +-def build_create_shared_func(options=None, compile_cmd="g++"): ++def build_create_shared_func(options=None, compile_cmd="c++"): + """Build create_shared function with particular default options and compile_cmd. + + Parameters +@@ -108,7 +108,7 @@ def cross_compiler(compile_func, base_options=None, ou + return _fcompile + + +-def _linux_compile(output, objects, options, compile_cmd="g++"): ++def _linux_compile(output, objects, options, compile_cmd="c++"): + cmd = [compile_cmd] + if output.endswith(".so") or output.endswith(".dylib"): + cmd += ["-shared", "-fPIC"] Property changes on: head/misc/py-tvm/files/patch-python_tvm_contrib_cc.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/misc/py-tvm/files/patch-python_tvm_micro_base.py =================================================================== --- head/misc/py-tvm/files/patch-python_tvm_micro_base.py (nonexistent) +++ head/misc/py-tvm/files/patch-python_tvm_micro_base.py (revision 520153) @@ -0,0 +1,13 @@ +--- python/tvm/micro/base.py.orig 2019-12-14 17:04:12 UTC ++++ python/tvm/micro/base.py +@@ -87,8 +87,8 @@ class Session: + + Raises error if not supported. + """ +- if not sys.platform.startswith("linux"): +- raise RuntimeError("microTVM is currently only supported on Linux") ++ if not sys.platform.startswith("linux") and not sys.platform.startswith("freebsd"): ++ raise RuntimeError("microTVM is currently only supported on Linux and FreeBSD") + # TODO(weberlo): Add 32-bit support. + # It's primarily the compilation pipeline that isn't compatible. + if sys.maxsize <= 2**32: Property changes on: head/misc/py-tvm/files/patch-python_tvm_micro_base.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property