diff options
-rw-r--r-- | sci-astronomy/siril/files/siril-1.2-fseek64-musl.patch | 52 | ||||
-rw-r--r-- | sci-astronomy/siril/siril-1.2.1.ebuild | 1 |
2 files changed, 53 insertions, 0 deletions
diff --git a/sci-astronomy/siril/files/siril-1.2-fseek64-musl.patch b/sci-astronomy/siril/files/siril-1.2-fseek64-musl.patch new file mode 100644 index 000000000000..310ae0cdb6d3 --- /dev/null +++ b/sci-astronomy/siril/files/siril-1.2-fseek64-musl.patch @@ -0,0 +1,52 @@ +From 7f09478f4522b65b476c788a696159e5a4974286 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Wed, 13 Dec 2023 21:00:08 +0100 +Subject: [PATCH] Clean up and fix fseek64/ftell64 +Upstream: https://gitlab.com/free-astro/siril/-/merge_requests/606 + +Test for the exception systems, GNU and Windows, and then fall back to +standard POSIX. + +This fixes build with musl libc, which does not have fseeko64/ftello64. + +Fixes https://gitlab.com/free-astro/siril/-/issues/1241 +--- a/src/io/avi_pipp/pipp_utf8.h ++++ b/src/io/avi_pipp/pipp_utf8.h +@@ -31,27 +31,15 @@ + #endif + + // 64-bit fseek for various platforms +-#ifdef __linux__ +-#define fseek64 fseeko64 // Linux +-#define ftell64 ftello64 // Linux +-#elif defined (OS_OSX) +-#define fseek64 fseeko // OS X +-#define ftell64 ftello // OS X +-#elif defined(BSD) +-#define fseek64 fseeko // DragonFly BSD, FreeBSD, OpenBSD, NetBSD +-#define ftell64 ftello // DragonFly BSD, FreeBSD, OpenBSD, NetBSD +-#elif defined (__FreeBSD_kernel__) && defined (__GLIBC__) +-#define fseek64 fseeko64 // KFreeBSD +-#define ftell64 ftello64 // KFreeBSD +-#elif defined (__gnu_hurd__) +-#define fseek64 fseeko64 // GNU/Hurd +-#define ftell64 ftello64 // GNU/Hurd +-#elif defined(__CYGWIN__) +-#define fseek64 fseeko // CYGWIN +-#define ftell64 ftello // CYGWIN +-#else ++#if defined(__GLIBC__) || defined(__gnu_hurd__) ++#define fseek64 fseeko64 // GNU ++#define ftell64 ftello64 // GNU ++#elif defined(_WIN32) + #define fseek64 _fseeki64 // Windows + #define ftell64 _ftelli64 // Windows ++#else // POSIX ++#define fseek64 fseeko // OS X, DragonFly BSD, FreeBSD, OpenBSD, NetBSD, musl ++#define ftell64 ftello // OS X, DragonFly BSD, FreeBSD, OpenBSD, NetBSD, musl + #endif + + #endif // PIPP_UTF8_H +-- +GitLab + diff --git a/sci-astronomy/siril/siril-1.2.1.ebuild b/sci-astronomy/siril/siril-1.2.1.ebuild index f230b3469ec6..090db889b8d2 100644 --- a/sci-astronomy/siril/siril-1.2.1.ebuild +++ b/sci-astronomy/siril/siril-1.2.1.ebuild @@ -52,6 +52,7 @@ BDEPEND="dev-build/cmake PATCHES=( "${FILESDIR}/${PN}-docfiles.patch" + "${FILESDIR}/${PN}-1.2-fseek64-musl.patch" ) DOCS=( README.md NEWS ChangeLog AUTHORS ) |