commit: 190862253a9293810df3854be41acc7d95a2f39d
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri May 5 20:19:55 2023 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri May 5 20:20:16 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19086225
x11-misc/xosview: fix build with musl
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
x11-misc/xosview/files/xosview-1.23-musl.patch | 14 ++++++++++++++
x11-misc/xosview/xosview-1.23.ebuild | 6 +++++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/x11-misc/xosview/files/xosview-1.23-musl.patch
b/x11-misc/xosview/files/xosview-1.23-musl.patch
new file mode 100644
index 000000000000..a2879f0b957f
--- /dev/null
+++ b/x11-misc/xosview/files/xosview-1.23-musl.patch
@@ -0,0 +1,14 @@
+Musl does not have sys/perm.h. Luckily, sys/io.h has the required
+definitions both for musl and glibc.
+
+diff -ruN xosview-1.23.orig/linux/serialmeter.cc
xosview-1.23/linux/serialmeter.cc
+--- xosview-1.23.orig/linux/serialmeter.cc 2020-07-11 14:10:34.000000000
+0200
++++ xosview-1.23/linux/serialmeter.cc 2023-05-05 22:13:19.863489393 +0200
+@@ -25,7 +25,6 @@
+ */
+ #if defined(__i386__) || defined(__ia64__) || defined(__amd64__)
+ #include <sys/io.h>
+-#include <sys/perm.h>
+ #define HAVE_IOPERM
+ #endif
+
diff --git a/x11-misc/xosview/xosview-1.23.ebuild
b/x11-misc/xosview/xosview-1.23.ebuild
index e47a5770c69b..0de8636ff4a8 100644
--- a/x11-misc/xosview/xosview-1.23.ebuild
+++ b/x11-misc/xosview/xosview-1.23.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -24,6 +24,10 @@ DEPEND="${COMMON_DEPS}
DOCS=( CHANGES README.linux TODO )
+PATCHES=(
+ "${FILESDIR}/${P}-musl.patch"
+)
+
src_prepare() {
default