From aec36a4bc9642aecb74f8a5918fc2db2300d46ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Wed, 24 Feb 2021 08:46:57 +0700 Subject: [PATCH] kwin: build for platform that don't have atomic_int64 I can make it built but I can't test it :( --- srcpkgs/kwin/patches/atomic-type.patch | 36 ++++++++++++++++++++++++++ srcpkgs/kwin/template | 4 --- 2 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/kwin/patches/atomic-type.patch diff --git a/srcpkgs/kwin/patches/atomic-type.patch b/srcpkgs/kwin/patches/atomic-type.patch new file mode 100644 index 0000000000..39d3878a6d --- /dev/null +++ b/srcpkgs/kwin/patches/atomic-type.patch @@ -0,0 +1,36 @@ +--- src/ftrace.h ++++ src/ftrace.h +@@ -11,6 +11,7 @@ + + #include + ++#include + #include + #include + #include +@@ -70,10 +71,15 @@ private: + + class KWIN_EXPORT FTraceDuration + { ++ using ftrace_context_t = std::conditional< ++ QAtomicOpsSupport::IsSupported, ++ qulonglong, ++ ulong>::type; ++ + public: + template FTraceDuration(Args... args) + { +- static QAtomicInteger s_context = 0; ++ static QAtomicInteger s_context = 0; + QTextStream stream(&m_message); + (stream << ... << args); + stream.flush(); +@@ -85,7 +91,7 @@ public: + + private: + QByteArray m_message; +- qulonglong m_context; ++ ftrace_context_t m_context; + }; + + } // namespace KWin diff --git a/srcpkgs/kwin/template b/srcpkgs/kwin/template index 8228a742c8..4234b682a0 100644 --- a/srcpkgs/kwin/template +++ b/srcpkgs/kwin/template @@ -30,10 +30,6 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then makedepends+=" libatomic-devel" fi -if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then - broken="Q_STATIC_ASSERT_X(QAtomicOpsSupport::IsSupported" -fi - post_extract() { _qt5_dep_ver="${depends#*>=}" _qt5_dep_ver="${_qt5_dep_ver%<*}"