diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2024-02-18 15:34:19 +0100 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2024-02-18 15:34:50 +0100 |
commit | a197fa798970b37e4adfca9fbe6a7303f47b47d6 (patch) | |
tree | 33c7161e2cdd1a1caa619c97f8175a276f189179 /sci-libs/onnx | |
parent | sys-libs/binutils-libs: drop 2.40-r5 (diff) | |
download | gentoo-a197fa798970b37e4adfca9fbe6a7303f47b47d6.tar.gz gentoo-a197fa798970b37e4adfca9fbe6a7303f47b47d6.tar.bz2 gentoo-a197fa798970b37e4adfca9fbe6a7303f47b47d6.zip |
sci-libs/onnx: fix build on musl
Closes: https://bugs.gentoo.org/924878
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'sci-libs/onnx')
-rw-r--r-- | sci-libs/onnx/files/onnx-1.14.1-musl.patch | 11 | ||||
-rw-r--r-- | sci-libs/onnx/onnx-1.14.1-r2.ebuild | 5 |
2 files changed, 15 insertions, 1 deletions
diff --git a/sci-libs/onnx/files/onnx-1.14.1-musl.patch b/sci-libs/onnx/files/onnx-1.14.1-musl.patch new file mode 100644 index 000000000000..04748ed67e6a --- /dev/null +++ b/sci-libs/onnx/files/onnx-1.14.1-musl.patch @@ -0,0 +1,11 @@ +--- a/onnx/checker.cc 2024-02-18 15:30:03.316320035 +0100 ++++ b/onnx/checker.cc 2024-02-18 15:31:05.715473732 +0100 +@@ -184,7 +184,7 @@ + } + std::string data_path = path_join(ctx.get_model_dir(), relative_path); + // use stat64 to check whether the file exists +-#if defined(__APPLE__) || defined(__wasm__) ++#if defined(__APPLE__) || defined(__wasm__) || !defined(__GLIBC__) + struct stat buffer; // APPLE does not have stat64 + if (stat((data_path).c_str(), &buffer) != 0) { + #else diff --git a/sci-libs/onnx/onnx-1.14.1-r2.ebuild b/sci-libs/onnx/onnx-1.14.1-r2.ebuild index 9a6ffb11f82d..e6ecbfd239bc 100644 --- a/sci-libs/onnx/onnx-1.14.1-r2.ebuild +++ b/sci-libs/onnx/onnx-1.14.1-r2.ebuild @@ -34,7 +34,10 @@ BDEPEND="python? ( ${DISTUTILS_DEPS} )" -PATCHES=( "${FILESDIR}"/${PN}-1.14.0-cxx_14.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-1.14.0-cxx_14.patch + "${FILESDIR}"/${P}-musl.patch +) src_prepare() { cmake_src_prepare |