commit:     5e45471770431d276c6799d32332b9e44b7e41ec
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  7 23:21:36 2026 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sat Feb  7 23:23:01 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e454717

net-im/spectrum2: fix boost and libcommuni build

Closes: https://bugs.gentoo.org/958931
Closes: https://bugs.gentoo.org/951440
Closes: https://bugs.gentoo.org/937308
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../files/spectrum2-2.2.1-boost-1.87.patch         | 45 +++++++++++++++++
 .../files/spectrum2-2.2.1-boost-1.89.patch         | 11 ++++
 net-im/spectrum2/files/spectrum2-2.2.1-cmake.patch | 10 ++++
 .../files/spectrum2-2.2.1-libcommuni-qt6.patch     | 59 ++++++++++++++++++++++
 net-im/spectrum2/spectrum2-2.2.1-r1.ebuild         |  6 ++-
 5 files changed, 130 insertions(+), 1 deletion(-)

diff --git a/net-im/spectrum2/files/spectrum2-2.2.1-boost-1.87.patch 
b/net-im/spectrum2/files/spectrum2-2.2.1-boost-1.87.patch
new file mode 100644
index 000000000000..f3ae35ecbb6d
--- /dev/null
+++ b/net-im/spectrum2/files/spectrum2-2.2.1-boost-1.87.patch
@@ -0,0 +1,45 @@
+see: https://bugs.gentoo.org/946571
+
+From: Bill Prendergast <[email protected]>
+
+Fix build with >=dev-libs/boost-1.87
+ required for for net-im/swift boost-1.87 patch
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -109,6 +109,7 @@ if(${Boost_VERSION} GREATER 104999)
+       add_definitions(-DBOOST_FILESYSTEM_VERSION=3)
+ endif()
+ add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
++add_definitions(-DBOOST_VERSION=${Boost_VERSION})
+ 
+ # FIND POPT
+ if(NOT WIN32)
+--- a/include/Swiften/Network/DummyConnectionServer.h
++++ b/include/Swiften/Network/DummyConnectionServer.h
+@@ -6,7 +6,11 @@
+ 
+ #pragma once
+ 
++#if BOOST_VERSION < 108600
+ #include <boost/asio/io_service.hpp>
++#else
++#include <boost/asio/io_context.hpp>
++#endif
+ #include <boost/asio/ip/tcp.hpp>
+ #include <boost/enable_shared_from_this.hpp>
+ #include <boost/signals2.hpp>
+--- a/include/Swiften/Network/DummyConnectionServerFactory.h
++++ b/include/Swiften/Network/DummyConnectionServerFactory.h
+@@ -6,7 +6,11 @@
+ 
+ #pragma once
+ 
++#if BOOST_VERSION < 108600
+ #include <boost/asio/io_service.hpp>
++#else
++#include <boost/asio/io_context.hpp>
++#endif
+ 
+ #include <Swiften/Network/ConnectionServerFactory.h>
+ #include <Swiften/Network/DummyConnectionServer.h>

