Browse Source

Fix build of polish/kadu

The update of qxmpp to the latest upstream release made qxmpp
require C++17, for std::optional. Kadu is forcing C++14, which
breaks in the build like this:
    In file included from plugins/jabber_protocol/services/jabber-room-chat-service.cpp:35:
    /usr/local/include/qxmpp/QXmppMessage.h:250:10: error: no template named 'optional' in namespace 'std'
        std::optional<QXmppMixInvitation> mixInvitation() const;

Bump the C++ requirement and patch the CMake bits that DTWT.
main
Adriaan de Groot 4 months ago
parent
commit
a002157339
  1. 4
      polish/kadu/Makefile
  2. 23
      polish/kadu/files/patch-CMakeLists.txt
  3. 12
      polish/kadu/files/patch-cmake_KaduMacros.cmake

4
polish/kadu/Makefile

@ -2,7 +2,7 @@
PORTNAME= kadu
PORTVERSION= 4.3
PORTREVISION= 22
PORTREVISION= 23
PORTEPOCH= 1
CATEGORIES= polish net-im
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}/:kadu \
@ -34,7 +34,7 @@ LIB_DEPENDS= libmpdclient.so:audio/libmpdclient \
GG6_EMOTS_DISTFILE= kompatybilne_z_GG6.tar.gz
GG7_EMOTS_DISTFILE= dodatkowe_emoty_GG7.tar.gz
USES= cmake:insource compiler:c++11-lib gettext-runtime gnome \
USES= cmake:insource compiler:c++17-lang gettext-runtime gnome \
libarchive pkgconfig qca qt:5 readline tar:bzip2 xorg
USE_XORG= x11 xext xfixes xscrnsaver
USE_GNOME= glib20

23
polish/kadu/files/patch-CMakeLists.txt

@ -0,0 +1,23 @@
--- CMakeLists.txt.orig 2017-01-24 21:36:21 UTC
+++ CMakeLists.txt
@@ -25,7 +25,11 @@ if (NOT DEFINED CMAKE_CONFIGURATION_TYPES AND NOT CMAK
set (CMAKE_BUILD_TYPE "${default}" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif ()
-# C++14 support, warnings and other flags
+# C++17 support, warnings and other flags
+#
+# 17 is needed for std::optional, in qxmpp
+set (CMAKE_CXX_STANDARD 17)
+set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (DEFINITIONS QT_NO_CAST_TO_ASCII QT_DISABLE_DEPRECATED_BEFORE=0x040900)
list (APPEND DEFINITIONS KADU_EXPORT_TESTS)
@@ -38,7 +42,6 @@ else ()
set (COMMON_COMPILE_FLAGS "-Wall -Wextra -Wundef -Wunused -Wuninitialized -Wcast-align -Wpointer-arith -fno-common")
set (C_FLAGS "-Wwrite-strings")
set (CXX_FLAGS "-Woverloaded-virtual -Wnon-virtual-dtor ${CXX_FLAGS}")
- set (CMAKE_CXX_STANDARD 14)
if (NOT WIN32)
set (COMMON_COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} -fvisibility=hidden")

12
polish/kadu/files/patch-cmake_KaduMacros.cmake

@ -0,0 +1,12 @@
--- cmake/KaduMacros.cmake.orig 2021-04-03 20:24:23 UTC
+++ cmake/KaduMacros.cmake
@@ -44,7 +44,8 @@ include_directories (${INJEQT_INCLUDEDIR})
link_directories (${INJEQT_LIBRARY_DIRS})
set (CMAKE_CXX_FLAGS "-Woverloaded-virtual -Wnon-virtual-dtor ${CMAKE_CXX_FLAGS}")
-set (CMAKE_CXX_STANDARD 14)
+set (CMAKE_CXX_STANDARD 17)
+set (CMAKE_CXX_STANDARD_REQUIRED ON)
if (NOT WIN32)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
Loading…
Cancel
Save