mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-22 21:43:03 -04:00
dev-libs/hts_engine: patch to use ftell() over fgetpos() internals
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
This commit is contained in:
22
dev-libs/hts_engine/files/hts_engine-1.10-musl.patch
Normal file
22
dev-libs/hts_engine/files/hts_engine-1.10-musl.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
The position variable which fgetpos() sets is entirely unspecified,
|
||||
so shouldn't be used in portable code.
|
||||
|
||||
diff --git a/lib/HTS_misc.c.old b/lib/HTS_misc.c
|
||||
index 72306cb..45c51cd 100644
|
||||
--- a/lib/HTS_misc.c.old
|
||||
+++ b/lib/HTS_misc.c
|
||||
@@ -243,13 +243,7 @@ size_t HTS_ftell(HTS_File * fp)
|
||||
if (fp == NULL) {
|
||||
return 0;
|
||||
} else if (fp->type == HTS_FILE) {
|
||||
- fpos_t pos;
|
||||
- fgetpos((FILE *) fp->pointer, &pos);
|
||||
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(__APPLE__) || defined(__ANDROID__)
|
||||
- return (size_t) pos;
|
||||
-#else
|
||||
- return (size_t) pos.__pos;
|
||||
-#endif /* _WIN32 || __CYGWIN__ || __APPLE__ || __ANDROID__ */
|
||||
+ return (size_t)ftell((FILE *) fp->pointer);
|
||||
} else if (fp->type == HTS_DATA) {
|
||||
HTS_Data *d = (HTS_Data *) fp->pointer;
|
||||
return d->index;
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="HMM-based speech synthesis system (HTS) engine and API"
|
||||
HOMEPAGE="https://hts-engine.sourceforge.net/"
|
||||
@@ -14,6 +14,10 @@ IUSE="speech-tools"
|
||||
|
||||
DEPENDS="speech-tools? ( app-accessibility/speech-tools )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/hts_engine-1.10-musl.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
econf $(use_enable speech-tools festival)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user