Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 951440
Collapse All | Expand All

(-)file_not_specified_in_diff (-8 / +43 lines)
Line  Link Here
0
-- a/CMakeLists.txt
0
++ b/CMakeLists.txt
Lines 36-41 option(ENABLE_PQXX "Build with Postgres supoort" ON) Link Here
36
36
37
option(ENABLE_FROTZ "Build Frotz plugin" ON)
37
option(ENABLE_FROTZ "Build Frotz plugin" ON)
38
option(ENABLE_IRC "Build IRC plugin" ON)
38
option(ENABLE_IRC "Build IRC plugin" ON)
39
option(ENABLE_QT6 "Build IRC plugin with QT6 libraries" ON)
39
option(ENABLE_PURPLE "Build Libpurple plugin" ON)
40
option(ENABLE_PURPLE "Build Libpurple plugin" ON)
40
option(ENABLE_SMSTOOLS3 "Build SMSTools3 plugin" ON)
41
option(ENABLE_SMSTOOLS3 "Build SMSTools3 plugin" ON)
41
option(ENABLE_XMPP "Build XMPP plugin" ON)
42
option(ENABLE_XMPP "Build XMPP plugin" ON)
Lines 192-198 add_definitions(-DSUPPORT_LEGACY_CAPS) Link Here
192
193
193
if(ENABLE_IRC)
194
if(ENABLE_IRC)
194
	find_package(Communi)
195
	find_package(Communi)
195
	find_package(Qt5 COMPONENTS Core Network)
196
	if(ENABLE_QT6)
197
		find_package(Qt6 COMPONENTS Core Core5Compat Network)
198
	else()
199
		find_package(Qt5 COMPONENTS Core Network)
200
	endif()
196
endif()
201
endif()
197
202
198
find_package(event)
203
find_package(event)
Lines 310-315 if(PROTOBUF_FOUND) Link Here
310
315
311
	if(IRC_FOUND)
316
	if(IRC_FOUND)
312
		add_definitions(-DIRC_SHARED)
317
		add_definitions(-DIRC_SHARED)
318
		if(ENABLE_QT6)
319
			add_definitions(-DWITH_QT6)
320
		endif()
313
		message("IRC plugin        : yes")
321
		message("IRC plugin        : yes")
314
		include_directories(${QT_QTNETWORK_INCLUDE_DIR})
322
		include_directories(${QT_QTNETWORK_INCLUDE_DIR})
315
		include_directories(${IRC_INCLUDE_DIR})
323
		include_directories(${IRC_INCLUDE_DIR})
316
-- a/backends/libcommuni/CMakeLists.txt
324
++ b/backends/libcommuni/CMakeLists.txt
Lines 3-8 file(GLOB HEADERS *.h) Link Here
3
3
4
if(ENABLE_QT4)
4
if(ENABLE_QT4)
5
	QT4_WRAP_CPP(SRC ${HEADERS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
5
	QT4_WRAP_CPP(SRC ${HEADERS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
6
elseif(ENABLE_QT6)
7
	QT6_WRAP_CPP(SRC ${HEADERS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
8
	include_directories(${Qt6Core_INCLUDE_DIRS} ${Qt6Core5Compat_INCLUDE_DIRS} ${Qt6Network_INCLUDE_DIRS})
6
else()
9
else()
7
	QT5_WRAP_CPP(SRC ${HEADERS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
10
	QT5_WRAP_CPP(SRC ${HEADERS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
8
	include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS})
11
	include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS})
Lines 14-25 add_executable(spectrum2_libcommuni_backend ${SRC}) Link Here
14
if(NOT WIN32)
17
if(NOT WIN32)
15
	if(ENABLE_QT4)
18
	if(ENABLE_QT4)
16
		target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt4::QtNetwork Qt4::QtCore transport pthread)
19
		target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt4::QtNetwork Qt4::QtCore transport pthread)
20
	elseif(ENABLE_QT6)
21
		target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt6::Network Qt6::Core5Compat Qt6::Core transport pthread)
17
	else()
22
	else()
18
		target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt5::Network Qt5::Core transport pthread)
23
		target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt5::Network Qt5::Core transport pthread)
19
	endif()
24
	endif()
20
else()
25
else()
21
	if(ENABLE_QT4)
26
	if(ENABLE_QT4)
22
		target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt4::QtNetwork Qt4::QtCore transport)
27
		target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt4::QtNetwork Qt4::QtCore transport)
28
	elseif(ENABLE_QT6)
29
		target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt6::Network Qt6::Core5Compat Qt6::Core transport)
23
	else()
30
	else()
24
		target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt5::Network Qt5::Core transport)
31
		target_link_libraries(spectrum2_libcommuni_backend ${IRC_LIBRARY} Qt5::Network Qt5::Core transport)
25
	endif()
32
	endif()
