Package: qcoro
Version: 0.4.0-4
Tags: FTBFS patch

qcoro 0.4.0-4 FTBFS with riscv because the CMake files do not link with 
libatomic. The attached patch fixes this issue. This is the first patch for 
this package, so the attached patch file adds the debian/patches folder with 
the patch and series files.
From caea4008e8398b14df0ef4667044542102452aad Mon Sep 17 00:00:00 2001
From: Ileana Dumitrescu <[email protected]>
Date: Tue, 29 Mar 2022 18:16:40 +0300
Subject: [PATCH] libatomic patch for riscv

---
 debian/patches/0001-link-with-libatomic.patch | 202 ++++++++++++++++++
 debian/patches/series                         |   1 +
 2 files changed, 203 insertions(+)
 create mode 100644 debian/patches/0001-link-with-libatomic.patch
 create mode 100644 debian/patches/series

diff --git a/debian/patches/0001-link-with-libatomic.patch b/debian/patches/0001-link-with-libatomic.patch
new file mode 100644
index 0000000..0065003
--- /dev/null
+++ b/debian/patches/0001-link-with-libatomic.patch
@@ -0,0 +1,202 @@
+From bc6185d5775d21e4d10869b0be5c40580d8e9315 Mon Sep 17 00:00:00 2001
+From: Ileana Dumitrescu <[email protected]>
+Date: Tue, 29 Mar 2022 16:50:25 +0300
+Subject: [PATCH] link with libatomic
+
+---
+ examples/basics/CMakeLists.txt                | 5 +++--
+ examples/chained/CMakeLists.txt               | 2 ++
+ examples/dbus/common/CMakeLists.txt           | 3 +++
+ examples/dbus/coroutine/CMakeLists.txt        | 2 ++
+ examples/dbus/regular-blocking/CMakeLists.txt | 2 ++
+ examples/iodevice/CMakeLists.txt              | 2 ++
+ examples/network/CMakeLists.txt               | 2 ++
+ examples/timer/CMakeLists.txt                 | 2 ++
+ tests/CMakeLists.txt                          | 7 +++++++
+ 9 files changed, 25 insertions(+), 2 deletions(-)
+
+diff --git a/examples/basics/CMakeLists.txt b/examples/basics/CMakeLists.txt
+index c250f85..3be5349 100644
+--- a/examples/basics/CMakeLists.txt
++++ b/examples/basics/CMakeLists.txt
+@@ -1,5 +1,6 @@
+ add_executable(await-sync-string await-sync-string.cpp)
+-target_link_libraries(await-sync-string QCoro${QT_VERSION_MAJOR}::Coro)
++set(LINK_LIBATOMIC "-latomic")
++target_link_libraries(await-sync-string QCoro${QT_VERSION_MAJOR}::Coro ${LINK_LIBATOMIC})
+ 
+ add_executable(await-async-string await-async-string.cpp)
+-target_link_libraries(await-async-string QCoro${QT_VERSION_MAJOR}::Coro Qt${QT_VERSION_MAJOR}::Core)
++target_link_libraries(await-async-string QCoro${QT_VERSION_MAJOR}::Coro Qt${QT_VERSION_MAJOR}::Core ${LINK_LIBATOMIC})
+diff --git a/examples/chained/CMakeLists.txt b/examples/chained/CMakeLists.txt
+index 143d1a8..9614535 100644
+--- a/examples/chained/CMakeLists.txt
++++ b/examples/chained/CMakeLists.txt
+@@ -1,5 +1,7 @@
+ add_executable(chained-example main.cpp)
++set(LINK_LIBATOMIC "-latomic")
+ target_link_libraries(chained-example
+     QCoro${QT_VERSION_MAJOR}Core
+     Qt${QT_VERSION_MAJOR}::Core
++    ${LINK_LIBATOMIC}
+ )
+diff --git a/examples/dbus/common/CMakeLists.txt b/examples/dbus/common/CMakeLists.txt
+index 4e39fa3..4e403ae 100644
+--- a/examples/dbus/common/CMakeLists.txt
++++ b/examples/dbus/common/CMakeLists.txt
+@@ -1,12 +1,14 @@
+ 
+ # Build the dbus-server as a stand-alone executable to workaround QTBUG-92107
+ add_executable(dbusserver dbusserver.cpp)
++set(LINK_LIBATOMIC "-latomic")
+ set_target_properties(dbusserver
+     PROPERTIES COMPILE_DEFINITIONS STANDALONE
+ )
+ target_link_libraries(dbusserver
+     Qt${QT_VERSION_MAJOR}::Core
+     Qt${QT_VERSION_MAJOR}::DBus
++    ${LINK_LIBATOMIC}
+ )
+ 
+ #-----------------------------------------------------#
+@@ -23,6 +25,7 @@ target_include_directories(examples-dbus-common
+ target_link_libraries(examples-dbus-common
+     PUBLIC
+     Qt${QT_VERSION_MAJOR}::Core
++    ${LINK_LIBATOMIC}
+     PRIVATE
+     Qt${QT_VERSION_MAJOR}::DBus
+ )
+diff --git a/examples/dbus/coroutine/CMakeLists.txt b/examples/dbus/coroutine/CMakeLists.txt
+index f4c27dd..852d394 100644
+--- a/examples/dbus/coroutine/CMakeLists.txt
++++ b/examples/dbus/coroutine/CMakeLists.txt
+@@ -3,10 +3,12 @@ set(dbustest_SRCS
+ )
+ 
+ add_executable(dbustest-coro ${dbustest_SRCS})
++set(LINK_LIBATOMIC "-latomic")
+ target_link_libraries(dbustest-coro
+     QCoro${QT_VERSION_MAJOR}DBus
+     examples-dbus-common
+     Threads::Threads
+     Qt${QT_VERSION_MAJOR}::Core
+     Qt${QT_VERSION_MAJOR}::DBus
++    ${LINK_LIBATOMIC}
+ )
+diff --git a/examples/dbus/regular-blocking/CMakeLists.txt b/examples/dbus/regular-blocking/CMakeLists.txt
+index 391e8fa..6c4451b 100644
+--- a/examples/dbus/regular-blocking/CMakeLists.txt
++++ b/examples/dbus/regular-blocking/CMakeLists.txt
+@@ -3,9 +3,11 @@ set(dbustest_SRCS
+ )
+ 
+ add_executable(dbustest ${dbustest_SRCS})
++set(LINK_LIBATOMIC "-latomic")
+ target_link_libraries(dbustest
+     examples-dbus-common
+     Threads::Threads
+     Qt${QT_VERSION_MAJOR}::Core
+     Qt${QT_VERSION_MAJOR}::DBus
++    ${LINK_LIBATOMIC}
+ )
+diff --git a/examples/iodevice/CMakeLists.txt b/examples/iodevice/CMakeLists.txt
+index c3bff95..53d0445 100644
+--- a/examples/iodevice/CMakeLists.txt
++++ b/examples/iodevice/CMakeLists.txt
+@@ -1,7 +1,9 @@
+ add_executable(iodevice-example main.cpp)
++set(LINK_LIBATOMIC "-latomic")
+ target_link_libraries(iodevice-example
+     QCoro${QT_VERSION_MAJOR}Core
+     QCoro${QT_VERSION_MAJOR}Network
+     Qt${QT_VERSION_MAJOR}::Core
+     Qt${QT_VERSION_MAJOR}::Network
++    ${LINK_LIBATOMIC}
+ )
+diff --git a/examples/network/CMakeLists.txt b/examples/network/CMakeLists.txt
+index 9ea495a..afa1fb8 100644
+--- a/examples/network/CMakeLists.txt
++++ b/examples/network/CMakeLists.txt
+@@ -1,7 +1,9 @@
+ add_executable(network-example main.cpp)
++set(LINK_LIBATOMIC "-latomic")
+ target_link_libraries(network-example
+     QCoro${QT_VERSION_MAJOR}Network
+     Qt${QT_VERSION_MAJOR}::Core
+     Qt${QT_VERSION_MAJOR}::Widgets
+     Qt${QT_VERSION_MAJOR}::Network
++    ${LINK_LIBATOMIC}
+ )
+diff --git a/examples/timer/CMakeLists.txt b/examples/timer/CMakeLists.txt
+index 53bfb80..f061b19 100644
+--- a/examples/timer/CMakeLists.txt
++++ b/examples/timer/CMakeLists.txt
+@@ -1,5 +1,7 @@
+ add_executable(timer-example main.cpp)
++set(LINK_LIBATOMIC "-latomic")
+ target_link_libraries(timer-example
+     QCoro${QT_VERSION_MAJOR}Core
+     Qt${QT_VERSION_MAJOR}::Core
++    ${LINK_LIBATOMIC}
+ )
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index d8389b4..bf92a4e 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -1,10 +1,12 @@
+ include(CMakeParseArguments)
+ 
+ add_library(qcoro_test STATIC testobject.cpp)
++set(LINK_LIBATOMIC "-latomic")
+ target_link_libraries(qcoro_test PUBLIC
+     QCoro${QT_VERSION_MAJOR}Core
+     Qt${QT_VERSION_MAJOR}::Core
+     Qt${QT_VERSION_MAJOR}::Test
++    ${LINK_LIBATOMIC}
+ )
+ 
+ if (QCORO_WITH_QTDBUS)
+@@ -12,6 +14,7 @@ if (QCORO_WITH_QTDBUS)
+     target_link_libraries(testdbusserver
+         Qt${QT_VERSION_MAJOR}::Core
+         Qt${QT_VERSION_MAJOR}::DBus
++        ${LINK_LIBATOMIC}
+     )
+ 
+     set(qcoro_test_dbus_SRCS)
+@@ -24,6 +27,7 @@ if (QCORO_WITH_QTDBUS)
+     target_link_libraries(qcoro_test_dbus PUBLIC
+         Qt${QT_VERSION_MAJOR}::Core
+         Qt${QT_VERSION_MAJOR}::DBus
++        ${LINK_LIBATOMIC}
+     )
+ endif()
+ 
+@@ -41,6 +45,7 @@ function(qcoro_add_test _name)
+         Qt${QT_VERSION_MAJOR}::Test
+         ${TEST_LINK_LIBRARIES}
+         Threads::Threads
++        ${LINK_LIBATOMIC}
+     )
+     add_test(NAME test-${_name} COMMAND test-${_name})
+ endfunction()
+@@ -60,6 +65,7 @@ function(qcoro_add_network_test _name)
+         Qt${QT_VERSION_MAJOR}::Network
+         Threads::Threads
+         ${TEST_LINK_LIBRARIES}
++        ${LINK_LIBATOMIC}
+     )
+     add_test(NAME test-${_name} COMMAND test-${_name})
+ endfunction()
+@@ -78,6 +84,7 @@ function(qcoro_add_dbus_test _name)
+         qcoro_test
+         qcoro_test_dbus
+         ${TEST_LINK_LIBRARIES}
++        ${LINK_LIBATOMIC}
+     )
+     target_include_directories(test-${_name} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
+     target_compile_definitions(test-${_name} PRIVATE TESTDBUSSERVER_EXECUTABLE=\"$<TARGET_FILE:testdbusserver>\")
+-- 
+2.30.2
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..05b3ea6
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-link-with-libatomic.patch
-- 
2.35.1

_______________________________________________
pkg-kde-extras mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-kde-extras

Reply via email to