Index: science/tensorflow-core/Makefile =================================================================== --- /dev/null +++ science/tensorflow-core/Makefile @@ -0,0 +1,64 @@ +# $FreeBSD$ + +PORTNAME= tensorflow +DISTVERSION= 1.8.0 +DISTVERSIONPREFIX= v +CATEGORIES= science + +MAINTAINER= arrowd@FreeBSD.org +COMMENT= Computation using data flow graphs for scalable machine learning + +LICENSE= APACHE20 + +BUILD_DEPENDS= bazel:devel/bazel + +USES= python shebangfix + +USE_GITHUB= yes +GH_PROJECT= tensorflow + +#SHEBANG_GLOB= *.py + +PLIST_SUB= TF_PORT_VERSION=${PORTVERSION} + +.include + +BAZEL_TARGET?= //tensorflow:libtensorflow.so + +post-fetch: + @make do-extract + cd ${WRKSRC} && \ + bazel fetch --repository_cache=${PORTSDIR}/distfiles/bazel_cache ${BAZEL_TARGET} + @make do-clean + +do-configure: + (cd ${WRKSRC} && ${SETENV} \ + PYTHON_BIN_PATH=${PYTHON_CMD} \ + USE_DEFAULT_PYTHON_LIB_PATH=1 \ + TF_NEED_S3=0 \ + TF_NEED_JEMALLOC=0 \ + TF_NEED_GCP=0 \ + TF_NEED_HDFS=0 \ + TF_NEED_KAFKA=0 \ + TF_ENABLE_XLA=0 \ + TF_NEED_GDR=0 \ + TF_NEED_VERBS=0 \ + TF_NEED_OPENCL_SYCL=0 \ + TF_NEED_CUDA=0 \ + TF_DOWNLOAD_CLANG=0 \ + TF_NEED_MPI=0 \ + TF_SET_ANDROID_WORKSPACE=0 \ + CC_OPT_FLAGS="${CFLAGS}" \ + ./configure) + +do-build: + cd ${WRKSRC} && bazel info && \ + bazel build --config=opt ${BAZEL_EXTRA_ARGS} ${BAZEL_TARGET} + +do-install: + +pre-clean: + cd ${WRKSRC} && \ + bazel clean --repository_cache=${PORTSDIR}/distfiles/bazel_cache + +.include Index: science/tensorflow-core/distinfo =================================================================== --- /dev/null +++ science/tensorflow-core/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1529347770 +SHA256 (tensorflow-tensorflow-v1.8.0_GH0.tar.gz) = 47646952590fd213b747247e6870d89bb4a368a95ae3561513d6c76e44f92a75 +SIZE (tensorflow-tensorflow-v1.8.0_GH0.tar.gz) = 22649439 Index: science/tensorflow-core/files/patch-tensorflow_core_platform_env.cc =================================================================== --- /dev/null +++ science/tensorflow-core/files/patch-tensorflow_core_platform_env.cc @@ -0,0 +1,11 @@ +--- tensorflow/core/platform/env.cc.orig 2018-06-19 10:30:01 UTC ++++ tensorflow/core/platform/env.cc +@@ -347,7 +347,7 @@ bool Env::CreateUniqueFileName(string* prefix, const s + // Has to be casted to long first, else this error appears: + // static_cast from 'pthread_t' (aka 'pthread *') to 'int32' (aka 'int') + // is not allowed +- int32 tid = static_cast(static_cast(pthread_self())); ++ int32 tid = static_cast(reinterpret_cast(pthread_self())); + int32 pid = static_cast(getpid()); + #elif defined(PLATFORM_WINDOWS) + int32 tid = static_cast(GetCurrentThreadId()); Index: science/tensorflow-core/files/patch-tensorflow_core_platform_posix_posix__file__system.cc =================================================================== --- /dev/null +++ science/tensorflow-core/files/patch-tensorflow_core_platform_posix_posix__file__system.cc @@ -0,0 +1,11 @@ +--- tensorflow/core/platform/posix/posix_file_system.cc.orig 2018-06-19 10:38:03 UTC ++++ tensorflow/core/platform/posix/posix_file_system.cc +@@ -18,7 +18,7 @@ limitations under the License. + #include + #include + #include +-#if !defined(__APPLE__) ++#if !defined(__APPLE__) && !defined(__FreeBSD__) + #include + #endif + #include Index: science/tensorflow-core/pkg-descr =================================================================== --- /dev/null +++ science/tensorflow-core/pkg-descr @@ -0,0 +1,12 @@ +TensorFlow is an open source software library for numerical computation using +data flow graphs. Nodes in the graph represent mathematical operations, while +the graph edges represent the multidimensional data arrays (tensors) +communicated between them. The flexible architecture allows you to deploy +computation to one or more CPUs or GPUs in a desktop, server, or mobile device +with a single API. TensorFlow was originally developed by researchers and +engineers working on the Google Brain Team within Google's Machine Intelligence +research organization for the purposes of conducting machine learning and deep +neural networks research, but the system is general enough to be applicable in +a wide variety of other domains as well. + +WWW: https://www.tensorflow.org