Skip to content

Commit 4feb996

Browse files
fix(nemo-speech-cpp): support BSD install
The pinned SentencePiece script uses GNU install -D for license files. macOS provides BSD install, which rejects that flag after the library compiles. Create the license directory and use the portable install form on Darwin. Assisted-by: Codex:gpt-5
1 parent c015def commit 4feb996

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

backend/go/nemo-speech-cpp/Makefile

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

281281
$(SENTENCEPIECE_MARKER): | sources/NeMo-Speech.cpp
282+
# Upstream's license copies use GNU install's -D flag, which BSD install
283+
# does not support. Create the one missing directory and use the portable
284+
# spelling before running the otherwise platform-independent script.
285+
@if [ "$(shell uname -s)" = Darwin ]; then \
286+
cd sources/NeMo-Speech.cpp && \
287+
mkdir -p .deps/sentencepiece/share/licenses/nemo-speech/third_party/sentencepiece && \
288+
perl -pi -e 's/install -Dm0644/install -m 0644/g' scripts/build_sentencepiece_static.sh; \
289+
fi
282290
cd sources/NeMo-Speech.cpp && JOBS=$(JOBS) scripts/build_sentencepiece_static.sh
283291

284292
sentencepiece: $(SENTENCEPIECE_MARKER)

0 commit comments

Comments
 (0)