Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151644153
D15902.id44071.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D15902.id44071.diff
View Options
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 <bsd.port.pre.mk>
+
+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 <bsd.port.post.mk>
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<int32>(static_cast<int64>(pthread_self()));
++ int32 tid = static_cast<int32>(reinterpret_cast<intptr_t>(pthread_self()));
+ int32 pid = static_cast<int32>(getpid());
+ #elif defined(PLATFORM_WINDOWS)
+ int32 tid = static_cast<int32>(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 <fcntl.h>
+ #include <stdio.h>
+ #include <sys/mman.h>
+-#if !defined(__APPLE__)
++#if !defined(__APPLE__) && !defined(__FreeBSD__)
+ #include <sys/sendfile.h>
+ #endif
+ #include <sys/stat.h>
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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 5:58 PM (3 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31237575
Default Alt Text
D15902.id44071.diff (4 KB)
Attached To
Mode
D15902: science/tensorflow-core: Work-in-progress port for TensorFlow core library.
Attached
Detach File
Event Timeline
Log In to Comment