commit: 8d08fea540bae2f515dbf74ab5d0884734648f02
Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Tue May 6 18:30:47 2025 +0000
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Tue May 6 18:31:21 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d08fea5
sci-ml/sentencepiece: fix building
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
sci-ml/sentencepiece/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 38348e58843f..bb743d9e9695 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
+}