Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 920878 Details for
Bug 951440
net-im/spectrum2-2.2.1: fails to find net-im/libcommuni-3.7.0-r2 during configure
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
build with qt6 and qt5compat
spectrum2-2.2.1-qt6.patch (text/plain), 4.91 KB, created by
Bill Prendergast
on 2025-03-15 22:00:40 UTC
(
hide
)
Description:
build with qt6 and qt5compat
Filename:
MIME Type:
Creator:
Bill Prendergast
Created:
2025-03-15 22:00:40 UTC
Size:
4.91 KB
patch
obsolete
>--- a/CMakeLists.txt >+++ b/CMakeLists.txt >@@ -36,6 +36,7 @@ option(ENABLE_PQXX "Build with Postgres supoort" ON) > > option(ENABLE_FROTZ "Build Frotz plugin" ON) > option(ENABLE_IRC "Build IRC plugin" ON) >+option(ENABLE_QT6 "Build IRC plugin with QT6 libraries" ON) > option(ENABLE_PURPLE "Build Libpurple plugin" ON) > option(ENABLE_SMSTOOLS3 "Build SMSTools3 plugin" ON) > option(ENABLE_XMPP "Build XMPP plugin" ON) >@@ -192,7 +193,11 @@ add_definitions(-DSUPPORT_LEGACY_CAPS) > > if(ENABLE_IRC) > find_package(Communi) >- find_package(Qt5 COMPONENTS Core Network) >+ if(ENABLE_QT6) >+ find_package(Qt6 COMPONENTS Core Core5Compat Network) >+ else() >+ find_package(Qt5 COMPONENTS Core Network) >+ endif() > endif() > > find_package(event) >@@ -310,6 +315,9 @@ if(PROTOBUF_FOUND) > > if(IRC_FOUND) > add_definitions(-DIRC_SHARED) >+ if(ENABLE_QT6) >+ add_definitions(-DWITH_QT6) >+ endif() > message("IRC plugin : yes") > include_directories(${QT_QTNETWORK_INCLUDE_DIR}) > include_directories(${IRC_INCLUDE_DIR}) >--- a/backends/libcommuni/CMakeLists.txt >+++ b/backends/libcommuni/CMakeLists.txt >@@ -3,6 +3,9 @@ file(GLOB HEADERS *.h) > > if(ENABLE_QT4) > QT4_WRAP_CPP(SRC ${HEADERS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED) >+elseif(ENABLE_QT6) >+ QT6_WRAP_CPP(SRC ${HEADERS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED) >+ include_directories(${Qt6Core_INCLUDE_DIRS} ${Qt6Core5Compat_INCLUDE_DIRS} ${Qt6Network_INCLUDE_DIRS}) > else() > QT5_WRAP_CPP(SRC ${HEADERS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED) > include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS}) >@@ -14,12 +17,16 @@ add_executable(spectrum2_libcommuni_backend ${SRC}) > if(NOT WIN32) > if(ENABLE_QT4) > target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt4::QtNetwork Qt4::QtCore transport pthread) >+ elseif(ENABLE_QT6) >+ target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt6::Network Qt6::Core5Compat Qt6::Core transport pthread) > else() > target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt5::Network Qt5::Core transport pthread) > endif() > else() > if(ENABLE_QT4) > target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt4::QtNetwork Qt4::QtCore transport) >+ elseif(ENABLE_QT6) >+ target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt6::Network Qt6::Core5Compat Qt6::Core transport) > else() > target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt5::Network Qt5::Core transport) > endif() >--- a/backends/libcommuni/backports.h >+++ b/backends/libcommuni/backports.h >@@ -1,4 +1,7 @@ > #include <QtCore> >+#ifdef WITH_QT6 >+#include <QtCore5Compat> >+#endif > #include <iostream> > #include <IrcCommand> > #include <IrcMessage> >--- a/backends/libcommuni/ircnetworkplugin.h >+++ b/backends/libcommuni/ircnetworkplugin.h >@@ -23,6 +23,9 @@ > #ifndef Q_MOC_RUN > #include "session.h" > #include <QtCore> >+#ifdef WITH_QT6 >+#include <QtCore5Compat> >+#endif > #include <QtNetwork> > #include "transport/Config.h" > #include "transport/NetworkPlugin.h" >--- a/backends/libcommuni/main.cpp >+++ b/backends/libcommuni/main.cpp >@@ -18,6 +18,9 @@ > * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA > */ > #include <QtCore> >+#ifdef WITH_QT6 >+#include <QtCore5Compat> >+#endif > #include <QtNetwork> > #include "transport/Config.h" > #include "transport/NetworkPlugin.h" >--- a/backends/libcommuni/session.cpp >+++ b/backends/libcommuni/session.cpp >@@ -20,6 +20,9 @@ > > #include "session.h" > #include <QtCore> >+#ifdef WITH_QT6 >+#include <QtCore5Compat> >+#endif > #include <iostream> > #include <IrcCommand> > #include <IrcMessage> >@@ -412,7 +415,11 @@ void MyIrcSession::sendMessageToFrontend(const std::string &channel, const std:: > void MyIrcSession::on_messageReceived(IrcMessage *message) { > IrcPrivateMessage *m = (IrcPrivateMessage *) message; > if (m->isRequest()) { >+#ifdef WITH_QT6 >+ QString request = m->content().split(" ", Qt::SkipEmptyParts).value(0).toUpper(); >+#else > QString request = m->content().split(" ", QString::SkipEmptyParts).value(0).toUpper(); >+#endif > if (request == "PING" || request == "TIME" || request == "VERSION") { > LOG4CXX_INFO(connectionLogger, m_user << ": " << TO_UTF8(request) << " received and has been answered"); > return; >--- a/cmake_modules/FindCommuni.cmake >+++ b/cmake_modules/FindCommuni.cmake >@@ -1,6 +1,8 @@ > if( ENABLE_QT4 ) > find_package(Qt4) > include( ${QT_USE_FILE} ) >+elseif(ENABLE_QT6) >+ find_package(Qt6Network) > else() > find_package(Qt5Network) > endif() >@@ -8,6 +10,8 @@ endif() > FIND_LIBRARY(IRC_LIBRARY NAMES IrcCore PATHS ${QT_LIBRARY_DIR}) > if( ENABLE_QT4 ) > FIND_PATH(IRC_INCLUDE_DIR NAMES "IrcCore/ircglobal.h" PATHS ${QT_INCLUDE_DIR} PATH_SUFFIXES Communi) >+elseif(ENABLE_QT6) >+ FIND_PATH(IRC_INCLUDE_DIR NAMES "IrcCore/ircglobal.h" PATHS ${Qt6Core_INCLUDE_DIRS} ${Qt6Core_INCLUDE_DIRS}"/.." PATH_SUFFIXES Communi) > else() > FIND_PATH(IRC_INCLUDE_DIR NAMES "IrcCore/ircglobal.h" PATHS ${Qt5Core_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS}"/.." PATH_SUFFIXES Communi) > endif()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 951440
: 920878