commit: 77370323e75c401328a7c747cd0f716a6523fcd6 Author: Z. Liu <zhixu.liu <AT> gmail <DOT> com> AuthorDate: Wed Jul 23 13:10:07 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Jul 23 14:01:06 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77370323
media-tv/mythtv: fix build issue with Qt6.9 Closes: https://bugs.gentoo.org/960489 Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/43121 Closes: https://github.com/gentoo/gentoo/pull/43121 Signed-off-by: Sam James <sam <AT> gentoo.org> ...-35.Fix-Qt6-compilation-on-Fedora-rawhide.patch | 108 +++++++++++++++++++++ ...date-visibility-of-MHCreateEngine-MHSetLo.patch | 46 +++++++++ media-tv/mythtv/mythtv-35.0-r1.ebuild | 2 + 3 files changed, 156 insertions(+) diff --git a/media-tv/mythtv/files/mythtv-35.Fix-Qt6-compilation-on-Fedora-rawhide.patch b/media-tv/mythtv/files/mythtv-35.Fix-Qt6-compilation-on-Fedora-rawhide.patch new file mode 100644 index 000000000000..f7947fc6bac9 --- /dev/null +++ b/media-tv/mythtv/files/mythtv-35.Fix-Qt6-compilation-on-Fedora-rawhide.patch @@ -0,0 +1,108 @@ +From 80ebec6e2760f5d2a5faccdf3904cb35514cb318 Mon Sep 17 00:00:00 2001 +From: David Hampton <[email protected]> +Date: Tue, 1 Apr 2025 09:08:30 -0400 +Subject: [PATCH] Fix Qt6 compilation on Fedora rawhide. + +The latest version of Qt6 has removed some overrides for QString::arg +and Qchar::Qchar causing compilation to break. Change the existing +casts on these function calls to use a different override that still +exists. + +diff --git a/libs/libmythtv/channelutil.cpp b/libs/libmythtv/channelutil.cpp +index ad3184c7e7..a07c942fa9 100644 +--- a/libs/libmythtv/channelutil.cpp ++++ b/libs/libmythtv/channelutil.cpp +@@ -62,7 +62,7 @@ static uint get_dtv_multiplex(uint db_source_id, const QString& sistandard, + { + query.bindValue(":TRANSPORTID", transport_id); + query.bindValue(":NETWORKID", network_id); +- query.bindValue(":POLARITY", QChar(polarity)); ++ query.bindValue(":POLARITY", static_cast<uint>(polarity)); + } + + if (!query.exec() || !query.isActive()) +@@ -102,7 +102,7 @@ static uint insert_dtv_multiplex( + QString("dbid:%1 std:'%2' ").arg(db_source_id).arg(sistandard) + + QString("freq:%1 mod:%2 ").arg(frequency).arg(modulation) + + QString("tid:%1 nid:%2 ").arg(transport_id).arg(network_id) + +- QString("pol:%1 msys:%2 ...)").arg(QChar(polarity)).arg(mod_sys) + ++ QString("pol:%1 msys:%2 ...)").arg(static_cast<uint>(polarity)).arg(mod_sys) + + QString("mplexid:%1").arg(mplex)); + + bool isDVB = (sistandard.toLower() == "dvb"); +@@ -208,7 +208,7 @@ static uint insert_dtv_multiplex( + { + query.bindValue(":TRANSPORTID", transport_id); + query.bindValue(":NETWORKID", network_id); +- query.bindValue(":WHEREPOLARITY", QChar(polarity)); ++ query.bindValue(":WHEREPOLARITY", static_cast<uint>(polarity)); + } + else + { +diff --git a/libs/libmythtv/mheg/dsmcccache.cpp b/libs/libmythtv/mheg/dsmcccache.cpp +index 9bda76811d..2113d758ef 100644 +--- a/libs/libmythtv/mheg/dsmcccache.cpp ++++ b/libs/libmythtv/mheg/dsmcccache.cpp +@@ -54,7 +54,7 @@ QString DSMCCCacheKey::toString() const + { + QString result; + for (int i = 0; i < 4 && i < size(); i++) +- result += QString("%1").arg(at(i), 2, 16, QChar('0')); ++ result += QString("%1").arg(static_cast<uint>(at(i)), 2, 16, QChar('0')); + return result; + } + +diff --git a/libs/libmythtv/mheg/mhi.cpp b/libs/libmythtv/mheg/mhi.cpp +index a6771bd0e5..0ba13d1889 100644 +--- a/libs/libmythtv/mheg/mhi.cpp ++++ b/libs/libmythtv/mheg/mhi.cpp +@@ -1299,7 +1299,7 @@ QRect MHIText::GetBounds(const QString &str, int &strLen, int maxSize) + if (glyphIndex == 0) + { + LOG(VB_MHEG, LOG_INFO, QString("[mhi] Unknown glyph 0x%1") +- .arg(ch.unicode(),0,16)); ++ .arg(static_cast<short>(ch.unicode()),0,16)); + previous = 0; + continue; + } +diff --git a/libs/libmythtv/mpeg/mpegdescriptors.cpp b/libs/libmythtv/mpeg/mpegdescriptors.cpp +index 752c0bcaf2..5585787698 100644 +--- a/libs/libmythtv/mpeg/mpegdescriptors.cpp ++++ b/libs/libmythtv/mpeg/mpegdescriptors.cpp +@@ -839,7 +839,7 @@ void RegistrationDescriptor::InitializeDescriptionMap(void) + + for (uint i = 0; i <= 99; i++) + { +- description_map[QString("US%1").arg(i, 2, QLatin1Char('0'))] = ++ description_map[QString("US%1").arg(i, 2, 16, QLatin1Char('0'))] = + "NIMA, Unspecified military application"; + } + +diff --git a/libs/libmythtv/recorders/hlsstreamhandler.cpp b/libs/libmythtv/recorders/hlsstreamhandler.cpp +index 2d85b6b19b..0f25f80457 100644 +--- a/libs/libmythtv/recorders/hlsstreamhandler.cpp ++++ b/libs/libmythtv/recorders/hlsstreamhandler.cpp +@@ -181,7 +181,7 @@ void HLSStreamHandler::run(void) + { + LOG(VB_RECORD, LOG_INFO, LOC + + QString("Packet not starting with SYNC Byte (got 0x%1)") +- .arg((char)m_readbuffer[0], 2, 16, QLatin1Char('0'))); ++ .arg(static_cast<uint>(m_readbuffer[0]), 2, 16, QLatin1Char('0'))); + continue; + } + +diff --git a/programs/mythbackend/recordingextender.h b/programs/mythbackend/recordingextender.h +index 77fd649fbf..aa18e8281d 100644 +--- a/programs/mythbackend/recordingextender.h ++++ b/programs/mythbackend/recordingextender.h +@@ -28,6 +28,7 @@ + + #include <QMutex> + #include <QJsonDocument> ++#include <QUrl> + + #include "libmythbase/mthread.h" + #include "libmythtv/recordingrule.h" +-- +2.45.2 + diff --git a/media-tv/mythtv/files/mythtv-35.freemheg-update-visibility-of-MHCreateEngine-MHSetLo.patch b/media-tv/mythtv/files/mythtv-35.freemheg-update-visibility-of-MHCreateEngine-MHSetLo.patch new file mode 100644 index 000000000000..d98e5704d4ae --- /dev/null +++ b/media-tv/mythtv/files/mythtv-35.freemheg-update-visibility-of-MHCreateEngine-MHSetLo.patch @@ -0,0 +1,46 @@ +https://github.com/MythTV/mythtv/pull/1153 + +From c6dad722f966b71ac8dbcea34c45401f12518a14 Mon Sep 17 00:00:00 2001 +From: "Z. Liu" <[email protected]> +Date: Tue, 22 Jul 2025 23:22:23 +0800 +Subject: [PATCH] freemheg: update visibility of MHCreateEngine & MHSetLogging + +-lmythfreemheg-35 is used when build libmythtv.35.so, so the visibility +of MHCreateEngine & MHSetLogging should be different depends on "-DMTV_API", +otherwise build is failed with: + +> /usr/bin/x86_64-pc-linux-gnu-ld.bfd: obj/mhi.o: in function MHIContext:: MHIContext(InteractiveTV*)': +> /var/tmp/portage/media-tv/mythtv-35.0-r1/work/mythtv-35.0/mythtv/libs/libmythtv/mheg/mhi.cpp: 80:(.text+0xec): undefined reference to MHCreateEngine(MHContext*)' +> /usr/bin/x86_64-pc-linux-gnu-ld.bfd: obj/interactivetv.o: in function InteractiveTV::InteractiveTV(MythPlayerCaptionsUI*)': +> /var/tmp/portage/media-tv/mythtv-35.0-r1/work/mythtv-35.0/mythtv/libs/libmythtv/mheg/interactivetv.cpp: (.text+0x17b): undefined reference to MHSetLogging(_IO_FILE*, unsigned int)' +> /usr/bin/x86_64-pc-linux-gnu-ld.bfd: libmythtv-35.so.35.0.0: protected symbol _Z12MHSetLoggingP8_IO_FILEj' isn't defined +> /usr/bin/x86_64-pc-linux-gnu-ld.bfd: final link failed: bad value + +Signed-off-by: Z. Liu <[email protected]> + +diff --git a/libs/libmythfreemheg/freemheg.h b/libs/libmythfreemheg/freemheg.h +index 16bc85eb0b..1565c2d8b9 100644 +--- a/libs/libmythfreemheg/freemheg.h ++++ b/libs/libmythfreemheg/freemheg.h +@@ -45,10 +45,16 @@ class MHContext; + class MHEG; + class MHStream; + ++#ifdef MTV_API ++# define MHEG_PUBLIC Q_DECL_IMPORT ++#else ++# define MHEG_PUBLIC Q_DECL_EXPORT ++#endif ++ + // Called to create a new instance of the module. +-extern Q_DECL_EXPORT MHEG *MHCreateEngine(MHContext *context); ++extern MHEG_PUBLIC MHEG *MHCreateEngine(MHContext *context); + // Set the logging stream and options. +-extern Q_DECL_EXPORT void MHSetLogging(FILE *logStream, unsigned int logLevel); ++extern MHEG_PUBLIC void MHSetLogging(FILE *logStream, unsigned int logLevel); + + // This abstract class is implemented by the MHEG Engine. + class MHEG +-- +2.45.2 + diff --git a/media-tv/mythtv/mythtv-35.0-r1.ebuild b/media-tv/mythtv/mythtv-35.0-r1.ebuild index 0250a85abf87..8a4d3200e31c 100644 --- a/media-tv/mythtv/mythtv-35.0-r1.ebuild +++ b/media-tv/mythtv/mythtv-35.0-r1.ebuild @@ -137,6 +137,8 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-33.1-libva.patch "${FILESDIR}"/${PN}-35.no-ant-java-required-if-use-system-libblur.patch + "${FILESDIR}"/${PN}-35.Fix-Qt6-compilation-on-Fedora-rawhide.patch + "${FILESDIR}"/${PN}-35.freemheg-update-visibility-of-MHCreateEngine-MHSetLo.patch ) python_check_deps() {
