From nobody Thu Dec 14 02:13:28 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrG9N4D1Jz52gHF; Thu, 14 Dec 2023 02:13:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SrG9N2fSfz4RZX; Thu, 14 Dec 2023 02:13:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702520008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kedb2KLMdT93tjQGYh3JUn8FTdbxwXlptQXjWlswwSY=; b=oc28uX9Pp1v9gU1OnPBM6IL52t/vLUpAvqngCSShetbmsnPj9Jnf0ihTZkS9+BIjuvZFBV Uic9TsNDdt5LbHN2KMVpyF3Qe0k0tmIs0gzr1wUzhhbq+d4/UgbCxtkKbkjF7fuHRMrxPY e+n6W7WSQPR5X8EjVrgIuVi4PZGfl23v0xaSJPDsIlc2fQxTSvJLJ/h/yyoi6LDqWiiO+Q Iz53p4OvM7aGXO6wKqL9Sq2gtvCXxJpMo+K4VxgQsvdIRcQazufGUHCaRi+iI2v/Y1ymtR FDdSfCzlmrD811rCzvTQXtSPROZVewBYJ0z3AeReAYNPoCnz7hGQALKheguQkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702520008; a=rsa-sha256; cv=none; b=o+JPJf5oumN+1zBwzqAhzS8OpTW7148/N2p7oChsxY7s4zg+CjH6gEftkCkINuhq/hhhdb dj5AbiiieQ9ibvGD6FL/IYXcku+21wXel9hjg2nuc4eVLAMPeS85nAJQWqXpNSrKZYOQZZ FLW6zRTl+XMBDgNSX3Yw8UI/dYlU/8glxSkTBsqddul6ZACARnSwa/gc60TlyQApZjBafP FPkvMIqKAeqbvtlbv7nsSvaqrEnuLe+9Xm/frBpLzl6VdAU8245NCVLfzTKsmXn4D6+cLP 0IBBS4zAu0P8vjj6yW4rX1hJVJ4iEE/JDYI6LbCP7VupAO+i3wa4OECo0f87TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702520008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kedb2KLMdT93tjQGYh3JUn8FTdbxwXlptQXjWlswwSY=; b=Tu+8YFVBkzKvrGMSPz5qagGPW8LICOrRGNddXr2f+CKzKBLio/3iBqfj6377mcUG14M+Qs zmhqFoPug31JgKrrdsjCAXE3dYt2yqsTBJSuctfF16J00QoFBII8BBmK7o/IszAHaExhZk 734pBapWbo7dRgauNyMGy9GvRJ57pLWcYExmQB8HhUi1bFoToCEelrcqpLu7lvPMuXqHHD d0k5PODTsB27QbnSjUNkqimORYJdOu2KheQB2NJVXDR+XsT32Xv4dTA7PH0filZKIvcD1I MpyhV0rBwKNe6YTwKUPdC83YgM3XjtGgNQ1fRHKw6geRWN3H76xHnuVDsQDrCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrG9N0YwCz1NMc; Thu, 14 Dec 2023 02:13:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BE2DSY5009144; Thu, 14 Dec 2023 02:13:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BE2DSkZ009141; Thu, 14 Dec 2023 02:13:28 GMT (envelope-from git) Date: Thu, 14 Dec 2023 02:13:28 GMT Message-Id: <202312140213.3BE2DSkZ009141@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: b0297e87d00d - main - audio/py-torchaudio: New port: PyTorch-based audio signal processing and machine learning library List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b0297e87d00d8174ef39845e5faba0a4e1c8de03 Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=b0297e87d00d8174ef39845e5faba0a4e1c8de03 commit b0297e87d00d8174ef39845e5faba0a4e1c8de03 Author: Yuri Victorovich AuthorDate: 2023-12-14 02:12:18 +0000 Commit: Yuri Victorovich CommitDate: 2023-12-14 02:13:24 +0000 audio/py-torchaudio: New port: PyTorch-based audio signal processing and machine learning library --- audio/Makefile | 1 + audio/py-torchaudio/Makefile | 46 +++++++++++++++++++++++++++++++++++++++++++ audio/py-torchaudio/distinfo | 5 +++++ audio/py-torchaudio/pkg-descr | 8 ++++++++ 4 files changed, 60 insertions(+) diff --git a/audio/Makefile b/audio/Makefile index f06f538b2b74..446c1cd6d3fc 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -667,6 +667,7 @@ SUBDIR += py-speechrecognition SUBDIR += py-spotipy SUBDIR += py-tagpy + SUBDIR += py-torchaudio SUBDIR += py-wavio SUBDIR += py-webrtcvad SUBDIR += py-zita-audiotools diff --git a/audio/py-torchaudio/Makefile b/audio/py-torchaudio/Makefile new file mode 100644 index 000000000000..2f623ef56c63 --- /dev/null +++ b/audio/py-torchaudio/Makefile @@ -0,0 +1,46 @@ +PORTNAME= torchaudio +DISTVERSIONPREFIX= v +DISTVERSION= 2.1.1 +CATEGORIES= audio python # machine-learning +MASTER_SITES= https://downloads.sourceforge.net/project/sox/sox/14.4.2/:sox +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTFILES= sox-14.4.2.tar.bz2:sox +EXTRACT_ONLY= ${GH_ACCOUNT}-${GH_PROJECT}-${DISTVERSIONFULL}_GH0.tar.gz + +MAINTAINER= yuri@FreeBSD.org +COMMENT= PyTorch-based audio signal processing and machine learning library +WWW= https://pytorch.org/audio/stable/index.html + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytorch>0:misc/py-pytorch@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \ + cmake:devel/cmake-core \ + ninja:devel/ninja \ + pybind11>0:devel/pybind11 +LIB_DEPENDS= libprotobuf.so:devel/protobuf +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytorch>0:misc/py-pytorch@${PY_FLAVOR} + +USES= python +USE_PYTHON= pep517 autoplist + +MAKE_ENV= USE_FFMPEG=0 # ffmpeg integration is broken or unavailable, see https://github.com/pytorch/audio/issues/3716 + +USE_GITHUB= yes +GH_ACCOUNT= pytorch +GH_PROJECT= audio + +post-patch: + @${REINPLACE_CMD} \ + -e 's| URL .*| URL file://${DISTDIR}/sox-14.4.2.tar.bz2|' \ + ${WRKSRC}/third_party/sox/CMakeLists.txt + +post-install: + @cd ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} && ${STRIP_CMD} \ + torchaudio/lib/_torchaudio.so \ + torchaudio/lib/_torchaudio_sox.so \ + torchaudio/lib/libtorchaudio.so \ + torchaudio/lib/libtorchaudio_sox.so + +.include diff --git a/audio/py-torchaudio/distinfo b/audio/py-torchaudio/distinfo new file mode 100644 index 000000000000..25f430b308a7 --- /dev/null +++ b/audio/py-torchaudio/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1702517865 +SHA256 (sox-14.4.2.tar.bz2) = 81a6956d4330e75b5827316e44ae381e6f1e8928003c6aa45896da9041ea149c +SIZE (sox-14.4.2.tar.bz2) = 935449 +SHA256 (pytorch-audio-v2.1.1_GH0.tar.gz) = fc905d8d80cec5060445f07314b5b4d276759636de87a4c21821d31d760c3974 +SIZE (pytorch-audio-v2.1.1_GH0.tar.gz) = 4414068 diff --git a/audio/py-torchaudio/pkg-descr b/audio/py-torchaudio/pkg-descr new file mode 100644 index 000000000000..67052afd9692 --- /dev/null +++ b/audio/py-torchaudio/pkg-descr @@ -0,0 +1,8 @@ +The aim of torchaudio is to apply PyTorch to the audio domain. By supporting +PyTorch, torchaudio follows the same philosophy of providing strong GPU +acceleration, having a focus on trainable features through the autograd system, +and having consistent style (tensor names and dimension names). Therefore, it is +primarily a machine learning library and not a general signal processing +library. The benefits of PyTorch can be seen in torchaudio through having all +the computations be through PyTorch operations which makes it easy to use and +feel like a natural extension.