diff --git a/net-im/spectrum2/files/spectrum2-2.2.1-boost-1.89.patch 
b/net-im/spectrum2/files/spectrum2-2.2.1-boost-1.89.patch
new file mode 100644
index 000000000000..956df2bb0d11
--- /dev/null
+++ b/net-im/spectrum2/files/spectrum2-2.2.1-boost-1.89.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -100,7 +100,7 @@
+ endif(WIN32)
+ 
+ set(Boost_FIND_QUIETLY ON)
+-find_package(Boost COMPONENTS program_options date_time system filesystem 
regex thread locale REQUIRED)
++find_package(Boost COMPONENTS program_options date_time filesystem regex 
thread locale REQUIRED)
+ 
+ message( STATUS "Found Boost: ${Boost_VERSION}, ${Boost_LIBRARIES}, 
${Boost_INCLUDE_DIR}")
+ 

diff --git a/net-im/spectrum2/files/spectrum2-2.2.1-cmake.patch 
b/net-im/spectrum2/files/spectrum2-2.2.1-cmake.patch
new file mode 100644
index 000000000000..7ab2a15658a2
--- /dev/null
+++ b/net-im/spectrum2/files/spectrum2-2.2.1-cmake.patch
@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,6 +1,4 @@
+-cmake_minimum_required(VERSION 3.7)
+-# Use test target on CMake 3.11+
+-cmake_policy(SET CMP0037 OLD)
++cmake_minimum_required(VERSION 3.10)
+ 
+ project(libtransport)
+ 

diff --git a/net-im/spectrum2/files/spectrum2-2.2.1-libcommuni-qt6.patch 
b/net-im/spectrum2/files/spectrum2-2.2.1-libcommuni-qt6.patch
new file mode 100644
index 000000000000..6211c695ebd9
--- /dev/null
+++ b/net-im/spectrum2/files/spectrum2-2.2.1-libcommuni-qt6.patch
@@ -0,0 +1,59 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -192,7 +192,7 @@
+ 
+ if(ENABLE_IRC)
+       find_package(Communi)
+-      find_package(Qt5 COMPONENTS Core Network)
++      find_package(Qt6 COMPONENTS Core Network REQUIRED)
+ endif()
+ 
+ find_package(event)
+--- a/backends/libcommuni/CMakeLists.txt
++++ b/backends/libcommuni/CMakeLists.txt
+@@ -4,8 +4,8 @@
+ if(ENABLE_QT4)
+       QT4_WRAP_CPP(SRC ${HEADERS} OPTIONS 
-DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
+ else()
+-      QT5_WRAP_CPP(SRC ${HEADERS} OPTIONS 
-DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
+-      include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS})
++      qt6_wrap_cpp(SRC ${HEADERS} OPTIONS 
-DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
++      include_directories(${Qt6Core_INCLUDE_DIRS} ${Qt6Network_INCLUDE_DIRS})
+ endif()
+ 
+ add_definitions(-DQT_NO_KEYWORDS)
+@@ -15,13 +15,13 @@
+       if(ENABLE_QT4)
+               target_link_libraries(spectrum2_libcommuni_backend 
${IRC_LIBRARY} Qt4::QtNetwork Qt4::QtCore transport pthread)
+       else()
+-              target_link_libraries(spectrum2_libcommuni_backend 
${IRC_LIBRARY} Qt5::Network Qt5::Core transport pthread)
++              target_link_libraries(spectrum2_libcommuni_backend 
${IRC_LIBRARY} Qt6::Network Qt6::Core transport pthread)
+       endif()
+ else()
+       if(ENABLE_QT4)
+               target_link_libraries(spectrum2_libcommuni_backend 
${IRC_LIBRARY} Qt4::QtNetwork Qt4::QtCore transport)
+       else()
+-              target_link_libraries(spectrum2_libcommuni_backend 
${IRC_LIBRARY} Qt5::Network Qt5::Core transport)
++              target_link_libraries(spectrum2_libcommuni_backend 
${IRC_LIBRARY} Qt6::Network Qt6::Core transport)
+       endif()
+ endif()
+ 
+--- a/cmake_modules/FindCommuni.cmake
++++ b/cmake_modules/FindCommuni.cmake
+@@ -2,14 +2,14 @@
+       find_package(Qt4)
+       include( ${QT_USE_FILE} )
+ else()
+-      find_package(Qt5Network)
++      find_package(Qt6 COMPONENTS Network REQUIRED)
+ 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)
+ else()
+-      FIND_PATH(IRC_INCLUDE_DIR NAMES "IrcCore/ircglobal.h" PATHS 
${Qt5Core_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS}"/.." PATH_SUFFIXES Communi)
++      FIND_PATH(IRC_INCLUDE_DIR NAMES "IrcCore/ircglobal.h" PATHS 
${Qt6Core_INCLUDE_DIRS} ${Qt6Core_INCLUDE_DIRS}"/.." PATH_SUFFIXES Communi)
+ endif()
+ 
+ # message( STATUS ${IRC_LIBRARY})

diff --git a/net-im/spectrum2/spectrum2-2.2.1-r1.ebuild 
b/net-im/spectrum2/spectrum2-2.2.1-r1.ebuild
index c3699b5ddc6d..aec799d60ab9 100644
--- a/net-im/spectrum2/spectrum2-2.2.1-r1.ebuild
+++ b/net-im/spectrum2/spectrum2-2.2.1-r1.ebuild
@@ -11,7 +11,7 @@ 
SRC_URI="https://github.com/SpectrumIM/spectrum2/archive/${PV}.tar.gz -> ${P}.ta
 
 LICENSE="GPL-2+"
 SLOT="0"
-KEYWORDS="amd64"
+KEYWORDS="~amd64"
 IUSE="doc frotz irc mysql postgres purple sms +sqlite test twitter xmpp"
 REQUIRED_USE="
        || ( mysql postgres sqlite )
@@ -59,8 +59,12 @@ DEPEND="
 
 PATCHES=(
        "${FILESDIR}"/${PN}-2.2.1-boost-1.85.patch
+       "${FILESDIR}"/${PN}-2.2.1-boost-1.87.patch
+       "${FILESDIR}"/${PN}-2.2.1-boost-1.89.patch
        "${FILESDIR}"/${PN}-2.2.1-use-c++17.patch
+       "${FILESDIR}"/${PN}-2.2.1-cmake.patch
        "${FILESDIR}"/${PN}-2.2.1-cmake-ld-typo.patch
+       "${FILESDIR}"/${PN}-2.2.1-libcommuni-qt6.patch
 )
 
 src_prepare() {

Reply via email to