summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-09-27 03:37:40 +0100
committerSam James <sam@gentoo.org>2023-09-27 03:37:40 +0100
commit50a6bc2362bac481d07400cf53037fd42f9969dc (patch)
tree3c90142aaf7e612c87bb880439ef9b7739ae0b01 /media-tv
parentmedia-libs/mesa: fix LLVM detection (diff)
downloadgentoo-50a6bc2362bac481d07400cf53037fd42f9969dc.tar.gz
gentoo-50a6bc2362bac481d07400cf53037fd42f9969dc.tar.bz2
gentoo-50a6bc2362bac481d07400cf53037fd42f9969dc.zip
media-tv/mythtv: fix build w/ linux-headers-6.5
And add the missing dep on linux-headers (which is how I didn't notice the failure to begin with). Closes: https://bugs.gentoo.org/913866 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-tv')
-rw-r--r--media-tv/mythtv/files/mythtv-33.1-linux-headers-6.5.patch30
-rw-r--r--media-tv/mythtv/mythtv-33.1.ebuild2
2 files changed, 32 insertions, 0 deletions
diff --git a/media-tv/mythtv/files/mythtv-33.1-linux-headers-6.5.patch b/media-tv/mythtv/files/mythtv-33.1-linux-headers-6.5.patch
new file mode 100644
index 000000000000..0ead0d51d665
--- /dev/null
+++ b/media-tv/mythtv/files/mythtv-33.1-linux-headers-6.5.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/913866
+https://github.com/MythTV/mythtv/issues/775
+https://github.com/MythTV/mythtv/commit/7d6c7d605f87b697c7488d1eb4a3246b83e31f01
+
+From 7d6c7d605f87b697c7488d1eb4a3246b83e31f01 Mon Sep 17 00:00:00 2001
+From: David Hampton <mythtv@love2code.net>
+Date: Fri, 21 Jul 2023 00:59:43 -0400
+Subject: [PATCH] Work around Linux kernel header 6.5 using C++ reserved
+ keyword.
+
+Starting with kernel 6.5.0, a rewrite of the linux/ioprio.h header
+file uses the C++ reserved keyword "class" as a variable name.
+Fortunately we can redefine the string "class" for the duration of the
+inclusion without any ill effects.
+--- a/libs/libmythbase/mythmiscutil.cpp
++++ b/libs/libmythbase/mythmiscutil.cpp
+@@ -702,7 +702,12 @@ void myth_yield(void)
+ #include <sys/ptrace.h>
+ #include <sys/syscall.h>
+ #if __has_include(<linux/ioprio.h>)
++// Starting with kernel 6.5.0, the following include uses the C++
++// reserved keyword "class" as a variable name. Fortunately we can
++// redefine it without any ill effects.
++#define class class2
+ #include <linux/ioprio.h>
++#undef class
+ #else
+ static constexpr int8_t IOPRIO_BITS { 16 };
+ static constexpr int8_t IOPRIO_CLASS_SHIFT { 13 };
+
diff --git a/media-tv/mythtv/mythtv-33.1.ebuild b/media-tv/mythtv/mythtv-33.1.ebuild
index 9275d56d64ed..f8014ccf777f 100644
--- a/media-tv/mythtv/mythtv-33.1.ebuild
+++ b/media-tv/mythtv/mythtv-33.1.ebuild
@@ -117,6 +117,7 @@ RDEPEND="
DEPEND="
${RDEPEND}
dev-lang/yasm
+ sys-kernel/linux-headers
x11-base/xorg-proto
perl? (
dev-perl/DBD-mysql
@@ -147,6 +148,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-33.1-libva.patch
"${FILESDIR}"/${PN}-33.1-ffmpeg-binutils-2.41.patch
+ "${FILESDIR}"/${PN}-33.1-linux-headers-6.5.patch
)
python_check_deps() {