From 8d08fea540bae2f515dbf74ab5d0884734648f02 Mon Sep 17 00:00:00 2001 From: Alfredo Tupone Date: Tue, 6 May 2025 20:30:47 +0200 Subject: [PATCH] sci-ml/sentencepiece: fix building Signed-off-by: Alfredo Tupone --- .../sentencepiece-0.2.0-r3.ebuild | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sci-ml/sentencepiece/sentencepiece-0.2.0-r3.ebuild b/sci-ml/sentencepiece/sentencepiece-0.2.0-r3.ebuild index 38348e58843f6..bb743d9e96957 100644 --- a/sci-ml/sentencepiece/sentencepiece-0.2.0-r3.ebuild +++ b/sci-ml/sentencepiece/sentencepiece-0.2.0-r3.ebuild @@ -48,6 +48,13 @@ src_prepare() { eapply "${FILESDIR}"/${P}-gcc15.patch cmake_src_prepare distutils-r1_src_prepare + sed \ + -e 's|@libprotobuf_lite@|protobuf-lite|' \ + -e "s|@includedir_for_pc_file@|${S}/src|" \ + -e "s|@libdir_for_pc_file@|${BUILD_DIR}/src|" \ + ${PN}.pc.in \ + > python/${PN}.pc \ + || die } src_configure() { @@ -61,10 +68,19 @@ src_configure() { src_compile() { cmake_src_compile cd python - distutils-r1_src_compile + PKG_CONFIG_PATH=. distutils-r1_src_compile +} + +src_test() { + LD_LIBRARY_PATH=${BUILD_DIR}/src distutils-r1_src_test } python_test() { cd python ${EPYTHON} test/sentencepiece_test.py || die } + +src_install() { + cmake_src_install + distutils-r1_src_install +}