26
-- a/backends/libcommuni/backports.h
33
++ b/backends/libcommuni/backports.h
Lines 1-4 Link Here
1
#include <QtCore>
1
#include <QtCore>
2
#ifdef WITH_QT6
3
#include <QtCore5Compat>
4
#endif
2
#include <iostream>
5
#include <iostream>
3
#include <IrcCommand>
6
#include <IrcCommand>
4
#include <IrcMessage>
7
#include <IrcMessage>
5
-- a/backends/libcommuni/ircnetworkplugin.h
8
++ b/backends/libcommuni/ircnetworkplugin.h
Lines 23-28 Link Here
23
#ifndef Q_MOC_RUN
23
#ifndef Q_MOC_RUN
24
#include "session.h"
24
#include "session.h"
25
#include <QtCore>
25
#include <QtCore>
26
#ifdef WITH_QT6
27
#include <QtCore5Compat>
28
#endif
26
#include <QtNetwork>
29
#include <QtNetwork>
27
#include "transport/Config.h"
30
#include "transport/Config.h"
28
#include "transport/NetworkPlugin.h"
31
#include "transport/NetworkPlugin.h"
29
-- a/backends/libcommuni/main.cpp
32
++ b/backends/libcommuni/main.cpp
Lines 18-23 Link Here
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
19
 */
19
 */
20
#include <QtCore>
20
#include <QtCore>
21
#ifdef WITH_QT6
22
#include <QtCore5Compat>
23
#endif
21
#include <QtNetwork>
24
#include <QtNetwork>
22
#include "transport/Config.h"
25
#include "transport/Config.h"
23
#include "transport/NetworkPlugin.h"
26
#include "transport/NetworkPlugin.h"
24
-- a/backends/libcommuni/session.cpp
27
++ b/backends/libcommuni/session.cpp
Lines 20-25 Link Here
20
20
21
#include "session.h"
21
#include "session.h"
22
#include <QtCore>
22
#include <QtCore>
23
#ifdef WITH_QT6
24
#include <QtCore5Compat>
25
#endif
23
#include <iostream>
26
#include <iostream>
24
#include <IrcCommand>
27
#include <IrcCommand>
25
#include <IrcMessage>
28
#include <IrcMessage>
Lines 412-418 void MyIrcSession::sendMessageToFrontend(const std::string &channel, const std:: Link Here
412
void MyIrcSession::on_messageReceived(IrcMessage *message) {
415
void MyIrcSession::on_messageReceived(IrcMessage *message) {
413
	IrcPrivateMessage *m = (IrcPrivateMessage *) message;
416
	IrcPrivateMessage *m = (IrcPrivateMessage *) message;
414
	if (m->isRequest()) {
417
	if (m->isRequest()) {
418
#ifdef WITH_QT6
419
		QString request = m->content().split(" ", Qt::SkipEmptyParts).value(0).toUpper();
420
#else
415
		QString request = m->content().split(" ", QString::SkipEmptyParts).value(0).toUpper();
421
		QString request = m->content().split(" ", QString::SkipEmptyParts).value(0).toUpper();
422
#endif
416
		if (request == "PING" || request == "TIME" || request == "VERSION") {
423
		if (request == "PING" || request == "TIME" || request == "VERSION") {
417
			LOG4CXX_INFO(connectionLogger, m_user << ": " << TO_UTF8(request) << " received and has been answered");
424
			LOG4CXX_INFO(connectionLogger, m_user << ": " << TO_UTF8(request) << " received and has been answered");
418
			return;
425
			return;
419
-- a/cmake_modules/FindCommuni.cmake
426
++ b/cmake_modules/FindCommuni.cmake
Lines 1-6 Link Here
1
if( ENABLE_QT4 )
1
if( ENABLE_QT4 )
2
	find_package(Qt4)
2
	find_package(Qt4)
3
	include( ${QT_USE_FILE} )
3
	include( ${QT_USE_FILE} )
4
elseif(ENABLE_QT6)
5
	find_package(Qt6Network)
4
else()
6
else()
5
	find_package(Qt5Network)
7
	find_package(Qt5Network)
6
endif()
8
endif()
Lines 8-13 endif() Link Here
8
FIND_LIBRARY(IRC_LIBRARY NAMES IrcCore PATHS ${QT_LIBRARY_DIR})
10
FIND_LIBRARY(IRC_LIBRARY NAMES IrcCore PATHS ${QT_LIBRARY_DIR})
9
if( ENABLE_QT4 )
11
if( ENABLE_QT4 )
10
	FIND_PATH(IRC_INCLUDE_DIR NAMES "IrcCore/ircglobal.h" PATHS ${QT_INCLUDE_DIR} PATH_SUFFIXES Communi)
12
	FIND_PATH(IRC_INCLUDE_DIR NAMES "IrcCore/ircglobal.h" PATHS ${QT_INCLUDE_DIR} PATH_SUFFIXES Communi)
13
elseif(ENABLE_QT6)
14
	FIND_PATH(IRC_INCLUDE_DIR NAMES "IrcCore/ircglobal.h" PATHS ${Qt6Core_INCLUDE_DIRS} ${Qt6Core_INCLUDE_DIRS}"/.." PATH_SUFFIXES Communi)
11
else()
15
else()
12
	FIND_PATH(IRC_INCLUDE_DIR NAMES "IrcCore/ircglobal.h" PATHS ${Qt5Core_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS}"/.." PATH_SUFFIXES Communi)
16
	FIND_PATH(IRC_INCLUDE_DIR NAMES "IrcCore/ircglobal.h" PATHS ${Qt5Core_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS}"/.." PATH_SUFFIXES Communi)
13
endif()
17
endif()

Return to bug 951440