From 75d0585acb6a075f2840fe14e78d6f3e7d08a5e3 Mon Sep 17 00:00:00 2001 From: xpamych Date: Mon, 24 Oct 2022 20:34:46 +0300 Subject: [PATCH] . --- noisetorch/lure.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/noisetorch/lure.sh b/noisetorch/lure.sh index e141ff8..98c0587 100644 --- a/noisetorch/lure.sh +++ b/noisetorch/lure.sh @@ -11,15 +11,34 @@ conflicts=('noisetorch') deps=('git go') build_deps=('git' 'go') -sources=("https://github.com/noisetorch/NoiseTorch.git") +sources=("${name}::git+https://github.com/noisetorch/NoiseTorch.git#tag=v${version}" + "git+https://github.com/noisetorch/c-ringbuf.git" + "git+https://github.com/noisetorch/rnnoise.git" +) checksums=('skip') prepare() { cd "${srcdir}" +git submodule init +git config submodule. "c/c-ringbuf".url "${srcdir}/c-ringbuf" +git config submodule. "c/rnnoise".url "${srcdir}/rnnoise" +git submodule--helper update } build() { +cd "${srcdir} +export GOPATH="${srcdir}/go" +pushd "c/ladspa" make +popd +export CGO_CPPFLAGS="${CPPFLAGS}" +export CGO_CFLAGS="${CFLAGS}" +export CGO_CXXFLAGS="${CXXFLAGS}" +export CGO_LDFLAGS="${LDFLAGS}" +export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" +go generate +go build -ldflags "${vendor_flags}" -linkmode=external" -o bin/noisetorch +go clean -modcache } package() {