Skip to content

Commit 21249dd

Browse files
fix(nemo-speech-cpp): make sentencepiece setup portable
Normalize the pinned upstream helper's GNU-only install invocation before running it so the Darwin backend can preserve the dependency licenses with BSD install. Assisted-by: Codex:gpt-5.6 [Codex]
1 parent 947cf72 commit 21249dd

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

backend/go/nemo-speech-cpp/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,12 @@ patch-itn-headers:
279279
itn: $(ITN_MARKER)
280280

281281
$(SENTENCEPIECE_MARKER): | sources/NeMo-Speech.cpp
282+
# Upstream uses GNU install's -D for licenses, which BSD install on macOS
283+
# does not support. Create the destination first and use the portable form.
284+
cd sources/NeMo-Speech.cpp && \
285+
install -d .deps/sentencepiece/share/licenses/nemo-speech/third_party/sentencepiece && \
286+
sed -i.bak 's/install -Dm0644/install -m 0644/' scripts/build_sentencepiece_static.sh && \
287+
rm -f scripts/build_sentencepiece_static.sh.bak
282288
cd sources/NeMo-Speech.cpp && JOBS=$(JOBS) scripts/build_sentencepiece_static.sh
283289

284290
sentencepiece: $(SENTENCEPIECE_MARKER)

0 commit comments

Comments
 (0)