pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

py-torch: some buildlink additions, stuck for OpenMP now



Module Name:	pkgsrc-wip
Committed By:	mayuresh <mayuresh%acm.org@localhost>
Pushed By:	mayuresh
Date:		Fri Jul 22 11:18:17 2022 +0530
Changeset:	6ac4cc23822907735889d30c978e444cee2bf659

Modified Files:
	py-torch/Makefile
	py-torch/TODO
Added Files:
	py-torch/patches/patch-third__party_protobuf_post__process__dist.sh

Log Message:
py-torch: some buildlink additions, stuck for OpenMP now

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=6ac4cc23822907735889d30c978e444cee2bf659

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 py-torch/Makefile                                    | 20 ++++++++++++++------
 py-torch/TODO                                        |  6 ++++++
 ...atch-third__party_protobuf_post__process__dist.sh | 13 +++++++++++++
 3 files changed, 33 insertions(+), 6 deletions(-)

diffs:
diff --git a/py-torch/Makefile b/py-torch/Makefile
index ddfbc4ce06..b3bac43425 100644
--- a/py-torch/Makefile
+++ b/py-torch/Makefile
@@ -13,20 +13,28 @@ COMMENT=	Tensors and Dynamic neural networks in Python with GPU acceleration
 #LICENSE=	# TODO: (see mk/license.mk)
 
 # This neeeds to be set as environment variable, not sure how
-#USE_CUDA=0
+#USE_CUDA=	0
 
 DEPENDS+=	${PYPKGPREFIX}-yaml>=5.4.1:../../textproc/py-yaml
+DEPENDS+=	git-base-[0-9]*:../../devel/git-base
+DEPENDS+=	cmake>=3.17:../../devel/cmake
+
+USE_LANGUAGES+=	c c++
 
 WRKSRC=	${WRKDIR}/pytorch
 
 post-extract:
-	cd ${WRKDIR}; \
-	git clone --recursive https://github.com/pytorch/pytorch; \
-	cd pytorch; \
-	git submodule sync; \
-	git submodule update --init --recursive --jobs 0
+	rsync -a /tmp/pytorch ${WRKDIR}
+	# This step takes long. During development use a local copy
+	#cd ${WRKDIR}; \
+	#git clone --recursive https://github.com/pytorch/pytorch; \
+	#cd pytorch; \
+	#git submodule sync; \
+	#git submodule update --init --recursive --jobs 0
 
 # url2pkg-marker (please do not remove this line.)
 .include "../../lang/python/egg.mk"
 .include "../../devel/google-glog/buildlink3.mk"
+.include "../../math/py-numpy/buildlink3.mk"
+.include "../../parallel/openmp/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/py-torch/TODO b/py-torch/TODO
index 4d71eb578c..bdb0d6e739 100644
--- a/py-torch/TODO
+++ b/py-torch/TODO
@@ -1,3 +1,9 @@
+numpy dep
+
+OpenMP error
+
+Watch CMake warnings, some of those could be addressable
+
 There are errors suggesting to look at the choice of c and c++ compiler.
 
 Suggested compiler by the package is clang. But how does it work when there are
diff --git a/py-torch/patches/patch-third__party_protobuf_post__process__dist.sh b/py-torch/patches/patch-third__party_protobuf_post__process__dist.sh
new file mode 100644
index 0000000000..86b4e0912e
--- /dev/null
+++ b/py-torch/patches/patch-third__party_protobuf_post__process__dist.sh
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/protobuf/post_process_dist.sh.orig	2022-07-22 04:49:35.746411086 +0000
++++ third_party/protobuf/post_process_dist.sh
+@@ -15,7 +15,7 @@
+ #    non-testdata .txt files are converted to Windows-style line endings.
+ # 5) Cleans up after itself.
+ 
+-if [ "$1" == "" ]; then
++if [ "$1" = "" ]; then
+   echo "USAGE:  $0 DISTFILE" >&2
+   exit 1
+ fi


Home | Main Index | Thread Index | Old Index