git: 8e07bad0f5dc - main - audio/py-torchaudio: Add missing libsox.so
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 20 Aug 2025 15:38:11 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=8e07bad0f5dc7af65b3ad443f9bf609c58244c68
commit 8e07bad0f5dc7af65b3ad443f9bf609c58244c68
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2025-08-20 15:36:34 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-08-20 15:38:08 +0000
audio/py-torchaudio: Add missing libsox.so
On a side note: it's bad that libsox is bundled.
---
audio/py-torchaudio/Makefile | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/audio/py-torchaudio/Makefile b/audio/py-torchaudio/Makefile
index f0e935d26210..f10cff716d80 100644
--- a/audio/py-torchaudio/Makefile
+++ b/audio/py-torchaudio/Makefile
@@ -1,7 +1,7 @@
PORTNAME= torchaudio
DISTVERSIONPREFIX= v
DISTVERSION= 2.8.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio python # machine-learning
MASTER_SITES= https://downloads.sourceforge.net/project/sox/sox/14.4.2/:sox
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -35,6 +35,9 @@ USE_GITHUB= yes
GH_ACCOUNT= pytorch
GH_PROJECT= audio
+# workaround for missing libsox.so
+PLIST_FILES= lib/python${_PYTHON_VERSION}/site-packages/torchaudio/lib/libsox.so
+
post-patch:
@${REINPLACE_CMD} \
-e 's| URL .*| URL file://${DISTDIR}/sox-14.4.2.tar.bz2|' \
@@ -46,5 +49,9 @@ post-install:
torchaudio/lib/_torchaudio_sox.so \
torchaudio/lib/libtorchaudio.so \
torchaudio/lib/libtorchaudio_sox.so
+ # workaround for missing libsox.so
+ @${CP} \
+ ${WRKSRC}/build/*/third_party/sox/libsox.so \
+ ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/torchaudio/lib
.include <bsd.port.mk>