mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-05 14:07:27 -08:00
sci-ml/sentencepiece: fix lto and pre-stripped
Closes: https://bugs.gentoo.org/959086 Closes: https://bugs.gentoo.org/955576 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
parent
771151d5e2
commit
563ef48833
12
sci-ml/sentencepiece/files/sentencepiece-0.2.0-nostrip.patch
Normal file
12
sci-ml/sentencepiece/files/sentencepiece-0.2.0-nostrip.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- a/python/setup.py 2025-07-04 07:49:02.451080540 +0200
|
||||
+++ b/python/setup.py 2025-07-04 07:49:50.934572275 +0200
|
||||
@@ -91,9 +91,6 @@
|
||||
# See: https://github.com/neulab/xnmt/issues/199
|
||||
if sys.platform == 'darwin':
|
||||
cflags.append('-mmacosx-version-min=10.9')
|
||||
- else:
|
||||
- cflags.append('-Wl,-strip-all')
|
||||
- libs.append('-Wl,-strip-all')
|
||||
if sys.platform == 'linux':
|
||||
libs.append('-Wl,-Bsymbolic')
|
||||
print('## cflags={}'.format(' '.join(cflags)))
|
||||
@ -6,7 +6,7 @@ EAPI=8
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
DISTUTILS_EXT=1
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
inherit cmake distutils-r1
|
||||
inherit cmake distutils-r1 dot-a
|
||||
|
||||
DESCRIPTION="Text tokenizer for Neural Network-based text generation"
|
||||
HOMEPAGE="https://github.com/google/sentencepiece"
|
||||
@ -46,7 +46,8 @@ src_prepare() {
|
||||
src/builder.cc \
|
||||
|| die
|
||||
eapply "${FILESDIR}"/${P}-gcc15.patch \
|
||||
"${FILESDIR}"/${P}-cmake.patch
|
||||
"${FILESDIR}"/${P}-cmake.patch \
|
||||
"${FILESDIR}"/${P}-nostrip.patch
|
||||
cmake_src_prepare
|
||||
distutils-r1_src_prepare
|
||||
sed \
|
||||
@ -59,6 +60,7 @@ src_prepare() {
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
lto-guarantee-fat
|
||||
local mycmakeargs=(
|
||||
-DSPM_ABSL_PROVIDER=package
|
||||
-DSPM_PROTOBUF_PROVIDER=package
|
||||
@ -84,4 +86,5 @@ python_test() {
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
distutils-r1_src_install
|
||||
strip-lto-bytecode
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user