summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-05-27 04:02:58 +0100
committerSam James <sam@gentoo.org>2023-05-27 04:02:58 +0100
commit3c28815d55e0281a356bed17449b012b27c08c07 (patch)
tree40533ac91830804e4fd3763350b2f6e27f7b4f80 /dev-libs
parentmedia-video/vlc: scrub patches (diff)
downloadgentoo-3c28815d55e0281a356bed17449b012b27c08c07.tar.gz
gentoo-3c28815d55e0281a356bed17449b012b27c08c07.tar.bz2
gentoo-3c28815d55e0281a356bed17449b012b27c08c07.zip
dev-libs/spdlog: fix build w/ musl-1.2.4
Closes: https://bugs.gentoo.org/906954 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/spdlog/files/spdlog-musl-1.2.4.patch30
-rw-r--r--dev-libs/spdlog/spdlog-1.11.0-r1.ebuild (renamed from dev-libs/spdlog/spdlog-1.11.0.ebuild)1
2 files changed, 31 insertions, 0 deletions
diff --git a/dev-libs/spdlog/files/spdlog-musl-1.2.4.patch b/dev-libs/spdlog/files/spdlog-musl-1.2.4.patch
new file mode 100644
index 000000000000..cd1240d36f46
--- /dev/null
+++ b/dev-libs/spdlog/files/spdlog-musl-1.2.4.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/906954
+https://github.com/gabime/spdlog/commit/287a00d364990edbb621fe5e392aeb550135fb96
+
+From 287a00d364990edbb621fe5e392aeb550135fb96 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 3 Jan 2023 09:54:50 -0800
+Subject: [PATCH] Do not use LFS64 functions on linux/musl (#2589)
+
+On musl, off_t is 64bit always ( even on 32bit platforms ), therefore
+using LFS64 funcitons is not needed on such platforms. Moreover, musl
+has stopped providing aliases for these functions [1] which means it
+wont compile on newer musl systems. Therefore only use it on 32bit
+glibc/linux platforms and exclude musl like cygwin or OSX
+
+[1] https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/include/spdlog/details/os-inl.h
++++ b/include/spdlog/details/os-inl.h
+@@ -236,8 +236,8 @@ SPDLOG_INLINE size_t filesize(FILE *f)
+ # else
+ int fd = ::fileno(f);
+ # endif
+-// 64 bits(but not in osx or cygwin, where fstat64 is deprecated)
+-# if (defined(__linux__) || defined(__sun) || defined(_AIX)) && (defined(__LP64__) || defined(_LP64))
++// 64 bits(but not in osx, linux/musl or cygwin, where fstat64 is deprecated)
++# if ((defined(__linux__) && defined(__GLIBC__)) || defined(__sun) || defined(_AIX)) && (defined(__LP64__) || defined(_LP64))
+ struct stat64 st;
+ if (::fstat64(fd, &st) == 0)
+ {
+
diff --git a/dev-libs/spdlog/spdlog-1.11.0.ebuild b/dev-libs/spdlog/spdlog-1.11.0-r1.ebuild
index ebda7ae2f4a2..311db3477688 100644
--- a/dev-libs/spdlog/spdlog-1.11.0.ebuild
+++ b/dev-libs/spdlog/spdlog-1.11.0-r1.ebuild
@@ -31,6 +31,7 @@ RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}/${PN}-force_external_fmt.patch"
+ "${FILESDIR}/${PN}-musl-1.2.4.patch"
)
src_prepare() {