summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/py-pytorch/Makefile11
-rw-r--r--misc/py-pytorch/distinfo4
2 files changed, 14 insertions, 1 deletions
diff --git a/misc/py-pytorch/Makefile b/misc/py-pytorch/Makefile
index 8f556eab3bdb..bff54f2c9fc1 100644
--- a/misc/py-pytorch/Makefile
+++ b/misc/py-pytorch/Makefile
@@ -1,9 +1,11 @@
PORTNAME= pytorch
DISTVERSIONPREFIX= v
DISTVERSION= 2.2.1
+PORTREVISION= 1
CATEGORIES= misc # machine-learning
MASTER_SITES= https://github.com/pytorch/pytorch/releases/download/v${DISTVERSION}/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTFILES= ${PORTNAME}-${DISTVERSIONFULL}${EXTRACT_SUFX} # the main tarball disappears when GH_xx tags are added w/out this line
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= yuri@FreeBSD.org
@@ -42,6 +44,9 @@ RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dill>0:devel/py-dill@${PY_FLAVOR} # optiona
USES= compiler:c++17-lang localbase:ldflags python
USE_PYTHON= distutils autoplist
+USE_GITHUB= nodefault
+GH_TUPLE= pytorch:cpuinfo:3a3b76bc8845d0f4a2ea3108e256313458c5de03:cpuinfo/cpuinfo-with-freebsd-support # https://github.com/pytorch/cpuinfo/pull/230/commits
+
MAKE_ENV= USE_NINJA=no # ninja breaks for some reason
MAKE_ENV+= BUILD_TEST=0 # ninja breaks for some reason
MAKE_ENV+= USE_MKLDNN=0 # disable MKLDNN that doesn't exist, see https://github.com/pytorch/pytorch/issues/100957
@@ -58,6 +63,12 @@ POST_PLIST= fix-plist
USES+= llvm:max=15
.endif
+post-patch:
+ @cd ${WRKSRC} && \
+ ${RM} -r third_party/cpuinfo third_party/fbgemm/third_party/cpuinfo && \
+ ${CP} -r cpuinfo-with-freebsd-support third_party/cpuinfo && \
+ ${CP} -r cpuinfo-with-freebsd-support third_party/fbgemm/third_party/cpuinfo
+
post-install: # strip binaries
@${STRIP_CMD} \
${STAGEDIR}${PYTHON_SITELIBDIR}/torch/bin/torch_shm_manager \
diff --git a/misc/py-pytorch/distinfo b/misc/py-pytorch/distinfo
index 70054e4d3cfd..1bd8a1fbc0ce 100644
--- a/misc/py-pytorch/distinfo
+++ b/misc/py-pytorch/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1708727478
+TIMESTAMP = 1711068042
SHA256 (pytorch/pytorch-v2.2.1.tar.gz) = 8069467387b8ab7a7279671b9144d80a5c5342b4fa022eb3c1db629a6fd806c9
SIZE (pytorch/pytorch-v2.2.1.tar.gz) = 287453242
+SHA256 (pytorch/pytorch-cpuinfo-3a3b76bc8845d0f4a2ea3108e256313458c5de03_GH0.tar.gz) = 658acaf67573484abc7a093066d3766f9a3b94aff5b77e0f4e9c72cee5ebaa4a
+SIZE (pytorch/pytorch-cpuinfo-3a3b76bc8845d0f4a2ea3108e256313458c5de03_GH0.tar.gz) = 3534893