aboutsummaryrefslogtreecommitdiff
path: root/misc/pytorch
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2023-03-09 09:49:08 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2023-03-09 09:49:08 +0000
commitb83abe200246eceef1723a174b13e0a14ffbf86b (patch)
tree60a9cbd123cdb97544444838dcb29aa5f83647f3 /misc/pytorch
parente00aca7abcbeb0aecd2f47d75a03bcde7ce3aa2a (diff)
downloadports-b83abe200246eceef1723a174b13e0a14ffbf86b.tar.gz
ports-b83abe200246eceef1723a174b13e0a14ffbf86b.zip
misc/pytorch: fix packaging on non-amd64
AVX gets built only on amd64.
Diffstat (limited to 'misc/pytorch')
-rw-r--r--misc/pytorch/Makefile10
-rw-r--r--misc/pytorch/pkg-plist6
2 files changed, 12 insertions, 4 deletions
diff --git a/misc/pytorch/Makefile b/misc/pytorch/Makefile
index c272cf18c65d..476c58a5da72 100644
--- a/misc/pytorch/Makefile
+++ b/misc/pytorch/Makefile
@@ -51,6 +51,14 @@ PYTHON_BUILD_DEPENDS= ${PYTHON_PY_DEPENDS} \
pybind11>0:devel/pybind11
PYTHON_RUN_DEPENDS= ${PYTHON_PY_DEPENDS}
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "amd64"
+PLIST_SUB+= AMD64=""
+.else
+PLIST_SUB+= AMD64="@comment "
+.endif
+
post-patch:
# replace malloc.h -> stdlib.h in many places
@cd ${WRKSRC} && for f in $$(${GREP} -rl "include <malloc\.h>" * | ${GREP} -E "\.(c|cpp|h|hpp)$$"); do \
@@ -63,4 +71,4 @@ post-install:
# https://github.com/pytorch/pytorch/issues/24417
@${FIND} ${STAGEDIR} -type d -empty -delete
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/misc/pytorch/pkg-plist b/misc/pytorch/pkg-plist
index 9f32a8cb03f6..95479410cab7 100644
--- a/misc/pytorch/pkg-plist
+++ b/misc/pytorch/pkg-plist
@@ -8899,9 +8899,9 @@ include/torch/custom_class_detail.h
include/torch/extension.h
include/torch/library.h
include/torch/script.h
-lib/libCaffe2_perfkernels_avx.a
-lib/libCaffe2_perfkernels_avx2.a
-lib/libCaffe2_perfkernels_avx512.a
+%%AMD64%%lib/libCaffe2_perfkernels_avx.a
+%%AMD64%%lib/libCaffe2_perfkernels_avx2.a
+%%AMD64%%lib/libCaffe2_perfkernels_avx512.a
lib/libc10.so
lib/libclog.a
lib/libcpuinfo.a