summaryrefslogtreecommitdiffstats
path: root/debian/patches/check-for-atomic.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:29:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:29:05 +0000
commitefa1e916debcd95aa630404956ae3b086b17ac76 (patch)
treeda43204022e7e3f32b8f44a232536b8aeb02a81b /debian/patches/check-for-atomic.patch
parentAdding upstream version 1.0.2. (diff)
downloadinkscape-debian/1.0.2-4.tar.xz
inkscape-debian/1.0.2-4.zip
Adding debian version 1.0.2-4.debian/1.0.2-4debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/check-for-atomic.patch')
-rw-r--r--debian/patches/check-for-atomic.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/patches/check-for-atomic.patch b/debian/patches/check-for-atomic.patch
new file mode 100644
index 0000000..4097100
--- /dev/null
+++ b/debian/patches/check-for-atomic.patch
@@ -0,0 +1,31 @@
+Description: Add -latomic where needed
+ This is to fix the build on armel and mipsel
+Author: Mattia Rizzolo <mattia@debian.org>
+Forwarded: https://gitlab.com/inkscape/inkscape/-/merge_requests/1867
+Last-Update: 2020-05-07
+
+--- a/CMakeScripts/DefineDependsandFlags.cmake
++++ b/CMakeScripts/DefineDependsandFlags.cmake
+@@ -60,6 +60,22 @@
+ list(APPEND INKSCAPE_LIBS "-latomic")
+ ENDIF()
+
++include(CheckCXXSourceCompiles)
++CHECK_CXX_SOURCE_COMPILES("
++#include <atomic>
++#include <cstdint>
++std::atomic<uint64_t> x (0);
++int main() {
++ uint64_t i = x.load(std::memory_order_relaxed);
++ return 0;
++}
++"
++LIBATOMIC_NOT_NEEDED)
++IF (NOT LIBATOMIC_NOT_NEEDED)
++ message(STATUS " Adding -latomic to the libs.")
++ list(APPEND INKSCAPE_LIBS "-latomic")
++ENDIF()
++
+
+ # ----------------------------------------------------------------------------
+ # Helper macros